OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 GPU_COMMAND_BUFFER_COMMON_BUFFER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_COMMON_BUFFER_H_ |
6 #define GPU_COMMAND_BUFFER_COMMON_BUFFER_H_ | 6 #define GPU_COMMAND_BUFFER_COMMON_BUFFER_H_ |
7 | 7 |
8 #include "../common/types.h" | 8 #include "gpu/command_buffer/common/types.h" |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class SharedMemory; | 11 class SharedMemory; |
12 } | 12 } |
13 | 13 |
14 namespace gpu { | 14 namespace gpu { |
15 | 15 |
16 // Address and size of a buffer and optionally a shared memory object. This | 16 // Address and size of a buffer and optionally a shared memory object. This |
17 // type has value semantics. | 17 // type has value semantics. |
18 struct Buffer { | 18 struct Buffer { |
19 Buffer() : ptr(NULL), size(0), shared_memory(NULL) { | 19 Buffer() : ptr(NULL), size(0), shared_memory(NULL) { |
20 } | 20 } |
21 | 21 |
22 void* ptr; | 22 void* ptr; |
23 size_t size; | 23 size_t size; |
24 | 24 |
25 // Null if the buffer is not shared memory or if it is not exposed as such. | 25 // Null if the buffer is not shared memory or if it is not exposed as such. |
26 base::SharedMemory* shared_memory; | 26 base::SharedMemory* shared_memory; |
27 }; | 27 }; |
28 | 28 |
29 } // namespace gpu | 29 } // namespace gpu |
30 | 30 |
31 #endif // GPU_COMMAND_BUFFER_COMMON_BUFFER_H_ | 31 #endif // GPU_COMMAND_BUFFER_COMMON_BUFFER_H_ |
OLD | NEW |