Chromium Code Reviews| Index: ui/gfx/gpu_memory_buffer.h |
| diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h |
| index d09dd1092f1e6325545289918ee51644fda33e57..a95230d5e944723f9e7e18162877a8f0b18d7f12 100644 |
| --- a/ui/gfx/gpu_memory_buffer.h |
| +++ b/ui/gfx/gpu_memory_buffer.h |
| @@ -8,6 +8,7 @@ |
| #include "base/memory/shared_memory.h" |
| #include "build/build_config.h" |
| #include "ui/gfx/gfx_export.h" |
| +#include "ui/gfx/native_widget_types.h" |
| #if defined(OS_ANDROID) |
| #include <third_party/khronos/EGL/egl.h> |
| @@ -24,20 +25,19 @@ enum GpuMemoryBufferType { |
| GPU_MEMORY_BUFFER_TYPE_LAST = SURFACE_TEXTURE_BUFFER |
| }; |
| -#if defined(OS_ANDROID) |
| -struct SurfaceTextureId { |
| - SurfaceTextureId() : primary_id(0), secondary_id(0) {} |
| - SurfaceTextureId(int32 primary_id, int32 secondary_id) |
| +struct GpuMemoryBufferId { |
| + GpuMemoryBufferId() : primary_id(0), secondary_id(base::kNullProcessId) {} |
| + GpuMemoryBufferId(int32 primary_id, base::ProcessId secondary_id) |
| : primary_id(primary_id), secondary_id(secondary_id) {} |
| int32 primary_id; |
| - int32 secondary_id; |
| + base::ProcessId secondary_id; |
|
alexst (slow to review)
2014/05/30 22:41:47
I'm thinking we can utilize this generically and w
reveman
2014/05/31 00:34:02
Let's keep this a client id. The client id is cont
|
| }; |
| -#endif |
| struct GpuMemoryBufferHandle { |
| GpuMemoryBufferHandle() |
| : type(EMPTY_BUFFER), |
| - handle(base::SharedMemory::NULLHandle()) |
| + handle(base::SharedMemory::NULLHandle()), |
| + window(kNullPluginWindow) |
| #if defined(OS_MACOSX) |
| , |
| io_surface_id(0u) |
| @@ -51,13 +51,14 @@ struct GpuMemoryBufferHandle { |
| bool is_null() const { return type == EMPTY_BUFFER; } |
| GpuMemoryBufferType type; |
| base::SharedMemoryHandle handle; |
| + gfx::PluginWindowHandle window; |
| #if defined(OS_MACOSX) |
| uint32 io_surface_id; |
| #endif |
| #if defined(OS_ANDROID) |
| EGLClientBuffer native_buffer; |
| - SurfaceTextureId surface_texture_id; |
| #endif |
| + GpuMemoryBufferId gpu_memory_id; |
| }; |
| // This interface typically correspond to a type of shared memory that is also |