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 "base/logging.h" | 12 #include "base/logging.h" |
13 #include "gpu/command_buffer/common/types.h" | 13 #include "base/macros.h" |
14 #include "gpu/gpu_export.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: |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 // The physical address that corresponds to base_offset. | 129 // The physical address that corresponds to base_offset. |
130 void* base_; | 130 void* base_; |
131 | 131 |
132 DISALLOW_IMPLICIT_CONSTRUCTORS(RingBuffer); | 132 DISALLOW_IMPLICIT_CONSTRUCTORS(RingBuffer); |
133 }; | 133 }; |
134 | 134 |
135 } // namespace gpu | 135 } // namespace gpu |
136 | 136 |
137 #endif // GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ | 137 #endif // GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ |
OLD | NEW |