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

Unified Diff: ui/ozone/public/surface_ozone_egl.h

Issue 837483003: [ozone] Add stub async swap buffers implementation to ozone surfaceless. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/ozone/platform/egltest/ozone_platform_egltest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/public/surface_ozone_egl.h
diff --git a/ui/ozone/public/surface_ozone_egl.h b/ui/ozone/public/surface_ozone_egl.h
index 4f38f06b2117c2e2605af9bd2f86d1f4c92a871c..81644cf84a7bb05b20e6a4b2d449239bacac60d5 100644
--- a/ui/ozone/public/surface_ozone_egl.h
+++ b/ui/ozone/public/surface_ozone_egl.h
@@ -6,6 +6,7 @@
#define UI_OZONE_PUBLIC_SURFACE_OZONE_EGL_H_
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "ui/gfx/overlay_transform.h"
#include "ui/ozone/ozone_base_export.h"
@@ -38,6 +39,13 @@ class OZONE_BASE_EXPORT SurfaceOzoneEGL {
// be used to present the new front buffer if the platform requires this.
virtual bool OnSwapBuffers() = 0;
+ typedef base::Closure SwapCompletionCallback;
+ // Called after we swap buffers. This is usually a no-op but can
+ // be used to present the new front buffer if the platform requires this.
+ // The callback should be run on the calling thread
+ // (i.e. same thread SwapBuffersAsync is called).
+ virtual bool OnSwapBuffersAsync(const SwapCompletionCallback& callback) = 0;
+
// Returns a gfx::VsyncProvider for this surface. Note that this may be
// called after we have entered the sandbox so if there are operations (e.g.
// opening a file descriptor providing vsync events) that must be done
« no previous file with comments | « ui/ozone/platform/egltest/ozone_platform_egltest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698