Chromium Code Reviews| Index: ui/ozone/public/surface_factory_ozone.h |
| diff --git a/ui/ozone/public/surface_factory_ozone.h b/ui/ozone/public/surface_factory_ozone.h |
| index 62df13e50740423de6567804d69e4c010eb5c40f..d130de0575e2bcf9bb06a3fc173572ab949fdf4a 100644 |
| --- a/ui/ozone/public/surface_factory_ozone.h |
| +++ b/ui/ozone/public/surface_factory_ozone.h |
| @@ -68,6 +68,11 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
| RGB_888, |
| }; |
| + enum BufferUsage { |
| + MAP, |
|
spang
2014/11/07 17:42:06
do we ever want both (MAP | SCANOUT)?
|
| + SCANOUT, |
| + }; |
| + |
| typedef void* (*GLGetProcAddressProc)(const char* name); |
| typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback; |
| typedef base::Callback<void(GLGetProcAddressProc)> |
| @@ -121,10 +126,10 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
| virtual OverlayCandidatesOzone* GetOverlayCandidates( |
| gfx::AcceleratedWidget w); |
| - // Cleate a single native buffer to be used for overlay planes. |
| - virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
| - gfx::Size size, |
| - BufferFormat format); |
| + // Cleate a single native buffer to be used for overlay planes or zero copy. |
| + virtual scoped_refptr<NativePixmap> CreateNativePixmap(gfx::Size size, |
| + BufferFormat format, |
| + BufferUsage usage); |
| // Sets the overlay plane to switch to at the next page flip. |
| // |w| specifies the screen to display this overlay plane on. |
| @@ -149,6 +154,10 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
| // overlay-only mode. |
| virtual bool CanShowPrimaryPlaneAsOverlay(); |
| + // Returns true if the platform is able to create buffers for a specific usage |
| + // such as MAP for zero copy or SCANOUT for display controller. |
| + virtual bool CanCreateNativePixmap(BufferUsage usage); |
| + |
| private: |
| static SurfaceFactoryOzone* impl_; // not owned |
| }; |