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

Side by Side Diff: ui/gfx/gpu_memory_buffer.h

Issue 1417363006: ui: Add support for creating GLImage instances from shared memory pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usage-rename
Patch Set: static_cast<off_t> to make windows build happy Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | ui/gl/gl_image_shared_memory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_GPU_MEMORY_BUFFER_H_ 5 #ifndef UI_GFX_GPU_MEMORY_BUFFER_H_
6 #define UI_GFX_GPU_MEMORY_BUFFER_H_ 6 #define UI_GFX_GPU_MEMORY_BUFFER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/trace_event/memory_dump_manager.h" 9 #include "base/trace_event/memory_dump_manager.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 20 matching lines...) Expand all
31 }; 31 };
32 32
33 using GpuMemoryBufferId = GenericSharedMemoryId; 33 using GpuMemoryBufferId = GenericSharedMemoryId;
34 34
35 struct GFX_EXPORT GpuMemoryBufferHandle { 35 struct GFX_EXPORT GpuMemoryBufferHandle {
36 GpuMemoryBufferHandle(); 36 GpuMemoryBufferHandle();
37 bool is_null() const { return type == EMPTY_BUFFER; } 37 bool is_null() const { return type == EMPTY_BUFFER; }
38 GpuMemoryBufferType type; 38 GpuMemoryBufferType type;
39 GpuMemoryBufferId id; 39 GpuMemoryBufferId id;
40 base::SharedMemoryHandle handle; 40 base::SharedMemoryHandle handle;
41 uint32_t offset;
41 #if defined(USE_OZONE) 42 #if defined(USE_OZONE)
42 NativePixmapHandle native_pixmap_handle; 43 NativePixmapHandle native_pixmap_handle;
43 #endif 44 #endif
44 }; 45 };
45 46
46 base::trace_event::MemoryAllocatorDumpGuid GFX_EXPORT 47 base::trace_event::MemoryAllocatorDumpGuid GFX_EXPORT
47 GetGpuMemoryBufferGUIDForTracing(uint64 tracing_process_id, 48 GetGpuMemoryBufferGUIDForTracing(uint64 tracing_process_id,
48 GpuMemoryBufferId buffer_id); 49 GpuMemoryBufferId buffer_id);
49 50
50 // This interface typically correspond to a type of shared memory that is also 51 // This interface typically correspond to a type of shared memory that is also
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Returns a platform specific handle for this buffer. 85 // Returns a platform specific handle for this buffer.
85 virtual GpuMemoryBufferHandle GetHandle() const = 0; 86 virtual GpuMemoryBufferHandle GetHandle() const = 0;
86 87
87 // Type-checking downcast routine. 88 // Type-checking downcast routine.
88 virtual ClientBuffer AsClientBuffer() = 0; 89 virtual ClientBuffer AsClientBuffer() = 0;
89 }; 90 };
90 91
91 } // namespace gfx 92 } // namespace gfx
92 93
93 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ 94 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | ui/gl/gl_image_shared_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698