Bug 995065 - Don't block on the Compositor for more than 100ms. r=jgilbert

This commit is contained in:
Matt Woodrow 2014-02-18 10:12:50 +13:00
parent b14060bda6
commit 5e285c4683

View File

@ -476,8 +476,11 @@ 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;
}