Bug 1142071 - Re-add WaitForBufferOwnership() r=jgilbert
authorSotaro Ikeda <sikeda@mozilla.com>
Wed, 11 Mar 2015 14:10:24 -0700
changeset 263464 392c688134bd99e9585664bde62dc808994457e9
parent 263463 851347e26940f7449afc1d740bf1e3c1d1b62c2a
child 263465 4bdf782dda8221f5eb626f0e9c7b2f0f6698104c
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1142071
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1142071 - Re-add WaitForBufferOwnership() r=jgilbert
gfx/gl/SharedSurface.cpp
--- a/gfx/gl/SharedSurface.cpp
+++ b/gfx/gl/SharedSurface.cpp
@@ -338,16 +338,20 @@ SurfaceFactory::NewSharedSurface(const g
 
 TemporaryRef<ShSurfHandle>
 SurfaceFactory::NewShSurfHandle(const gfx::IntSize& size)
 {
     auto surf = NewSharedSurface(size);
     if (!surf)
         return nullptr;
 
+    // Before next use, wait until SharedSurface's buffer
+    // is no longer being used.
+    surf->WaitForBufferOwnership();
+
     return new ShSurfHandle(this, Move(surf));
 }
 
 // Auto-deletes surfs of the wrong type.
 void
 SurfaceFactory::Recycle(UniquePtr<SharedSurface> surf)
 {
     MOZ_ASSERT(surf);