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

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

Issue 1747013: Changes the code to use separate ids namspaces... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 is auto-generated. DO NOT EDIT! 5 // This file is auto-generated. DO NOT EDIT!
6 6
7 // This file is included by gles2_implementation.h to declare the 7 // This file is included by gles2_implementation.h to declare the
8 // GL api functions. 8 // GL api functions.
9 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ 9 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
10 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ 10 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
11 11
12 void ActiveTexture(GLenum texture) { 12 void ActiveTexture(GLenum texture) {
13 helper_->ActiveTexture(texture); 13 helper_->ActiveTexture(texture);
14 } 14 }
15 15
16 void AttachShader(GLuint program, GLuint shader) { 16 void AttachShader(GLuint program, GLuint shader) {
17 helper_->AttachShader(program, shader); 17 helper_->AttachShader(program, shader);
18 } 18 }
19 19
20 void BindAttribLocation(GLuint program, GLuint index, const char* name); 20 void BindAttribLocation(GLuint program, GLuint index, const char* name);
21 21
22 void BindFramebuffer(GLenum target, GLuint framebuffer) { 22 void BindFramebuffer(GLenum target, GLuint framebuffer) {
23 if (IsReservedId(framebuffer)) { 23 if (IsFramebufferReservedId(framebuffer)) {
24 SetGLError(GL_INVALID_OPERATION); 24 SetGLError(GL_INVALID_OPERATION);
25 return; 25 return;
26 } 26 }
27 if (framebuffer != 0) { 27 if (framebuffer != 0) {
28 id_allocator_.MarkAsUsed(framebuffer); 28 framebuffer_id_allocator_.MarkAsUsed(framebuffer);
29 } 29 }
30 helper_->BindFramebuffer(target, framebuffer); 30 helper_->BindFramebuffer(target, framebuffer);
31 } 31 }
32 32
33 void BindRenderbuffer(GLenum target, GLuint renderbuffer) { 33 void BindRenderbuffer(GLenum target, GLuint renderbuffer) {
34 if (IsReservedId(renderbuffer)) { 34 if (IsRenderbufferReservedId(renderbuffer)) {
35 SetGLError(GL_INVALID_OPERATION); 35 SetGLError(GL_INVALID_OPERATION);
36 return; 36 return;
37 } 37 }
38 if (renderbuffer != 0) { 38 if (renderbuffer != 0) {
39 id_allocator_.MarkAsUsed(renderbuffer); 39 renderbuffer_id_allocator_.MarkAsUsed(renderbuffer);
40 } 40 }
41 helper_->BindRenderbuffer(target, renderbuffer); 41 helper_->BindRenderbuffer(target, renderbuffer);
42 } 42 }
43 43
44 void BindTexture(GLenum target, GLuint texture) { 44 void BindTexture(GLenum target, GLuint texture) {
45 if (IsReservedId(texture)) { 45 if (IsTextureReservedId(texture)) {
46 SetGLError(GL_INVALID_OPERATION); 46 SetGLError(GL_INVALID_OPERATION);
47 return; 47 return;
48 } 48 }
49 if (texture != 0) { 49 if (texture != 0) {
50 id_allocator_.MarkAsUsed(texture); 50 texture_id_allocator_.MarkAsUsed(texture);
51 } 51 }
52 helper_->BindTexture(target, texture); 52 helper_->BindTexture(target, texture);
53 } 53 }
54 54
55 void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { 55 void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
56 helper_->BlendColor(red, green, blue, alpha); 56 helper_->BlendColor(red, green, blue, alpha);
57 } 57 }
58 58
59 void BlendEquation(GLenum mode) { 59 void BlendEquation(GLenum mode) {
60 helper_->BlendEquation(mode); 60 helper_->BlendEquation(mode);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (height < 0) { 147 if (height < 0) {
148 SetGLError(GL_INVALID_VALUE); 148 SetGLError(GL_INVALID_VALUE);
149 return; 149 return;
150 } 150 }
151 helper_->CopyTexSubImage2D( 151 helper_->CopyTexSubImage2D(
152 target, level, xoffset, yoffset, x, y, width, height); 152 target, level, xoffset, yoffset, x, y, width, height);
153 } 153 }
154 154
155 GLuint CreateProgram() { 155 GLuint CreateProgram() {
156 GLuint client_id; 156 GLuint client_id;
157 MakeIds(1, &client_id); 157 MakeIds(&program_and_shader_id_allocator_, 1, &client_id);
158 helper_->CreateProgram(client_id); 158 helper_->CreateProgram(client_id);
159 return client_id; 159 return client_id;
160 } 160 }
161 161
162 GLuint CreateShader(GLenum type) { 162 GLuint CreateShader(GLenum type) {
163 GLuint client_id; 163 GLuint client_id;
164 MakeIds(1, &client_id); 164 MakeIds(&program_and_shader_id_allocator_, 1, &client_id);
165 helper_->CreateShader(type, client_id); 165 helper_->CreateShader(type, client_id);
166 return client_id; 166 return client_id;
167 } 167 }
168 168
169 void CullFace(GLenum mode) { 169 void CullFace(GLenum mode) {
170 helper_->CullFace(mode); 170 helper_->CullFace(mode);
171 } 171 }
172 172
173 void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { 173 void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
174 FreeIds(n, framebuffers); 174 FreeIds(&framebuffer_id_allocator_, n, framebuffers);
175 helper_->DeleteFramebuffersImmediate(n, framebuffers); 175 helper_->DeleteFramebuffersImmediate(n, framebuffers);
176 } 176 }
177 177
178 void DeleteProgram(GLuint program) { 178 void DeleteProgram(GLuint program) {
179 helper_->DeleteProgram(program); 179 helper_->DeleteProgram(program);
180 } 180 }
181 181
182 void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { 182 void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
183 FreeIds(n, renderbuffers); 183 FreeIds(&renderbuffer_id_allocator_, n, renderbuffers);
184 helper_->DeleteRenderbuffersImmediate(n, renderbuffers); 184 helper_->DeleteRenderbuffersImmediate(n, renderbuffers);
185 } 185 }
186 186
187 void DeleteShader(GLuint shader) { 187 void DeleteShader(GLuint shader) {
188 helper_->DeleteShader(shader); 188 helper_->DeleteShader(shader);
189 } 189 }
190 190
191 void DeleteTextures(GLsizei n, const GLuint* textures) { 191 void DeleteTextures(GLsizei n, const GLuint* textures) {
192 FreeIds(n, textures); 192 FreeIds(&texture_id_allocator_, n, textures);
193 helper_->DeleteTexturesImmediate(n, textures); 193 helper_->DeleteTexturesImmediate(n, textures);
194 } 194 }
195 195
196 void DepthFunc(GLenum func) { 196 void DepthFunc(GLenum func) {
197 helper_->DepthFunc(func); 197 helper_->DepthFunc(func);
198 } 198 }
199 199
200 void DepthMask(GLboolean flag) { 200 void DepthMask(GLboolean flag) {
201 helper_->DepthMask(flag); 201 helper_->DepthMask(flag);
202 } 202 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 GLenum target, GLenum attachment, GLenum textarget, GLuint texture, 235 GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
236 GLint level) { 236 GLint level) {
237 helper_->FramebufferTexture2D(target, attachment, textarget, texture, level); 237 helper_->FramebufferTexture2D(target, attachment, textarget, texture, level);
238 } 238 }
239 239
240 void FrontFace(GLenum mode) { 240 void FrontFace(GLenum mode) {
241 helper_->FrontFace(mode); 241 helper_->FrontFace(mode);
242 } 242 }
243 243
244 void GenBuffers(GLsizei n, GLuint* buffers) { 244 void GenBuffers(GLsizei n, GLuint* buffers) {
245 MakeIds(n, buffers); 245 MakeIds(&buffer_id_allocator_, n, buffers);
246 helper_->GenBuffersImmediate(n, buffers); 246 helper_->GenBuffersImmediate(n, buffers);
247 } 247 }
248 248
249 void GenerateMipmap(GLenum target) { 249 void GenerateMipmap(GLenum target) {
250 helper_->GenerateMipmap(target); 250 helper_->GenerateMipmap(target);
251 } 251 }
252 252
253 void GenFramebuffers(GLsizei n, GLuint* framebuffers) { 253 void GenFramebuffers(GLsizei n, GLuint* framebuffers) {
254 MakeIds(n, framebuffers); 254 MakeIds(&framebuffer_id_allocator_, n, framebuffers);
255 helper_->GenFramebuffersImmediate(n, framebuffers); 255 helper_->GenFramebuffersImmediate(n, framebuffers);
256 } 256 }
257 257
258 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { 258 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
259 MakeIds(n, renderbuffers); 259 MakeIds(&renderbuffer_id_allocator_, n, renderbuffers);
260 helper_->GenRenderbuffersImmediate(n, renderbuffers); 260 helper_->GenRenderbuffersImmediate(n, renderbuffers);
261 } 261 }
262 262
263 void GenTextures(GLsizei n, GLuint* textures) { 263 void GenTextures(GLsizei n, GLuint* textures) {
264 MakeIds(n, textures); 264 MakeIds(&texture_id_allocator_, n, textures);
265 helper_->GenTexturesImmediate(n, textures); 265 helper_->GenTexturesImmediate(n, textures);
266 } 266 }
267 267
268 void GetActiveAttrib( 268 void GetActiveAttrib(
269 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, 269 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size,
270 GLenum* type, char* name); 270 GLenum* type, char* name);
271 271
272 void GetActiveUniform( 272 void GetActiveUniform(
273 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, 273 GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size,
274 GLenum* type, char* name); 274 GLenum* type, char* name);
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 Result* result = GetResultAs<Result*>(); 752 Result* result = GetResultAs<Result*>();
753 *result = 0; 753 *result = 0;
754 helper_->GetMaxValueInBuffer( 754 helper_->GetMaxValueInBuffer(
755 buffer_id, count, type, offset, result_shm_id(), result_shm_offset()); 755 buffer_id, count, type, offset, result_shm_id(), result_shm_offset());
756 WaitForCmd(); 756 WaitForCmd();
757 return *result; 757 return *result;
758 } 758 }
759 759
760 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_ 760 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_AUTOGEN_H_
761 761
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698