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

Side by Side Diff: gpu/command_buffer/service/buffer_manager.h

Issue 16690007: Revert 205207 "Merge 204571 "Add workaround for Mali-400 zero-si..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 6 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 | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('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 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 bool SetTarget(Buffer* buffer, GLenum target); 212 bool SetTarget(Buffer* buffer, GLenum target);
213 213
214 void set_allow_buffers_on_multiple_targets(bool allow) { 214 void set_allow_buffers_on_multiple_targets(bool allow) {
215 allow_buffers_on_multiple_targets_ = allow; 215 allow_buffers_on_multiple_targets_ = allow;
216 } 216 }
217 217
218 size_t mem_represented() const { 218 size_t mem_represented() const {
219 return memory_tracker_->GetMemRepresented(); 219 return memory_tracker_->GetMemRepresented();
220 } 220 }
221 221
222 // Tells for a given usage if this would be a client side array. 222 // Tell's for a given usage if this would be a client side array.
223 bool IsUsageClientSideArray(GLenum usage); 223 bool IsUsageClientSideArray(GLenum usage);
224 224
225 // Tells whether a buffer that is emulated using client-side arrays should be
226 // set to a non-zero size.
227 bool UseNonZeroSizeForClientSideArrayBuffer();
228
229 private: 225 private:
230 friend class Buffer; 226 friend class Buffer;
231 void StartTracking(Buffer* buffer); 227 void StartTracking(Buffer* buffer);
232 void StopTracking(Buffer* buffer); 228 void StopTracking(Buffer* buffer);
233 229
234 // Sets the size, usage and initial data of a buffer. 230 // Sets the size, usage and initial data of a buffer.
235 // If data is NULL buffer will be initialized to 0 if shadowed. 231 // If data is NULL buffer will be initialized to 0 if shadowed.
236 void SetInfo( 232 void SetInfo(
237 Buffer* buffer, GLsizeiptr size, GLenum usage, const GLvoid* data); 233 Buffer* buffer, GLsizeiptr size, GLenum usage, const GLvoid* data);
238 234
(...skipping 14 matching lines...) Expand all
253 bool have_context_; 249 bool have_context_;
254 bool use_client_side_arrays_for_stream_buffers_; 250 bool use_client_side_arrays_for_stream_buffers_;
255 251
256 DISALLOW_COPY_AND_ASSIGN(BufferManager); 252 DISALLOW_COPY_AND_ASSIGN(BufferManager);
257 }; 253 };
258 254
259 } // namespace gles2 255 } // namespace gles2
260 } // namespace gpu 256 } // namespace gpu
261 257
262 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 258 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698