Bug 720353 - Backout of 964b118ac852 (Bug 694964). r=bgirard

This commit is contained in:
Ali Juma 2012-03-19 17:22:21 -04:00
parent 45a458920c
commit 264f45ebef

View File

@ -2305,13 +2305,10 @@ BasicShadowableThebesLayer::SetBackBufferAndAttrs(const OptionalThebesBuffer& aB
{ {
if (OptionalThebesBuffer::Tnull_t == aBuffer.type()) { if (OptionalThebesBuffer::Tnull_t == aBuffer.type()) {
mBackBuffer = SurfaceDescriptor(); mBackBuffer = SurfaceDescriptor();
} else if (!IsSurfaceDescriptorValid(mBackBuffer)) { } else {
mBackBuffer = aBuffer.get_ThebesBuffer().buffer(); mBackBuffer = aBuffer.get_ThebesBuffer().buffer();
mBackBufferRect = aBuffer.get_ThebesBuffer().rect(); mBackBufferRect = aBuffer.get_ThebesBuffer().rect();
mBackBufferRectRotation = aBuffer.get_ThebesBuffer().rotation(); mBackBufferRectRotation = aBuffer.get_ThebesBuffer().rotation();
} else {
SurfaceDescriptor obsoleteBuffer = aBuffer.get_ThebesBuffer().buffer();
BasicManager()->ShadowLayerForwarder::DestroySharedSurface(&obsoleteBuffer);
} }
mFrontAndBackBufferDiffer = true; mFrontAndBackBufferDiffer = true;
mROFrontBuffer = aReadOnlyFrontBuffer; mROFrontBuffer = aReadOnlyFrontBuffer;
@ -2414,8 +2411,6 @@ BasicShadowableThebesLayer::PaintBuffer(gfxContext* aContext,
mBuffer.BufferRect(), mBuffer.BufferRect(),
mBuffer.BufferRotation(), mBuffer.BufferRotation(),
mBackBuffer); mBackBuffer);
mROFrontBuffer = ThebesBuffer(mBackBuffer, mBuffer.BufferRect(), mBuffer.BufferRotation());
mBackBuffer = SurfaceDescriptor();
} }
already_AddRefed<gfxASurface> already_AddRefed<gfxASurface>