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

Unified Diff: ui/base/ozone/surface_factory_ozone.h

Issue 23438002: Adding functionality to paint and signal buffer swap for ozone surface factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address missing AcceleratedWidget and pure virtual comments Created 7 years, 4 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
Index: ui/base/ozone/surface_factory_ozone.h
diff --git a/ui/base/ozone/surface_factory_ozone.h b/ui/base/ozone/surface_factory_ozone.h
index 5df6bd9547d926a9c11b0d4d356be60154fa1df1..9ac928560365fa825ebb5c7ec972ad149e7b13a0 100644
--- a/ui/base/ozone/surface_factory_ozone.h
+++ b/ui/base/ozone/surface_factory_ozone.h
@@ -35,15 +35,18 @@ class UI_EXPORT SurfaceFactoryOzone {
// This method implements gfx::Screen, particularly useful in Desktop Aura.
virtual gfx::Screen* CreateDesktopScreen();
- // TODO(rjkroege): Add a status code if necessary.
// Configures the display hardware. Must be called from within the GPU
// process before the sandbox has been activated.
- virtual void InitializeHardware() = 0;
+ virtual bool InitializeHardware() = 0;
// Cleans up display hardware state. Call this from within the GPU process.
// This method must be safe to run inside of the sandbox.
virtual void ShutdownHardware() = 0;
+ // Returns the native EGL display. This is generally needed in creating
+ // EGL windows.
+ virtual void* GetNativeDisplay();
rjkroege 2013/08/27 16:03:42 It isn't safe to assume that a void* fits in an in
dnicoara 2013/08/28 14:58:03 Updated the definition to intptr_t.
+
// Obtains an AcceleratedWidget backed by a native Linux framebuffer.
// The returned AcceleratedWidget is an opaque token that must realized
// before it can be used to create a GL surface.
@@ -65,6 +68,10 @@ class UI_EXPORT SurfaceFactoryOzone {
gfx::AcceleratedWidget w,
const gfx::Rect& bounds) = 0;
+ // Called after the appropriate GL swap buffers command. Used if extra work
+ // is needed to perform the actual buffer swap.
+ virtual bool SwapBuffers(gfx::AcceleratedWidget w);
+
// Returns a gfx::VsyncProvider for the provided AcceleratedWidget. 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
@@ -81,5 +88,4 @@ class UI_EXPORT SurfaceFactoryOzone {
} // namespace ui
-
#endif // UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_

Powered by Google App Engine
This is Rietveld 408576698