Be sure to unlock the old back buffer before we release it. (
bug 1409871 part 20, r?nical)
MozReview-Commit-ID: HR9EiYrDeqT
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -220,16 +220,20 @@ ContentClient::BeginPaint(PaintedLayer*
if (!newBuffer->Lock(lockMode)) {
gfxCriticalNote << "Failed to lock new back buffer.";
Clear();
return result;
}
if (mBuffer) {
newBuffer->UpdateDestinationFrom(*mBuffer, newBuffer->BufferRect());
+
+ // We are done with the old back buffer now and it is about to be
+ // destroyed, so unlock it.
+ mBuffer->Unlock();
}
// Ensure our reference to the front buffer is released
// as well as the old back buffer.
Clear();
mBuffer = newBuffer;
}