зеркало из https://github.com/mozilla/gecko-dev.git
Bug 893301. Remove AccessMode use in ContentClient. r=nical
This commit is contained in:
Родитель
961a970469
Коммит
ee46d57bdc
|
@ -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 <x=%d,y=%d,w=%d,h=%d>",
|
||||
this,
|
||||
|
|
|
@ -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<TextureClient>& 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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче