Backed out changeset 67cb195b1b45 (bug 1290081) for canvas reftest failures

This commit is contained in:
Wes Kocher
2016-07-28 13:09:07 -07:00
parent 98c4789238
commit aa15caaf1e
2 changed files with 8 additions and 3 deletions

View File

@@ -98,7 +98,8 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
mBufferProviderTexture = nullptr;
AutoRemoveTexture autoRemove(this);
if (mBackBuffer && (mBackBuffer->IsReadLocked() || mBackBuffer->GetSize() != aSize)) {
if (mBackBuffer &&
(mBackBuffer->IsImmutable() || mBackBuffer->GetSize() != aSize)) {
autoRemove.mTexture = mBackBuffer;
mBackBuffer = nullptr;
}
@@ -121,7 +122,6 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
NS_WARNING("Failed to allocate the TextureClient");
return;
}
mBackBuffer->EnableReadLock();
MOZ_ASSERT(mBackBuffer->CanExposeDrawTarget());
bufferCreated = true;