Bug 1285692 - Add IsProducerAcquired(). - r=mtseng
MozReview-Commit-ID: 81Y5DAXtgeo
--- a/gfx/gl/SharedSurface.cpp
+++ b/gfx/gl/SharedSurface.cpp
@@ -209,17 +209,16 @@ SharedSurface::SharedSurface(SharedSurfa
: mType(type)
, mAttachType(attachType)
, mGL(gl)
, mSize(size)
, mHasAlpha(hasAlpha)
, mCanRecycle(canRecycle)
, mIsLocked(false)
, mIsProducerAcquired(false)
- , mIsConsumerAcquired(false)
#ifdef DEBUG
, mOwningThread(NS_GetCurrentThread())
#endif
{ }
layers::TextureFlags
SharedSurface::GetTextureFlags() const
{
--- a/gfx/gl/SharedSurface.h
+++ b/gfx/gl/SharedSurface.h
@@ -62,17 +62,16 @@ public:
const AttachmentType mAttachType;
GLContext* const mGL;
const gfx::IntSize mSize;
const bool mHasAlpha;
const bool mCanRecycle;
protected:
bool mIsLocked;
bool mIsProducerAcquired;
- bool mIsConsumerAcquired;
#ifdef DEBUG
nsIThread* const mOwningThread;
#endif
SharedSurface(SharedSurfaceType type,
AttachmentType attachType,
GLContext* gl,
const gfx::IntSize& size,
@@ -82,19 +81,18 @@ protected:
public:
virtual ~SharedSurface() {
}
// Specifies to the TextureClient any flags which
// are required by the SharedSurface backend.
virtual layers::TextureFlags GetTextureFlags() const;
- bool IsLocked() const {
- return mIsLocked;
- }
+ bool IsLocked() const { return mIsLocked; }
+ bool IsProducerAcquired() const { return mIsProducerAcquired; }
// This locks the SharedSurface as the production buffer for the context.
// This is needed by backends which use PBuffers and/or EGLSurfaces.
void LockProd();
// Unlocking is harmless if we're already unlocked.
void UnlockProd();