Bug 995065 - Don't block on the Compositor for more than 100ms. r=jgilbert
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 18 Feb 2014 10:12:50 +1300
changeset 196915 7195a01e9bbfbabbb60695e5d6a4e3aaa1bc17be
parent 196914 03b7c270d65eff6c877195a55036a21ca5204fe4
child 196916 6f5a918051d532a569fbbfe06839a872dd156548
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs995065
milestone31.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 995065 - Don't block on the Compositor for more than 100ms. r=jgilbert
gfx/gl/SurfaceStream.cpp
--- a/gfx/gl/SurfaceStream.cpp
+++ b/gfx/gl/SurfaceStream.cpp
@@ -471,16 +471,19 @@ SurfaceStream_TripleBuffer_Async::~Surfa
 }
 
 bool
 SurfaceStream_TripleBuffer_Async::WaitForCompositor()
 {
     PROFILER_LABEL("SurfaceStream_TripleBuffer_Async", "WaitForCompositor");
 
     // We are assumed to be locked
-    while (mStaging)
-        mMonitor.Wait();
+    while (mStaging) {
+        if (!NS_SUCCEEDED(mMonitor.Wait(PR_MillisecondsToInterval(100)))) {
+            return false;
+        }
+    }
 
     return true;
 }
 
 } /* namespace gfx */
 } /* namespace mozilla */