mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 573829, part 2: Add TextureImage API for getting backing ASurface (if exists) and determining whether it's in an update. sr=vlad
This commit is contained in:
parent
f80d743342
commit
7d90dfc275
@ -187,8 +187,17 @@ public:
|
||||
GLuint Texture() { return mTexture; }
|
||||
|
||||
/** Can be called safely at any time. */
|
||||
|
||||
/**
|
||||
* If this TextureImage has a permanent gfxASurface backing,
|
||||
* return it. Otherwise return NULL.
|
||||
*/
|
||||
virtual already_AddRefed<gfxASurface> GetBackingSurface()
|
||||
{ return NULL; }
|
||||
|
||||
const nsIntSize& GetSize() const { return mSize; }
|
||||
ContentType GetContentType() const { return mContentType; }
|
||||
virtual PRBool InUpdate() const = 0;
|
||||
|
||||
protected:
|
||||
/**
|
||||
@ -226,6 +235,8 @@ public:
|
||||
virtual gfxContext* BeginUpdate(nsIntRegion& aRegion);
|
||||
virtual PRBool EndUpdate();
|
||||
|
||||
virtual PRBool InUpdate() const { return !!mUpdateContext; }
|
||||
|
||||
protected:
|
||||
typedef gfxASurface::gfxImageFormat ImageFormat;
|
||||
|
||||
|
@ -736,6 +736,15 @@ public:
|
||||
return PR_FALSE; // texture not bound
|
||||
}
|
||||
|
||||
virtual already_AddRefed<gfxASurface>
|
||||
GetBackingSurface()
|
||||
{
|
||||
NS_ADDREF(mImpl->mThebesSurface);
|
||||
return mImpl->mThebesSurface.get();
|
||||
}
|
||||
|
||||
virtual PRBool InUpdate() const { return !!mUpdateContext; }
|
||||
|
||||
private:
|
||||
GLContext* mGLContext;
|
||||
nsRefPtr<GLContextEGL> mImpl;
|
||||
|
Loading…
Reference in New Issue
Block a user