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..4802b1637e24da9d7b43c4377d2d5a8f6d3d93f8 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,24 @@ class GFX_EXPORT SurfaceFactoryOzone { |
| FAILED, |
| }; |
| + // Describes overlay buffer format. |
| + enum BufferFormat { |
| + UNKNOWN, |
| + RGBA_8888, |
|
rjkroege
2014/02/28 23:02:47
in little endian?
|
| + RGB_888, |
|
rjkroege
2014/02/28 23:02:47
padded or un-padded?
alexst (slow to review)
2014/03/03 18:36:24
packed.
|
| + }; |
| + |
| + // Describes transformation to be applied to the buffer before presenting |
| + // to screen. |
| + enum OverlayTransform { |
|
rjkroege
2014/02/28 23:02:47
some kinds of scaling and colour space conversions
alexst (slow to review)
2014/03/03 18:36:24
I think scaling is universally supported and could
|
| + 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 +157,26 @@ 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* GetOverlayHAL(); |
|
rjkroege
2014/02/28 23:02:47
is the name of the method a bit weird now?
alexst (slow to review)
2014/03/03 18:36:24
Oh yean, I'll change.
|
| + |
| + // Sets the overlay plane to switch to at the next page flip. |
|
rjkroege
2014/02/28 23:02:47
bike-sheddery: I'd call this "ScheduleOverlayPlane
alexst (slow to review)
2014/03/03 18:36:24
Done.
|
| + // |plane_id| specifies the location of the plane above the main framebuffer. |
| + // |plane_transform| specifies how the buffer is to be transformed during. |
| + // composition. |
| + // |handle| is the native buffer to be presented by the overlay. |
|
rjkroege
2014/02/28 23:02:47
you could call it "buffer"
alexst (slow to review)
2014/03/03 18:36:24
Done.
|
| + // |display_bounds| specify where it is supposed to be on the screen. |
| + // |crop_rect| specifies the region within the buffer. |
|
rjkroege
2014/02/28 23:02:47
per other file comments: what is expected of imple
alexst (slow to review)
2014/03/03 18:36:24
Project crop rect within the buffer into display_r
|
| + virtual void SetOverlayPlane(int plane_id, |
|
rjkroege
2014/02/28 23:02:47
once we have multiple display support, this needs
alexst (slow to review)
2014/03/03 18:36:24
I thought we were going to have one of these facto
|
| + OverlayTransform plane_transform, |
| + gfx::NativeBufferOzone handle, |
| + 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 |
| }; |