Index: ui/gfx/gpu_memory_buffer.h |
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h |
index 51731d909581e37eaab8489dea56f0d69b1cf30f..829865e283c39dcdd4c0fc1726d79e7a04a37b0a 100644 |
--- a/ui/gfx/gpu_memory_buffer.h |
+++ b/ui/gfx/gpu_memory_buffer.h |
@@ -9,10 +9,6 @@ |
#include "build/build_config.h" |
#include "ui/gfx/gfx_export.h" |
-#if defined(USE_X11) |
-#include "ui/gfx/x/x11_types.h" |
-#endif |
- |
extern "C" typedef struct _ClientBuffer* ClientBuffer; |
namespace gfx { |
@@ -22,27 +18,20 @@ enum GpuMemoryBufferType { |
SHARED_MEMORY_BUFFER, |
IO_SURFACE_BUFFER, |
SURFACE_TEXTURE_BUFFER, |
- X11_PIXMAP_BUFFER, |
OZONE_NATIVE_BUFFER, |
GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_BUFFER |
}; |
-struct GpuMemoryBufferId { |
- GpuMemoryBufferId() : primary_id(0), secondary_id(0) {} |
- GpuMemoryBufferId(int32 primary_id, int32 secondary_id) |
- : primary_id(primary_id), secondary_id(secondary_id) {} |
- int32 primary_id; |
- int32 secondary_id; |
-}; |
+using GpuMemoryBufferId = int32; |
struct GFX_EXPORT GpuMemoryBufferHandle { |
GpuMemoryBufferHandle(); |
bool is_null() const { return type == EMPTY_BUFFER; } |
GpuMemoryBufferType type; |
+ GpuMemoryBufferId id; |
base::SharedMemoryHandle handle; |
- GpuMemoryBufferId global_id; |
-#if defined(USE_X11) |
- XID pixmap; |
+#if defined(OS_MACOSX) |
+ uint32 io_surface_id; |
#endif |
}; |
@@ -67,7 +56,10 @@ class GFX_EXPORT GpuMemoryBuffer { |
// The usage mode affects how a buffer can be used. Only buffers created with |
// MAP can be mapped into the client's address space and accessed by the CPU. |
- enum Usage { MAP, SCANOUT, USAGE_LAST = SCANOUT }; |
+ // PERSISTENT_MAP adds the additional condition that successive Map() calls |
+ // (with Unmap() calls between) will return a pointer to the same memory |
+ // contents. |
+ enum Usage { MAP, PERSISTENT_MAP, SCANOUT, USAGE_LAST = SCANOUT }; |
virtual ~GpuMemoryBuffer() {} |