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

Unified Diff: ui/gl/gl_fence_egl.cc

Issue 2418613004: ui: Add EGL_ANDROID_native_fence_sync support.
Patch Set: rebase Created 4 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 | « ui/gl/gl_fence_egl.h ('k') | no next file » | 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 ff066a76726f1059e703edce294e2f4c20b7d20e..81ccd715235cd70373ddc076db7c7ee5b98a02eb 100644
--- a/ui/gl/gl_fence_egl.cc
+++ b/ui/gl/gl_fence_egl.cc
@@ -20,11 +20,14 @@ void GLFenceEGL::SetIgnoreFailures() {
g_ignore_egl_sync_failures = true;
}
-GLFenceEGL::GLFenceEGL() {
+GLFenceEGL::GLFenceEGL() : GLFenceEGL(EGL_SYNC_FENCE_KHR, nullptr) {
+ glFlush();
+}
+
+GLFenceEGL::GLFenceEGL(GLenum type, EGLint* attribs) {
display_ = eglGetCurrentDisplay();
- sync_ = eglCreateSyncKHR(display_, EGL_SYNC_FENCE_KHR, NULL);
+ sync_ = eglCreateSyncKHR(display_, type, attribs);
DCHECK(sync_ != EGL_NO_SYNC_KHR);
- glFlush();
}
bool GLFenceEGL::HasCompleted() {
« no previous file with comments | « ui/gl/gl_fence_egl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698