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

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: Removing call to SchedulePageFlip in gl_surface_egl 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..b78118ce3518ece72021b8e6d1bb829d4fb2be0b 100644
--- a/ui/base/ozone/surface_factory_ozone.h
+++ b/ui/base/ozone/surface_factory_ozone.h
@@ -18,6 +18,12 @@ namespace ui {
class UI_EXPORT SurfaceFactoryOzone {
public:
+ // Describes the state of the hardware after initialization.
+ enum HardwareState {
+ INITIALIZED,
+ FAILED,
+ };
+
SurfaceFactoryOzone();
virtual ~SurfaceFactoryOzone();
@@ -35,15 +41,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 HardwareState 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 intptr_t GetNativeDisplay();
+
// 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 +74,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
rjkroege 2013/08/30 15:26:04 I realize it's been a bit of contentious discussio
+ // is needed to perform the actual buffer swap.
+ virtual bool SchedulePageFlip(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 +94,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