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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/client/gles2_implementation_autogen.h
===================================================================
--- gpu/command_buffer/client/gles2_implementation_autogen.h (revision 45605)
+++ gpu/command_buffer/client/gles2_implementation_autogen.h (working copy)
@@ -20,34 +20,34 @@
void BindAttribLocation(GLuint program, GLuint index, const char* name);
void BindFramebuffer(GLenum target, GLuint framebuffer) {
- if (IsReservedId(framebuffer)) {
+ if (IsFramebufferReservedId(framebuffer)) {
SetGLError(GL_INVALID_OPERATION);
return;
}
if (framebuffer != 0) {
- id_allocator_.MarkAsUsed(framebuffer);
+ framebuffer_id_allocator_.MarkAsUsed(framebuffer);
}
helper_->BindFramebuffer(target, framebuffer);
}
void BindRenderbuffer(GLenum target, GLuint renderbuffer) {
- if (IsReservedId(renderbuffer)) {
+ if (IsRenderbufferReservedId(renderbuffer)) {
SetGLError(GL_INVALID_OPERATION);
return;
}
if (renderbuffer != 0) {
- id_allocator_.MarkAsUsed(renderbuffer);
+ renderbuffer_id_allocator_.MarkAsUsed(renderbuffer);
}
helper_->BindRenderbuffer(target, renderbuffer);
}
void BindTexture(GLenum target, GLuint texture) {
- if (IsReservedId(texture)) {
+ if (IsTextureReservedId(texture)) {
SetGLError(GL_INVALID_OPERATION);
return;
}
if (texture != 0) {
- id_allocator_.MarkAsUsed(texture);
+ texture_id_allocator_.MarkAsUsed(texture);
}
helper_->BindTexture(target, texture);
}
@@ -154,14 +154,14 @@
GLuint CreateProgram() {
GLuint client_id;
- MakeIds(1, &client_id);
+ MakeIds(&program_and_shader_id_allocator_, 1, &client_id);
helper_->CreateProgram(client_id);
return client_id;
}
GLuint CreateShader(GLenum type) {
GLuint client_id;
- MakeIds(1, &client_id);
+ MakeIds(&program_and_shader_id_allocator_, 1, &client_id);
helper_->CreateShader(type, client_id);
return client_id;
}
@@ -171,7 +171,7 @@
}
void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
- FreeIds(n, framebuffers);
+ FreeIds(&framebuffer_id_allocator_, n, framebuffers);
helper_->DeleteFramebuffersImmediate(n, framebuffers);
}
@@ -180,7 +180,7 @@
}
void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
- FreeIds(n, renderbuffers);
+ FreeIds(&renderbuffer_id_allocator_, n, renderbuffers);
helper_->DeleteRenderbuffersImmediate(n, renderbuffers);
}
@@ -189,7 +189,7 @@
}
void DeleteTextures(GLsizei n, const GLuint* textures) {
- FreeIds(n, textures);
+ FreeIds(&texture_id_allocator_, n, textures);
helper_->DeleteTexturesImmediate(n, textures);
}
@@ -242,7 +242,7 @@
}
void GenBuffers(GLsizei n, GLuint* buffers) {
- MakeIds(n, buffers);
+ MakeIds(&buffer_id_allocator_, n, buffers);
helper_->GenBuffersImmediate(n, buffers);
}
@@ -251,17 +251,17 @@
}
void GenFramebuffers(GLsizei n, GLuint* framebuffers) {
- MakeIds(n, framebuffers);
+ MakeIds(&framebuffer_id_allocator_, n, framebuffers);
helper_->GenFramebuffersImmediate(n, framebuffers);
}
void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
- MakeIds(n, renderbuffers);
+ MakeIds(&renderbuffer_id_allocator_, n, renderbuffers);
helper_->GenRenderbuffersImmediate(n, renderbuffers);
}
void GenTextures(GLsizei n, GLuint* textures) {
- MakeIds(n, textures);
+ MakeIds(&texture_id_allocator_, n, textures);
helper_->GenTexturesImmediate(n, textures);
}
« 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