Bug 1285692 - Add IsProducerAcquired(). - r=mtseng draft
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 08 Jul 2016 17:44:17 -0700
changeset 385686 74a2ad759ba898ac0add01dc3978aae9b62e62b9
parent 385127 57118eba003d0f657e218fee786fa3d4cdd2c930
child 385687 9f7e406c30c919008fe2579d39ed220059361733
push id22580
push userbmo:jgilbert@mozilla.com
push dateSat, 09 Jul 2016 01:03:42 +0000
reviewersmtseng
bugs1285692
milestone50.0a1
Bug 1285692 - Add IsProducerAcquired(). - r=mtseng MozReview-Commit-ID: 81Y5DAXtgeo
gfx/gl/SharedSurface.cpp
gfx/gl/SharedSurface.h
--- 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();