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

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

Issue 2177513002: gpu: Avoid integer overflow when setting up client side buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_
7 7
8 #include <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void GenVertexArrays(GLsizei n, const GLuint* arrays); 45 void GenVertexArrays(GLsizei n, const GLuint* arrays);
46 46
47 // Deletes array objects for the given ids. 47 // Deletes array objects for the given ids.
48 void DeleteVertexArrays(GLsizei n, const GLuint* arrays); 48 void DeleteVertexArrays(GLsizei n, const GLuint* arrays);
49 49
50 // Binds a vertex array. 50 // Binds a vertex array.
51 // changed will be set to true if the service should be called. 51 // changed will be set to true if the service should be called.
52 // Returns false if array is an unknown id. 52 // Returns false if array is an unknown id.
53 bool BindVertexArray(GLuint array, bool* changed); 53 bool BindVertexArray(GLuint array, bool* changed);
54 54
55 // Whether client side buffers are supported.
56 bool SupportsClientSideBuffers();
57
55 // simulated will be set to true if buffers were simulated. 58 // simulated will be set to true if buffers were simulated.
56 // Returns true service should be called. 59 // Returns true service should be called.
57 bool SetupSimulatedClientSideBuffers( 60 bool SetupSimulatedClientSideBuffers(
58 const char* function_name, 61 const char* function_name,
59 GLES2Implementation* gl, 62 GLES2Implementation* gl,
60 GLES2CmdHelper* gl_helper, 63 GLES2CmdHelper* gl_helper,
61 GLsizei num_elements, 64 GLsizei num_elements,
62 GLsizei primcount, 65 GLsizei primcount,
63 bool* simulated); 66 bool* simulated);
64 67
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 const bool support_client_side_arrays_; 126 const bool support_client_side_arrays_;
124 127
125 DISALLOW_COPY_AND_ASSIGN(VertexArrayObjectManager); 128 DISALLOW_COPY_AND_ASSIGN(VertexArrayObjectManager);
126 }; 129 };
127 130
128 } // namespace gles2 131 } // namespace gles2
129 } // namespace gpu 132 } // namespace gpu
130 133
131 #endif // GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ 134 #endif // GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_
132 135
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698