diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 91c9bba22cd7..9259e6d66096 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -110,7 +110,6 @@ ContentClientRemoteBuffer::DestroyBuffers() if (!mTextureClient) { return; } - MOZ_ASSERT(mTextureClient->GetAccessMode() == TextureClient::ACCESS_READ_WRITE); mOldTextures.AppendElement(mTextureClient); mTextureClient = nullptr; @@ -278,11 +277,6 @@ ContentClientRemoteBuffer::Updated(const nsIntRegion& aRegionToDraw, aDidSelfCopy); MOZ_ASSERT(mTextureClient); - mTextureClient->SetAccessMode(TextureClient::ACCESS_NONE); - if (mTextureClientOnWhite) { - mTextureClientOnWhite->SetAccessMode(TextureClient::ACCESS_NONE); - } - LockFrontBuffer(); mForwarder->UseTexture(this, mTextureClient); mForwarder->UpdateTextureRegion(this, ThebesBufferData(BufferRect(), @@ -293,15 +287,8 @@ ContentClientRemoteBuffer::Updated(const nsIntRegion& aRegionToDraw, void ContentClientRemoteBuffer::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) { - MOZ_ASSERT(mTextureClient->GetAccessMode() == TextureClient::ACCESS_NONE); - MOZ_ASSERT(!mTextureClientOnWhite || mTextureClientOnWhite->GetAccessMode() == TextureClient::ACCESS_NONE); MOZ_ASSERT(mTextureClient); - mFrontAndBackBufferDiffer = true; - mTextureClient->SetAccessMode(TextureClient::ACCESS_READ_WRITE); - if (mTextureClientOnWhite) { - mTextureClientOnWhite->SetAccessMode(TextureClient::ACCESS_READ_WRITE); - } } void @@ -311,7 +298,6 @@ DeprecatedContentClientRemoteBuffer::DestroyBuffers() return; } - MOZ_ASSERT(mDeprecatedTextureClient->GetAccessMode() == DeprecatedTextureClient::ACCESS_READ_WRITE); mDeprecatedTextureClient = nullptr; mDeprecatedTextureClientOnWhite = nullptr; @@ -529,7 +515,6 @@ void ContentClientDoubleBuffered::DestroyFrontBuffer() { MOZ_ASSERT(mFrontClient); - MOZ_ASSERT(mFrontClient->GetAccessMode() != TextureClient::ACCESS_NONE); mOldTextures.AppendElement(mFrontClient); mFrontClient = nullptr; @@ -539,16 +524,6 @@ ContentClientDoubleBuffered::DestroyFrontBuffer() } } -void -ContentClientDoubleBuffered::LockFrontBuffer() -{ - MOZ_ASSERT(mFrontClient); - mFrontClient->SetAccessMode(TextureClient::ACCESS_NONE); - if (mFrontClientOnWhite) { - mFrontClientOnWhite->SetAccessMode(TextureClient::ACCESS_NONE); - } -} - void ContentClientDoubleBuffered::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) { @@ -571,10 +546,6 @@ ContentClientDoubleBuffered::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) mFrontBufferRotation = oldBufferRotation; MOZ_ASSERT(mFrontClient); - mFrontClient->SetAccessMode(TextureClient::ACCESS_READ_ONLY); - if (mFrontClientOnWhite) { - mFrontClientOnWhite->SetAccessMode(TextureClient::ACCESS_READ_ONLY); - } ContentClientRemoteBuffer::SwapBuffers(aFrontUpdatedRegion); } @@ -586,9 +557,6 @@ ContentClientDoubleBuffered::SyncFrontBufferToBackBuffer() return; } MOZ_ASSERT(mFrontClient); - MOZ_ASSERT(mFrontClient->GetAccessMode() == TextureClient::ACCESS_READ_ONLY); - MOZ_ASSERT(!mFrontClientOnWhite || - mFrontClientOnWhite->GetAccessMode() == TextureClient::ACCESS_READ_ONLY); MOZ_LAYERS_LOG(("BasicShadowableThebes(%p): reading back ", this, diff --git a/gfx/layers/client/ContentClient.h b/gfx/layers/client/ContentClient.h index 4773896ce5fe..36ad187bc7c7 100644 --- a/gfx/layers/client/ContentClient.h +++ b/gfx/layers/client/ContentClient.h @@ -253,9 +253,6 @@ protected: // and notify the compositor that we have created the buffer(s). virtual void CreateFrontBuffer(const nsIntRect& aBufferRect) = 0; virtual void DestroyFrontBuffer() {} - // We're about to hand off to the compositor, if you've got a back buffer, - // lock it now. - virtual void LockFrontBuffer() {} bool CreateAndAllocateTextureClient(RefPtr& aClient, TextureFlags aFlags = 0); @@ -406,7 +403,6 @@ public: protected: virtual void CreateFrontBuffer(const nsIntRect& aBufferRect) MOZ_OVERRIDE; virtual void DestroyFrontBuffer() MOZ_OVERRIDE; - virtual void LockFrontBuffer() MOZ_OVERRIDE; private: void UpdateDestinationFrom(const RotatedBuffer& aSource,