Last active
January 4, 2016 02:58
-
-
Save tiagovignatti/8558311 to your computer and use it in GitHub Desktop.
flush Wayland after eglSwapBuffers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tiago@fisu:~/git/chromium/src$ git diff | |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc | |
index ae5cb68..867246f 100644 | |
--- a/ui/gl/gl_surface_egl.cc | |
+++ b/ui/gl/gl_surface_egl.cc | |
@@ -403,6 +403,8 @@ bool NativeViewGLSurfaceEGL::SwapBuffers() { | |
<< GetLastEGLErrorString(); | |
return false; | |
} | |
+ // XXX: borrowing SchedulePageFlip as a SwapBuffers handler | |
+ gfx::SurfaceFactoryOzone::GetInstance()->SchedulePageFlip(window_); | |
return true; | |
} | |
tiago@fisu:~/git/chromium/src$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tiago@fisu:~/git/chromium/src/ozone$ git diff | |
diff --git a/impl/ozone_display.cc b/impl/ozone_display.cc | |
index 4775db8..e90cca0 100644 | |
--- a/impl/ozone_display.cc | |
+++ b/impl/ozone_display.cc | |
@@ -189,6 +189,14 @@ OzoneDisplay::CreateVSyncProvider(gfx::AcceleratedWidget w) { | |
} | |
bool OzoneDisplay::SchedulePageFlip(gfx::AcceleratedWidget w) { | |
+ wl_display* waylandDisp = WaylandDisplay::GetInstance()->display(); | |
+ while (wl_display_prepare_read(waylandDisp) != 0) | |
+ wl_display_dispatch_pending(waylandDisp); | |
+ | |
+ wl_display_flush(waylandDisp); | |
+ wl_display_read_events(waylandDisp); | |
+ wl_display_dispatch_pending(waylandDisp); | |
+ | |
return true; | |
} | |
tiago@fisu:~/git/chromium/src/ozone$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment