Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: ui/gl/gl_fence_arb.cc

Issue 685003007: Check if there is error on waiting for GL Fence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_fence_arb.cc
diff --git a/ui/gl/gl_fence_arb.cc b/ui/gl/gl_fence_arb.cc
index da13f107880d8ae0c996218af9d75fad46470932..c8a82989e2fc1a47b125881d5a937476903b3653 100644
--- a/ui/gl/gl_fence_arb.cc
+++ b/ui/gl/gl_fence_arb.cc
@@ -28,7 +28,9 @@ bool GLFenceARB::HasCompleted() {
// We could potentially use glGetSynciv here, but it doesn't work
// on OSX 10.7 (always says the fence is not signaled yet).
// glClientWaitSync works better, so let's use that instead.
- return glClientWaitSync(sync_, 0, 0) != GL_TIMEOUT_EXPIRED;
+ GLenum result = glClientWaitSync(sync_, GL_SYNC_FLUSH_COMMANDS_BIT, 0);
no sievers 2014/10/31 18:49:32 GL_SYNC_FLUSH_COMMANDS_BIT doesn't work here becau
+ DCHECK_NE(GL_WAIT_FAILED, result);
no sievers 2014/10/31 18:49:32 The spec says it can only fail if you use an illeg
+ return result != GL_TIMEOUT_EXPIRED;
}
void GLFenceARB::ClientWait() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698