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

Unified Diff: ui/gl/gl_fence_egl.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « ui/gl/gl_fence_arb.cc ('k') | ui/gl/gl_implementation_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_fence_egl.cc
diff --git a/ui/gl/gl_fence_egl.cc b/ui/gl/gl_fence_egl.cc
index 2ff18fc8353a09ee4c4f86f3c0aad84d6f3e5bbf..c96d6d8157dea1b5c9c5f1915e6149d5379ca316 100644
--- a/ui/gl/gl_fence_egl.cc
+++ b/ui/gl/gl_fence_egl.cc
@@ -4,6 +4,7 @@
#include "ui/gl/gl_fence_egl.h"
+#include "ui/gl/egl_util.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
@@ -24,6 +25,8 @@ bool GLFenceEGL::HasCompleted() {
EGLint value = 0;
if (eglGetSyncAttribKHR(display_, sync_, EGL_SYNC_STATUS_KHR, &value) !=
EGL_TRUE) {
+ LOG(ERROR) << "Failed to get EGLSync attribute. error code:"
+ << eglGetError();
return true;
}
@@ -35,7 +38,12 @@ void GLFenceEGL::ClientWait() {
if (!flush_event_.get() || flush_event_->IsSignaled()) {
EGLint flags = 0;
EGLTimeKHR time = EGL_FOREVER_KHR;
- eglClientWaitSyncKHR(display_, sync_, flags, time);
+ EGLint result = eglClientWaitSyncKHR(display_, sync_, flags, time);
+ DCHECK_NE(EGL_TIMEOUT_EXPIRED_KHR, result);
+ if (result == EGL_FALSE) {
+ LOG(FATAL) << "Failed to wait for EGLSync. error:"
+ << ui::GetLastEGLErrorString();
+ }
} else {
LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping...";
}
@@ -48,7 +56,10 @@ void GLFenceEGL::ServerWait() {
}
if (!flush_event_.get() || flush_event_->IsSignaled()) {
EGLint flags = 0;
- eglWaitSyncKHR(display_, sync_, flags);
+ if (eglWaitSyncKHR(display_, sync_, flags) == EGL_FALSE) {
+ LOG(FATAL) << "Failed to wait for EGLSync. error:"
+ << ui::GetLastEGLErrorString();
+ }
} else {
LOG(ERROR) << "Trying to wait for uncommitted fence. Skipping...";
}
« no previous file with comments | « ui/gl/gl_fence_arb.cc ('k') | ui/gl/gl_implementation_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698