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

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

Issue 477623004: command_buffer: Support instanced path rendering in gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-03-path-funcs
Patch Set: fix msvc signedness warning in an unittest Created 5 years, 1 month 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
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 #ifndef GPU_COMMAND_BUFFER_CLIENT_TRANSFER_BUFFER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_TRANSFER_BUFFER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_TRANSFER_BUFFER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_TRANSFER_BUFFER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "gpu/command_buffer/client/ring_buffer.h" 10 #include "gpu/command_buffer/client/ring_buffer.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 unsigned int size, 139 unsigned int size,
140 CommandBufferHelper* helper, 140 CommandBufferHelper* helper,
141 TransferBufferInterface* transfer_buffer) 141 TransferBufferInterface* transfer_buffer)
142 : buffer_(NULL), 142 : buffer_(NULL),
143 size_(0), 143 size_(0),
144 helper_(helper), 144 helper_(helper),
145 transfer_buffer_(transfer_buffer) { 145 transfer_buffer_(transfer_buffer) {
146 Reset(size); 146 Reset(size);
147 } 147 }
148 148
149 // Constructs an empty and invalid allocation that should be Reset() later.
150 ScopedTransferBufferPtr(CommandBufferHelper* helper,
151 TransferBufferInterface* transfer_buffer)
152 : buffer_(NULL),
153 size_(0),
154 helper_(helper),
155 transfer_buffer_(transfer_buffer) {}
156
149 ~ScopedTransferBufferPtr() { 157 ~ScopedTransferBufferPtr() {
150 Release(); 158 Release();
151 } 159 }
152 160
153 bool valid() const { 161 bool valid() const {
154 return buffer_ != NULL; 162 return buffer_ != NULL;
155 } 163 }
156 164
157 unsigned int size() const { 165 unsigned int size() const {
158 return size_; 166 return size_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 207 }
200 208
201 unsigned int num_elements() const { 209 unsigned int num_elements() const {
202 return size() / sizeof(T); 210 return size() / sizeof(T);
203 } 211 }
204 }; 212 };
205 213
206 } // namespace gpu 214 } // namespace gpu
207 215
208 #endif // GPU_COMMAND_BUFFER_CLIENT_TRANSFER_BUFFER_H_ 216 #endif // GPU_COMMAND_BUFFER_CLIENT_TRANSFER_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698