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

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: Forgot to include check 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
« no previous file with comments | « ui/base/ozone/event_factory_ozone.cc ('k') | ui/base/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c020ee9a9b13b311bc7f016fcb090ef31f42cf4c 100644
--- a/ui/base/ozone/surface_factory_ozone.h
+++ b/ui/base/ozone/surface_factory_ozone.h
@@ -5,10 +5,14 @@
#ifndef UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
#define UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
+#include <EGL/egl.h>
rjkroege 2013/08/26 21:48:08 this is not a good idea.
+
#include "ui/base/ui_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
+class SkBitmap;
rjkroege 2013/08/26 21:48:08 SKia isn't in a name space? interesting. I learn s
+
namespace gfx {
class Screen;
class VSyncProvider;
@@ -35,15 +39,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;
rjkroege 2013/08/26 21:48:08 an enum would be preferable? And what does the sta
dnicoara 2013/08/27 14:41:41 I'm not sure what the status would be. I'm seeing
// 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 EGLNativeDisplayType GetNativeDisplay() = 0;
rjkroege 2013/08/26 21:48:08 return an int. Or we need to modify some of the df
dnicoara 2013/08/27 14:41:41 Wouldn't this be platform dependent? I'm not sure
+
// 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 +72,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() = 0;
rjkroege 2013/08/26 21:48:08 this should take the accelerated widget as an argu
dnicoara 2013/08/27 14:41:41 Done.
+
// 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
@@ -72,6 +83,9 @@ class UI_EXPORT SurfaceFactoryOzone {
// in InitializeHardware. Returns NULL on error.
virtual gfx::VSyncProvider* GetVSyncProvider(gfx::AcceleratedWidget w) = 0;
+ // Used to paint a bitmap directly to the surface.
rjkroege 2013/08/26 21:48:08 You are not using this method in this CL yes? Perh
dnicoara 2013/08/27 14:41:41 Sure, I was thinking of having it in here to discu
+ virtual void Paint(const SkBitmap& bitmap, const gfx::Rect& rect) = 0;
+
// Create a default SufaceFactoryOzone implementation useful for tests.
static SurfaceFactoryOzone* CreateTestHelper();
@@ -81,5 +95,4 @@ class UI_EXPORT SurfaceFactoryOzone {
} // namespace ui
-
#endif // UI_BASE_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_
« no previous file with comments | « ui/base/ozone/event_factory_ozone.cc ('k') | ui/base/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698