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

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: win build 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
« no previous file with comments | « content/content_common.gypi ('k') | ui/gfx/gpu_memory_buffer.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..1a622016c7c003f212ec8428f96cf3f1ae0cedba 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,23 +36,20 @@ struct SurfaceTextureId {
};
#endif
-struct GpuMemoryBufferHandle {
- GpuMemoryBufferHandle()
- : type(EMPTY_BUFFER),
- handle(base::SharedMemory::NULLHandle())
-#if defined(OS_MACOSX)
- ,
- io_surface_id(0u)
-#endif
-#if defined(OS_ANDROID)
- ,
- native_buffer(NULL)
-#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 GFX_EXPORT GpuMemoryBufferHandle {
+ 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
« no previous file with comments | « content/content_common.gypi ('k') | ui/gfx/gpu_memory_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698