diff --git a/gfx/gl/SharedSurfaceGL.cpp b/gfx/gl/SharedSurfaceGL.cpp index 77c770aaea3..2a880273326 100644 --- a/gfx/gl/SharedSurfaceGL.cpp +++ b/gfx/gl/SharedSurfaceGL.cpp @@ -70,7 +70,6 @@ SharedSurface_Basic::SharedSurface_Basic(GLContext* gl, hasAlpha) , mTex(tex) , mFB(0) - , mIsDataCurrent(false) { mGL->MakeCurrent(); mGL->fGenFramebuffers(1, &mFB); @@ -116,50 +115,40 @@ SharedSurface_Basic::Fence() mGL->MakeCurrent(); ScopedBindFramebuffer autoFB(mGL, mFB); ReadPixelsIntoDataSurface(mGL, mData); - mIsDataCurrent = true; } bool SharedSurface_Basic::WaitSync() { - MOZ_ASSERT(mIsDataCurrent); return true; } bool SharedSurface_Basic::PollSync() { - MOZ_ASSERT(mIsDataCurrent); return true; } void SharedSurface_Basic::Fence_ContentThread_Impl() { - mIsDataCurrent = false; } bool SharedSurface_Basic::WaitSync_ContentThread_Impl() { - if (!mIsDataCurrent) { - mGL->MakeCurrent(); - ScopedBindFramebuffer autoFB(mGL, mFB); - ReadPixelsIntoDataSurface(mGL, mData); - mIsDataCurrent = true; - } + mGL->MakeCurrent(); + ScopedBindFramebuffer autoFB(mGL, mFB); + ReadPixelsIntoDataSurface(mGL, mData); return true; } bool SharedSurface_Basic::PollSync_ContentThread_Impl() { - if (!mIsDataCurrent) { - mGL->MakeCurrent(); - ScopedBindFramebuffer autoFB(mGL, mFB); - ReadPixelsIntoDataSurface(mGL, mData); - mIsDataCurrent = true; - } + mGL->MakeCurrent(); + ScopedBindFramebuffer autoFB(mGL, mFB); + ReadPixelsIntoDataSurface(mGL, mData); return true; } diff --git a/gfx/gl/SharedSurfaceGL.h b/gfx/gl/SharedSurfaceGL.h index 3a5e2c3e77c..1d1f1fad759 100644 --- a/gfx/gl/SharedSurfaceGL.h +++ b/gfx/gl/SharedSurfaceGL.h @@ -48,7 +48,6 @@ protected: const GLuint mTex; GLuint mFB; RefPtr mData; - bool mIsDataCurrent; SharedSurface_Basic(GLContext* gl, const gfx::IntSize& size,