Bug 933530 - Remove mDataIsCurrent from SharedSurfaceGL. r=jgilbert

This commit is contained in:
Walter Litwinczyk 2014-09-12 11:37:58 -07:00
parent 0af6720261
commit 5e29ba50b8
2 changed files with 6 additions and 18 deletions

View File

@ -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;
}

View File

@ -48,7 +48,6 @@ protected:
const GLuint mTex;
GLuint mFB;
RefPtr<gfx::DataSourceSurface> mData;
bool mIsDataCurrent;
SharedSurface_Basic(GLContext* gl,
const gfx::IntSize& size,