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

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

Issue 2435803004: Initialize buffers before allowing access to them. (Closed)
Patch Set: win failure Created 4 years, 2 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
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_VERTEX_ATTRIB_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <vector> 12 #include <vector>
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "gpu/command_buffer/service/buffer_manager.h" 16 #include "gpu/command_buffer/service/buffer_manager.h"
17 #include "gpu/command_buffer/service/gl_utils.h" 17 #include "gpu/command_buffer/service/gl_utils.h"
18 #include "gpu/gpu_export.h" 18 #include "gpu/gpu_export.h"
19 19
20 namespace gpu { 20 namespace gpu {
21 namespace gles2 { 21 namespace gles2 {
22 22
23 class BufferManager;
23 class FeatureInfo; 24 class FeatureInfo;
24 class GLES2Decoder; 25 class GLES2Decoder;
25 class Program; 26 class Program;
26 class VertexArrayManager; 27 class VertexArrayManager;
27 28
28 // Info about a Vertex Attribute. This is used to track what the user currently 29 // Info about a Vertex Attribute. This is used to track what the user currently
29 // has bound on each Vertex Attribute so that checking can be done at 30 // has bound on each Vertex Attribute so that checking can be done at
30 // glDrawXXX time. 31 // glDrawXXX time.
31 class GPU_EXPORT VertexAttrib { 32 class GPU_EXPORT VertexAttrib {
32 public: 33 public:
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 265 }
265 266
266 size_t num_attribs() const { 267 size_t num_attribs() const {
267 return vertex_attribs_.size(); 268 return vertex_attribs_.size();
268 } 269 }
269 270
270 bool ValidateBindings( 271 bool ValidateBindings(
271 const char* function_name, 272 const char* function_name,
272 GLES2Decoder* decoder, 273 GLES2Decoder* decoder,
273 FeatureInfo* feature_info, 274 FeatureInfo* feature_info,
275 BufferManager* buffer_manager,
274 Program* current_program, 276 Program* current_program,
275 GLuint max_vertex_accessed, 277 GLuint max_vertex_accessed,
276 bool instanced, 278 bool instanced,
277 GLsizei primcount); 279 GLsizei primcount);
278 280
279 private: 281 private:
280 friend class VertexArrayManager; 282 friend class VertexArrayManager;
281 friend class VertexArrayManagerTest; 283 friend class VertexArrayManagerTest;
282 friend class base::RefCounted<VertexAttribManager>; 284 friend class base::RefCounted<VertexAttribManager>;
283 285
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 bool deleted_; 325 bool deleted_;
324 326
325 // Service side vertex array object id. 327 // Service side vertex array object id.
326 GLuint service_id_; 328 GLuint service_id_;
327 }; 329 };
328 330
329 } // namespace gles2 331 } // namespace gles2
330 } // namespace gpu 332 } // namespace gpu
331 333
332 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_ 334 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
333
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698