Bug 1061435 - Set timeout to fClientWaitSync() r=nical

This commit is contained in:
Sotaro Ikeda 2014-09-24 07:00:19 -07:00
parent 30f7cc274a
commit 8a3ab50601

View File

@ -266,12 +266,15 @@ TextureHostOGL::WaitAcquireFenceSyncComplete()
return;
}
// Wait sync complete with timeout.
// If a source of the fence becomes invalid because of error,
// fene complete is not signaled. See Bug 1061435.
EGLint status = sEGLLibrary.fClientWaitSync(EGL_DISPLAY(),
sync,
0,
LOCAL_EGL_FOREVER);
400000000 /*400 usec*/);
if (status != LOCAL_EGL_CONDITION_SATISFIED) {
NS_WARNING("failed to wait native fence sync");
NS_ERROR("failed to wait native fence sync");
}
MOZ_ALWAYS_TRUE( sEGLLibrary.fDestroySync(EGL_DISPLAY(), sync) );
mAcquireFence = nullptr;