Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: ui/gfx/gpu_memory_buffer.h

Issue 302603004: Plumb GpuMemoryBuffer allocation to GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | ui/gl/gl_image_surface_texture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | ui/gl/gl_image_surface_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698