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

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: Changed to size Created 6 years, 6 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
« content/common/gpu/gpu_messages.h ('K') | « content/content_common.gypi ('k') | no next file » | 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..ec192c1765ef66a4acec07cc428c7039046acb98 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -24,6 +24,8 @@ enum GpuMemoryBufferType {
GPU_MEMORY_BUFFER_TYPE_LAST = SURFACE_TEXTURE_BUFFER
};
+// TODO(alexst): Merge this with GpuMemoryBufferId as part of switchover to
+// the new API for GpuMemoryBuffer allocation when it's done.
#if defined(OS_ANDROID)
struct SurfaceTextureId {
SurfaceTextureId() : primary_id(0), secondary_id(0) {}
@@ -34,6 +36,14 @@ struct SurfaceTextureId {
};
#endif
+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;
+};
+
struct GpuMemoryBufferHandle {
GpuMemoryBufferHandle()
: type(EMPTY_BUFFER),
@@ -51,6 +61,7 @@ struct GpuMemoryBufferHandle {
bool is_null() const { return type == EMPTY_BUFFER; }
GpuMemoryBufferType type;
base::SharedMemoryHandle handle;
+ GpuMemoryBufferId global_id;
#if defined(OS_MACOSX)
uint32 io_surface_id;
#endif
« content/common/gpu/gpu_messages.h ('K') | « content/content_common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698