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