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

Unified Diff: ui/gl/gl_surface.h

Issue 781683005: Ozone: Avoid blocking in Swapbuffer Call. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unintended changes. 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.h
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h
index 1302cce4e5331b558a502e4311fac3a1ed7e529a..30e1fca1c6edff06cae615ca524b724d65f7a9bb 100644
--- a/ui/gl/gl_surface.h
+++ b/ui/gl/gl_surface.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#include "ui/gfx/native_widget_types.h"
@@ -128,6 +129,14 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> {
virtual bool IsSurfaceless() const;
+ typedef base::Callback<void()>
+ PageFlipCompletionCallback;
+ // On platforms where Chromium manages the system front/back buffer, we need
+ // to know when front buffer is actually displayed on screen. This
+ // callback should be called after the front buffer is displayed on screen.
+ virtual void SetPageFlipCompletionCallback(
+ const PageFlipCompletionCallback& callback);
+
// Create a GL surface that renders directly to a view.
static scoped_refptr<GLSurface> CreateViewGLSurface(
gfx::AcceleratedWidget window);
@@ -189,6 +198,9 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface {
const RectF& crop_rect) override;
bool IsSurfaceless() const override;
+ void SetPageFlipCompletionCallback(
+ const PageFlipCompletionCallback& callback) override;
+
GLSurface* surface() const { return surface_.get(); }
protected:

Powered by Google App Engine
This is Rietveld 408576698