OLD | NEW |
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 21 matching lines...) Expand all Loading... |
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 uint32_t offset; |
| 42 int32_t stride; |
42 #if defined(USE_OZONE) | 43 #if defined(USE_OZONE) |
43 NativePixmapHandle native_pixmap_handle; | 44 NativePixmapHandle native_pixmap_handle; |
44 #endif | 45 #endif |
45 }; | 46 }; |
46 | 47 |
47 base::trace_event::MemoryAllocatorDumpGuid GFX_EXPORT | 48 base::trace_event::MemoryAllocatorDumpGuid GFX_EXPORT |
48 GetGpuMemoryBufferGUIDForTracing(uint64 tracing_process_id, | 49 GetGpuMemoryBufferGUIDForTracing(uint64 tracing_process_id, |
49 GpuMemoryBufferId buffer_id); | 50 GpuMemoryBufferId buffer_id); |
50 | 51 |
51 // This interface typically correspond to a type of shared memory that is also | 52 // 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 Loading... |
85 // Returns a platform specific handle for this buffer. | 86 // Returns a platform specific handle for this buffer. |
86 virtual GpuMemoryBufferHandle GetHandle() const = 0; | 87 virtual GpuMemoryBufferHandle GetHandle() const = 0; |
87 | 88 |
88 // Type-checking downcast routine. | 89 // Type-checking downcast routine. |
89 virtual ClientBuffer AsClientBuffer() = 0; | 90 virtual ClientBuffer AsClientBuffer() = 0; |
90 }; | 91 }; |
91 | 92 |
92 } // namespace gfx | 93 } // namespace gfx |
93 | 94 |
94 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ | 95 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ |
OLD | NEW |