Index: ui/gfx/gpu_memory_buffer.h |
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h |
index de5094301df462cb399f102911025fb3f8def5f3..2cfb2786030ab99567aea54c23165da0a3d2cf88 100644 |
--- a/ui/gfx/gpu_memory_buffer.h |
+++ b/ui/gfx/gpu_memory_buffer.h |
@@ -13,6 +13,10 @@ |
#include <third_party/khronos/EGL/egl.h> |
#endif |
+#if defined(USE_OZONE) |
+#include "ui/gfx/ozone/surface_factory_ozone.h" |
+#endif |
+ |
namespace gfx { |
enum GpuMemoryBufferType { |
@@ -21,7 +25,8 @@ enum GpuMemoryBufferType { |
IO_SURFACE_BUFFER, |
ANDROID_NATIVE_BUFFER, |
SURFACE_TEXTURE_BUFFER, |
- GPU_MEMORY_BUFFER_TYPE_LAST = SURFACE_TEXTURE_BUFFER |
+ OZONE_NATIVE_BUFFER, |
+ GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_BUFFER |
}; |
#if defined(OS_ANDROID) |
@@ -58,6 +63,12 @@ struct GpuMemoryBufferHandle { |
EGLClientBuffer native_buffer; |
SurfaceTextureId surface_texture_id; |
#endif |
+#if defined(OS_MACOSX) |
+ uint32 io_surface_id; |
+#endif |
+#if defined(USE_OZONE) |
+ gfx::NativeBufferOzone ozone_native_buffer; |
+#endif |
}; |
// This interface typically correspond to a type of shared memory that is also |
@@ -65,8 +76,7 @@ struct GpuMemoryBufferHandle { |
// regular CPU code, but can also be read by the GPU. |
class GFX_EXPORT GpuMemoryBuffer { |
public: |
- enum AccessMode { READ_ONLY, WRITE_ONLY, READ_WRITE }; |
- |
+ enum Usage { READ_WRITE, SCANOUT, USAGE_LAST = SCANOUT }; |
GpuMemoryBuffer(); |
virtual ~GpuMemoryBuffer(); |
@@ -75,7 +85,7 @@ class GFX_EXPORT GpuMemoryBuffer { |
// accessing the buffer or if CPU caches need to be synchronized. |mode| |
// indicate how the client intends to use the mapped buffer. Returns NULL on |
// failure. |
- virtual void* Map(AccessMode mode) = 0; |
+ virtual void* Map() = 0; |
reveman
2014/04/29 20:04:43
Can we start be making this change first and all t
|
// Unmaps the buffer. It's illegal to use the pointer returned by Map() after |
// this has been called. |