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

Side by Side Diff: ui/gl/gl_fence_egl.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gl_bindings_skia_in_process.cc ('k') | ui/gl/gl_mock_autogen_gl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/gl_fence_egl.h" 5 #include "ui/gl/gl_fence_egl.h"
6 6
7 #include "ui/gl/egl_util.h" 7 #include "ui/gl/egl_util.h"
8 #include "ui/gl/gl_bindings.h" 8 #include "ui/gl/gl_bindings.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 27 matching lines...) Expand all
38 38
39 DCHECK(value == EGL_SIGNALED_KHR || value == EGL_UNSIGNALED_KHR); 39 DCHECK(value == EGL_SIGNALED_KHR || value == EGL_UNSIGNALED_KHR);
40 return !value || value == EGL_SIGNALED_KHR; 40 return !value || value == EGL_SIGNALED_KHR;
41 } 41 }
42 42
43 void GLFenceEGL::ClientWait() { 43 void GLFenceEGL::ClientWait() {
44 EGLint flags = 0; 44 EGLint flags = 0;
45 EGLTimeKHR time = EGL_FOREVER_KHR; 45 EGLTimeKHR time = EGL_FOREVER_KHR;
46 EGLint result = eglClientWaitSyncKHR(display_, sync_, flags, time); 46 EGLint result = eglClientWaitSyncKHR(display_, sync_, flags, time);
47 DCHECK_IMPLIES(!g_ignore_egl_sync_failures, 47 DCHECK_IMPLIES(!g_ignore_egl_sync_failures,
48 EGL_TIMEOUT_EXPIRED_KHR == result); 48 EGL_TIMEOUT_EXPIRED_KHR != result);
49 if (result == EGL_FALSE) { 49 if (result == EGL_FALSE) {
50 LOG(ERROR) << "Failed to wait for EGLSync. error:" 50 LOG(ERROR) << "Failed to wait for EGLSync. error:"
51 << ui::GetLastEGLErrorString(); 51 << ui::GetLastEGLErrorString();
52 CHECK(g_ignore_egl_sync_failures); 52 CHECK(g_ignore_egl_sync_failures);
53 } 53 }
54 } 54 }
55 55
56 void GLFenceEGL::ServerWait() { 56 void GLFenceEGL::ServerWait() {
57 if (!gfx::g_driver_egl.ext.b_EGL_KHR_wait_sync) { 57 if (!gfx::g_driver_egl.ext.b_EGL_KHR_wait_sync) {
58 ClientWait(); 58 ClientWait();
59 return; 59 return;
60 } 60 }
61 EGLint flags = 0; 61 EGLint flags = 0;
62 if (eglWaitSyncKHR(display_, sync_, flags) == EGL_FALSE) { 62 if (eglWaitSyncKHR(display_, sync_, flags) == EGL_FALSE) {
63 LOG(ERROR) << "Failed to wait for EGLSync. error:" 63 LOG(ERROR) << "Failed to wait for EGLSync. error:"
64 << ui::GetLastEGLErrorString(); 64 << ui::GetLastEGLErrorString();
65 CHECK(g_ignore_egl_sync_failures); 65 CHECK(g_ignore_egl_sync_failures);
66 } 66 }
67 } 67 }
68 68
69 GLFenceEGL::~GLFenceEGL() { 69 GLFenceEGL::~GLFenceEGL() {
70 eglDestroySyncKHR(display_, sync_); 70 eglDestroySyncKHR(display_, sync_);
71 } 71 }
72 72
73 } // namespace gfx 73 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings_skia_in_process.cc ('k') | ui/gl/gl_mock_autogen_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698