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 e73813dd011b1fef2a45d2d124def7bac0fb0b6b..8bfd5ae7004ddb7f4d7929c2283b10fd41d92888 100644 |
--- a/ui/ozone/public/surface_factory_ozone.h |
+++ b/ui/ozone/public/surface_factory_ozone.h |
@@ -11,6 +11,7 @@ |
#include "ui/gfx/geometry/point.h" |
#include "ui/gfx/geometry/rect.h" |
#include "ui/gfx/geometry/rect.h" |
+#include "ui/gfx/gpu_memory_buffer.h" |
reveman
2015/05/14 13:22:03
I don't think you should include this here for cir
dshwang
2015/05/14 14:58:15
as I'll remove |device_handle| in GpuMemoryBufferH
|
#include "ui/gfx/native_widget_types.h" |
#include "ui/gfx/overlay_transform.h" |
#include "ui/ozone/ozone_base_export.h" |
@@ -73,6 +74,11 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
SCANOUT, |
}; |
+ struct Configuration { |
+ BufferFormat format; |
+ BufferUsage usage; |
+ }; |
+ |
typedef void* (*GLGetProcAddressProc)(const char* name); |
typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback; |
typedef base::Callback<void(GLGetProcAddressProc)> |
@@ -135,6 +141,11 @@ class OZONE_BASE_EXPORT SurfaceFactoryOzone { |
BufferFormat format, |
BufferUsage usage); |
+ // Export GpuMemoryBufferHandle from |pixmap|. |
+ virtual gfx::GpuMemoryBufferHandle ExportGpuMemoryBufferHandle( |
+ gfx::AcceleratedWidget widget, |
+ scoped_refptr<NativePixmap> pixmap); |
+ |
// Sets the overlay plane to switch to at the next page flip. |
// |w| specifies the screen to display this overlay plane on. |
// |plane_z_order| specifies the stacking order of the plane relative to the |
@@ -158,9 +169,9 @@ 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); |
+ // Gets supported format/usage configurations. |
+ virtual std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
+ const; |
private: |
static SurfaceFactoryOzone* impl_; // not owned |