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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Returns a platform specific handle for this buffer. | 96 // Returns a platform specific handle for this buffer. |
97 virtual GpuMemoryBufferHandle GetHandle() const = 0; | 97 virtual GpuMemoryBufferHandle GetHandle() const = 0; |
98 | 98 |
99 // Type-checking downcast routine. | 99 // Type-checking downcast routine. |
100 virtual ClientBuffer AsClientBuffer() = 0; | 100 virtual ClientBuffer AsClientBuffer() = 0; |
101 | 101 |
102 // Returns the GUID for tracing. | 102 // Returns the GUID for tracing. |
103 virtual base::trace_event::MemoryAllocatorDumpGuid GetGUIDForTracing( | 103 virtual base::trace_event::MemoryAllocatorDumpGuid GetGUIDForTracing( |
104 uint64_t tracing_process_id) const; | 104 uint64_t tracing_process_id) const; |
| 105 |
| 106 virtual base::SharedMemory* GetSharedMemory(); |
105 }; | 107 }; |
106 | 108 |
107 // Returns an instance of |handle| which can be sent over IPC. This duplicates | 109 // Returns an instance of |handle| which can be sent over IPC. This duplicates |
108 // the file-handles as appropriate, so that the IPC code take ownership of them, | 110 // the file-handles as appropriate, so that the IPC code take ownership of them, |
109 // without invalidating |handle| itself. | 111 // without invalidating |handle| itself. |
110 GFX_EXPORT GpuMemoryBufferHandle | 112 GFX_EXPORT GpuMemoryBufferHandle |
111 CloneHandleForIPC(const GpuMemoryBufferHandle& handle); | 113 CloneHandleForIPC(const GpuMemoryBufferHandle& handle); |
112 | 114 |
113 } // namespace gfx | 115 } // namespace gfx |
114 | 116 |
115 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ | 117 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ |
OLD | NEW |