summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 19:10:54 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 19:10:54 +0000
commitc41b93b799416ffaba84a92a688dc2882f2c01f3 (patch)
tree2d5546206ed2ea2bce219e037b05af7a18ab3010 /gpu
parentac4af82ff0e12f045f2b0b4625718ed4e56ed21e (diff)
downloadchromium_src-c41b93b799416ffaba84a92a688dc2882f2c01f3.zip
chromium_src-c41b93b799416ffaba84a92a688dc2882f2c01f3.tar.gz
chromium_src-c41b93b799416ffaba84a92a688dc2882f2c01f3.tar.bz2
Move flush call after resource deletion into SharedIdHandler
The SharedIdHandler is the only id allocator that makes client ids available to other contexts in the share group, so it's the only one that needs a Flush() call on resource deletion. Additionally it only needs a command buffer level flush to ensure execution order and not a glFlush(). BUG=none Review URL: http://codereview.chromium.org/8508043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index f6d8696..5fce838 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -115,6 +115,9 @@ class SharedIdHandler : public IdHandlerInterface {
virtual bool FreeIds(GLsizei n, const GLuint* ids) {
gles2_->DeleteSharedIdsCHROMIUM(id_namespace_, n, ids);
+ // We need to ensure that the delete call is evaluated on the service side
+ // before any other contexts issue commands using these client ids.
+ gles2_->helper()->CommandBufferHelper::Flush();
return true;
}
@@ -1101,7 +1104,6 @@ bool GLES2Implementation::DeleteProgramHelper(GLuint program) {
}
program_info_manager_->DeleteInfo(program);
helper_->DeleteProgram(program);
- Flush();
return true;
}
@@ -1114,7 +1116,6 @@ bool GLES2Implementation::DeleteShaderHelper(GLuint shader) {
}
program_info_manager_->DeleteInfo(shader);
helper_->DeleteShader(shader);
- Flush();
return true;
}
@@ -2148,7 +2149,6 @@ void GLES2Implementation::DeleteBuffersHelper(
}
}
helper_->DeleteBuffersImmediate(n, buffers);
- Flush();
}
void GLES2Implementation::DeleteFramebuffersHelper(
@@ -2165,7 +2165,6 @@ void GLES2Implementation::DeleteFramebuffersHelper(
}
}
helper_->DeleteFramebuffersImmediate(n, framebuffers);
- Flush();
}
void GLES2Implementation::DeleteRenderbuffersHelper(
@@ -2182,7 +2181,6 @@ void GLES2Implementation::DeleteRenderbuffersHelper(
}
}
helper_->DeleteRenderbuffersImmediate(n, renderbuffers);
- Flush();
}
void GLES2Implementation::DeleteTexturesHelper(
@@ -2205,7 +2203,6 @@ void GLES2Implementation::DeleteTexturesHelper(
}
}
helper_->DeleteTexturesImmediate(n, textures);
- Flush();
}
void GLES2Implementation::DisableVertexAttribArray(GLuint index) {