| 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...";
|
| }
|
|
|