Chromium Code Reviews| 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..6579c3021d0d3568e309a705320d5c322fed973f 100644 |
| --- a/ui/gfx/ozone/surface_factory_ozone.h |
| +++ b/ui/gfx/ozone/surface_factory_ozone.h |
| @@ -12,12 +12,15 @@ |
| #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 OverlayCandidatesOzone; |
| +typedef intptr_t NativeBufferOzone; |
| // The Ozone interface allows external implementations to hook into Chromium to |
| // provide a system specific implementation. The Ozone interface supports two |
| @@ -55,6 +58,26 @@ class GFX_EXPORT SurfaceFactoryOzone { |
| FAILED, |
| }; |
| + // Describes overlay buffer format. |
| + // TODO: this is a placeholder for now and will be populated with more |
| + // formats once we know what sorts of content, video, etc. we can support. |
| + enum BufferFormat { |
| + UNKNOWN, |
| + RGBA_8888, |
| + RGB_888, |
| + }; |
| + |
| + // Describes transformation to be applied to the buffer before presenting |
| + // 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 +159,27 @@ 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::OverlayCandidatesOzone* GetOverlayCandidates(); |
|
rjkroege
2014/03/04 18:54:08
there is conceptually a separate OCOz per display
|
| + |
| + // Sets the overlay plane to switch to at the next page flip. |
| + // |plane_id| specifies the location of the plane above the main framebuffer. |
|
rjkroege
2014/03/04 18:54:08
the id is merely to specify the the stacking order
alexst (slow to review)
2014/03/04 20:04:53
This is z_order, I'll rename.
We get the base pla
|
| + // |plane_transform| specifies how the buffer is to be transformed during. |
| + // composition. |
| + // |buffer| to be presented by the overlay. |
| + // |display_bounds| specify where it is supposed to be on the screen. |
| + // |crop_rect| specifies the region within the buffer to be placed inside |
| + // |display_bounds|. |
| + virtual void ScheduleOverlayPlane(int plane_id, |
| + OverlayTransform plane_transform, |
| + gfx::NativeBufferOzone buffer, |
| + const gfx::Rect& display_bounds, |
| + gfx::RectF crop_rect); |
| + |
| + // Cleate a single native buffer to be used for overlay planes. |
| + virtual gfx::NativeBufferOzone CreateNativeBuffer(gfx::Size size, |
| + BufferFormat format); |
| + |
| private: |
| static SurfaceFactoryOzone* impl_; // not owned |
| }; |