OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains the definition of the RingBuffer class. | 5 // This file contains the definition of the RingBuffer class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ |
8 #define GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ | 8 #define GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
11 | 11 |
12 #include "../../gpu_export.h" | 12 #include "gpu/command_buffer/common/logging.h" |
13 #include "../common/logging.h" | 13 #include "gpu/command_buffer/common/types.h" |
14 #include "../common/types.h" | 14 #include "gpu/gpu_export.h" |
15 | 15 |
16 namespace gpu { | 16 namespace gpu { |
17 class CommandBufferHelper; | 17 class CommandBufferHelper; |
18 | 18 |
19 // RingBuffer manages a piece of memory as a ring buffer. Memory is allocated | 19 // RingBuffer manages a piece of memory as a ring buffer. Memory is allocated |
20 // with Alloc and then a is freed pending a token with FreePendingToken. Old | 20 // with Alloc and then a is freed pending a token with FreePendingToken. Old |
21 // allocations must not be kept past new allocations. | 21 // allocations must not be kept past new allocations. |
22 class GPU_EXPORT RingBuffer { | 22 class GPU_EXPORT RingBuffer { |
23 public: | 23 public: |
24 typedef unsigned int Offset; | 24 typedef unsigned int Offset; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 private: | 190 private: |
191 RingBuffer allocator_; | 191 RingBuffer allocator_; |
192 void* base_; | 192 void* base_; |
193 DISALLOW_IMPLICIT_CONSTRUCTORS(RingBufferWrapper); | 193 DISALLOW_IMPLICIT_CONSTRUCTORS(RingBufferWrapper); |
194 }; | 194 }; |
195 | 195 |
196 } // namespace gpu | 196 } // namespace gpu |
197 | 197 |
198 #endif // GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ | 198 #endif // GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ |
OLD | NEW |