Be sure to unlock the old back buffer before we release it. (bug 1409871 part 20, r?nical) draft
authorRyan Hunt <rhunt@eqrion.net>
Fri, 20 Oct 2017 12:28:41 -0400
changeset 684142 02e4a680898842f1a3fab90eac19408593da2ce1
parent 684141 8904be3b78787e1ade97bbf7bec9b3a65d694ebc
child 684143 b9c86ec556e17a01d70c18e6ea5979ffc83ebc38
push id85567
push userbmo:rhunt@eqrion.net
push dateFri, 20 Oct 2017 22:13:22 +0000
reviewersnical
bugs1409871
milestone58.0a1
Be sure to unlock the old back buffer before we release it. (bug 1409871 part 20, r?nical) MozReview-Commit-ID: HR9EiYrDeqT
gfx/layers/client/ContentClient.cpp
--- 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;
   }