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

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

Issue 183723003: Overlay interface for ozone. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/gfx/ozone/surface_factory_ozone.h
diff --git a/ui/gfx/ozone/surface_factory_ozone.h b/ui/gfx/ozone/surface_factory_ozone.h
index 889a56db9f352a3dc37ec6374abcc1e1864c923e..db476c20c844a1e5a8e5d455177ba701be40f481 100644
--- a/ui/gfx/ozone/surface_factory_ozone.h
+++ b/ui/gfx/ozone/surface_factory_ozone.h
@@ -12,12 +12,14 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/gfx_export.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/rect.h"
class SkBitmap;
class SkCanvas;
namespace gfx {
class VSyncProvider;
+class OverlayHALOzone;
// The Ozone interface allows external implementations to hook into Chromium to
// provide a system specific implementation. The Ozone interface supports two
@@ -55,6 +57,24 @@ class GFX_EXPORT SurfaceFactoryOzone {
FAILED,
};
+ // Describes overlay buffer format.
+ enum BufferFormat {
rjkroege 2014/02/27 23:18:19 I would imagine that we would add more here. Is t
alexst (slow to review) 2014/02/28 18:59:34 We may have some new formats like multiplane YUV t
+ UNKNOWN,
+ RGBA,
+ RGB,
+ };
+
+ // Describes transformation to be applied to the buffer before presenting
rjkroege 2014/02/27 23:18:19 do we anticipate that there will be more complex t
alexst (slow to review) 2014/02/28 18:59:34 Possibly, but let's walk before we run. This expos
+ // to screen.
+ enum OverlayTransform {
+ NONE,
+ FLIP_HORIZONTAL,
+ FLIP_VERTICAL,
+ ROTATE_90,
+ ROTATE_180,
+ ROTATE_270,
+ };
+
typedef void*(*GLGetProcAddressProc)(const char* name);
typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback;
typedef base::Callback<void(GLGetProcAddressProc)>
@@ -136,6 +156,19 @@ class GFX_EXPORT SurfaceFactoryOzone {
// Sets the cursor position to |location|.
virtual void MoveCursorTo(const gfx::Point& location);
+ // Get the hal struct to check for overlay support.
+ virtual gfx::OverlayHALOzone* GetOverlayHAL();
+
+ // Sets the overlay plane to switch to at the next page flip.
rjkroege 2014/02/27 23:18:19 the comment needs to specify what the args are for
alexst (slow to review) 2014/02/28 18:59:34 Done.
+ virtual void SetOverlayPlane(int plane_id,
+ OverlayTransform plane_transform,
+ gfx::AcceleratedWidget handle,
+ const gfx::Rect& bounds);
+
+ // Cleate a single native buffer to be used for overlay planes.
+ virtual gfx::AcceleratedWidget CreateNativeBuffer(gfx::Size size,
rjkroege 2014/02/27 23:18:19 The properties of bing an overlay plan end up bein
alexst (slow to review) 2014/02/28 18:59:34 Done.
+ BufferFormat format);
+
private:
static SurfaceFactoryOzone* impl_; // not owned
};

Powered by Google App Engine
This is Rietveld 408576698