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

Unified Diff: ui/gl/gl_surface_ozone.cc

Issue 781683005: Ozone: Avoid blocking in Swapbuffer Call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiler warning. Created 6 years 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
Index: ui/gl/gl_surface_ozone.cc
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index 67ab131b7a8c261905ca7fe5bc0a5aef855e2adb..2233ab70f205f892d8f0f827792cadf45a72252a 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -121,9 +121,11 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
return SurfacelessEGL::Resize(size);
}
- virtual bool SwapBuffers() override {
+ virtual bool SwapBuffersAsync(
+ const SwapCompletionCallback& callback) override {
// TODO: this should be replaced by a fence when supported by the driver.
glFlush();
+ ozone_surface_->SetPageFlipCompletionCallback(callback);
return ozone_surface_->OnSwapBuffers();
}
virtual bool ScheduleOverlayPlane(int z_order,
@@ -139,9 +141,11 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
return vsync_provider_.get();
}
virtual bool SupportsPostSubBuffer() override { return true; }
- virtual bool PostSubBuffer(int x, int y, int width, int height) override {
+ virtual bool PostSubBufferAsync(
+ int x, int y, int width, int height,
+ const SwapCompletionCallback& callback) override {
// The actual sub buffer handling is handled at higher layers.
- SwapBuffers();
+ SwapBuffersAsync(callback);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698