Index: gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
index a5a5091eed8901a1962b807c87dab330f03b722f..2be26ed3e2d6b9687ae6fcd1fcd5408edbf9d383 100644 |
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
@@ -446,7 +446,7 @@ GLuint GLES2Implementation::CreateProgram() { |
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateProgram(" |
<< ")"); |
GLuint client_id; |
- GetIdHandler(id_namespaces::kProgramsAndShaders) |
+ GetIdHandler(SharedIdNamespaces::kProgramsAndShaders) |
->MakeIds(this, 0, 1, &client_id); |
helper_->CreateProgram(client_id); |
GPU_CLIENT_LOG("returned " << client_id); |
@@ -459,7 +459,7 @@ GLuint GLES2Implementation::CreateShader(GLenum type) { |
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCreateShader(" |
<< GLES2Util::GetStringShaderType(type) << ")"); |
GLuint client_id; |
- GetIdHandler(id_namespaces::kProgramsAndShaders) |
+ GetIdHandler(SharedIdNamespaces::kProgramsAndShaders) |
->MakeIds(this, 0, 1, &client_id); |
helper_->CreateShader(type, client_id); |
GPU_CLIENT_LOG("returned " << client_id); |
@@ -681,7 +681,7 @@ GLsync GLES2Implementation::FenceSync(GLenum condition, GLbitfield flags) { |
return 0; |
} |
GLuint client_id; |
- GetIdHandler(id_namespaces::kSyncs)->MakeIds(this, 0, 1, &client_id); |
+ GetIdHandler(SharedIdNamespaces::kSyncs)->MakeIds(this, 0, 1, &client_id); |
helper_->FenceSync(client_id); |
GPU_CLIENT_LOG("returned " << client_id); |
CheckGLError(); |
@@ -749,7 +749,7 @@ void GLES2Implementation::GenBuffers(GLsizei n, GLuint* buffers) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kBuffers)->MakeIds(this, 0, n, buffers); |
+ GetIdHandler(SharedIdNamespaces::kBuffers)->MakeIds(this, 0, n, buffers); |
GenBuffersHelper(n, buffers); |
helper_->GenBuffersImmediate(n, buffers); |
if (share_group_->bind_generates_resource()) |
@@ -778,11 +778,11 @@ void GLES2Implementation::GenFramebuffers(GLsizei n, GLuint* framebuffers) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kFramebuffers)->MakeIds(this, 0, n, framebuffers); |
+ IdAllocator* id_allocator = GetIdAllocator(IdNamespaces::kFramebuffers); |
+ for (GLsizei ii = 0; ii < n; ++ii) |
+ framebuffers[ii] = id_allocator->AllocateID(); |
GenFramebuffersHelper(n, framebuffers); |
helper_->GenFramebuffersImmediate(n, framebuffers); |
- if (share_group_->bind_generates_resource()) |
- helper_->CommandBufferHelper::Flush(); |
GPU_CLIENT_LOG_CODE_BLOCK({ |
for (GLsizei i = 0; i < n; ++i) { |
GPU_CLIENT_LOG(" " << i << ": " << framebuffers[i]); |
@@ -799,7 +799,7 @@ void GLES2Implementation::GenRenderbuffers(GLsizei n, GLuint* renderbuffers) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kRenderbuffers) |
+ GetIdHandler(SharedIdNamespaces::kRenderbuffers) |
->MakeIds(this, 0, n, renderbuffers); |
GenRenderbuffersHelper(n, renderbuffers); |
helper_->GenRenderbuffersImmediate(n, renderbuffers); |
@@ -821,7 +821,7 @@ void GLES2Implementation::GenSamplers(GLsizei n, GLuint* samplers) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kSamplers)->MakeIds(this, 0, n, samplers); |
+ GetIdHandler(SharedIdNamespaces::kSamplers)->MakeIds(this, 0, n, samplers); |
GenSamplersHelper(n, samplers); |
helper_->GenSamplersImmediate(n, samplers); |
if (share_group_->bind_generates_resource()) |
@@ -842,7 +842,7 @@ void GLES2Implementation::GenTextures(GLsizei n, GLuint* textures) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kTextures)->MakeIds(this, 0, n, textures); |
+ GetIdHandler(SharedIdNamespaces::kTextures)->MakeIds(this, 0, n, textures); |
GenTexturesHelper(n, textures); |
helper_->GenTexturesImmediate(n, textures); |
if (share_group_->bind_generates_resource()) |
@@ -863,11 +863,11 @@ void GLES2Implementation::GenTransformFeedbacks(GLsizei n, GLuint* ids) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kTransformFeedbacks)->MakeIds(this, 0, n, ids); |
+ IdAllocator* id_allocator = GetIdAllocator(IdNamespaces::kTransformFeedbacks); |
+ for (GLsizei ii = 0; ii < n; ++ii) |
+ ids[ii] = id_allocator->AllocateID(); |
GenTransformFeedbacksHelper(n, ids); |
helper_->GenTransformFeedbacksImmediate(n, ids); |
- if (share_group_->bind_generates_resource()) |
- helper_->CommandBufferHelper::Flush(); |
GPU_CLIENT_LOG_CODE_BLOCK({ |
for (GLsizei i = 0; i < n; ++i) { |
GPU_CLIENT_LOG(" " << i << ": " << ids[i]); |
@@ -2926,13 +2926,11 @@ void GLES2Implementation::GenQueriesEXT(GLsizei n, GLuint* queries) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- IdAllocator* id_allocator = GetIdAllocator(id_namespaces::kQueries); |
+ IdAllocator* id_allocator = GetIdAllocator(IdNamespaces::kQueries); |
for (GLsizei ii = 0; ii < n; ++ii) |
queries[ii] = id_allocator->AllocateID(); |
GenQueriesEXTHelper(n, queries); |
helper_->GenQueriesEXTImmediate(n, queries); |
- if (share_group_->bind_generates_resource()) |
- helper_->CommandBufferHelper::Flush(); |
GPU_CLIENT_LOG_CODE_BLOCK({ |
for (GLsizei i = 0; i < n; ++i) { |
GPU_CLIENT_LOG(" " << i << ": " << queries[i]); |
@@ -2989,11 +2987,11 @@ void GLES2Implementation::GenVertexArraysOES(GLsizei n, GLuint* arrays) { |
return; |
} |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
- GetIdHandler(id_namespaces::kVertexArrays)->MakeIds(this, 0, n, arrays); |
+ IdAllocator* id_allocator = GetIdAllocator(IdNamespaces::kVertexArrays); |
+ for (GLsizei ii = 0; ii < n; ++ii) |
+ arrays[ii] = id_allocator->AllocateID(); |
GenVertexArraysOESHelper(n, arrays); |
helper_->GenVertexArraysOESImmediate(n, arrays); |
- if (share_group_->bind_generates_resource()) |
- helper_->CommandBufferHelper::Flush(); |
GPU_CLIENT_LOG_CODE_BLOCK({ |
for (GLsizei i = 0; i < n; ++i) { |
GPU_CLIENT_LOG(" " << i << ": " << arrays[i]); |