Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(706)

Side by Side Diff: gpu/command_buffer/client/ring_buffer.h

Issue 9582024: Revert 124702 - GPU: Buld most of the gpu as a single DLL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/client/mapped_memory.h ('k') | gpu/command_buffer/client/transfer_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
12 #include "../../gpu_export.h"
13 #include "../common/logging.h" 11 #include "../common/logging.h"
14 #include "../common/types.h" 12 #include "../common/types.h"
15 13
16 namespace gpu { 14 namespace gpu {
17 class CommandBufferHelper; 15 class CommandBufferHelper;
18 16
19 // RingBuffer manages a piece of memory as a ring buffer. Memory is allocated 17 // 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 18 // with Alloc and then a is freed pending a token with FreePendingToken. Old
21 // allocations must not be kept past new allocations. 19 // allocations must not be kept past new allocations.
22 class GPU_EXPORT RingBuffer { 20 class RingBuffer {
23 public: 21 public:
24 typedef unsigned int Offset; 22 typedef unsigned int Offset;
25 23
26 // Creates a RingBuffer. 24 // Creates a RingBuffer.
27 // Parameters: 25 // Parameters:
28 // base_offset: The offset of the start of the buffer. 26 // base_offset: The offset of the start of the buffer.
29 // size: The size of the buffer in bytes. 27 // size: The size of the buffer in bytes.
30 // helper: A CommandBufferHelper for dealing with tokens. 28 // helper: A CommandBufferHelper for dealing with tokens.
31 RingBuffer( 29 RingBuffer(
32 Offset base_offset, unsigned int size, CommandBufferHelper* helper); 30 Offset base_offset, unsigned int size, CommandBufferHelper* helper);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 187
190 private: 188 private:
191 RingBuffer allocator_; 189 RingBuffer allocator_;
192 void* base_; 190 void* base_;
193 DISALLOW_IMPLICIT_CONSTRUCTORS(RingBufferWrapper); 191 DISALLOW_IMPLICIT_CONSTRUCTORS(RingBufferWrapper);
194 }; 192 };
195 193
196 } // namespace gpu 194 } // namespace gpu
197 195
198 #endif // GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_ 196 #endif // GPU_COMMAND_BUFFER_CLIENT_RING_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/mapped_memory.h ('k') | gpu/command_buffer/client/transfer_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698