summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 18:02:00 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-27 18:02:00 +0000
commit85a815ca044d81e4d32a7423a8975f2269f605ec (patch)
treea256f02ec26b15b9becd0c8b1f2cbc6fded58060 /gpu
parent504c9a7249e41dacd91bc1bd4426f717911f879d (diff)
downloadchromium_src-85a815ca044d81e4d32a7423a8975f2269f605ec.zip
chromium_src-85a815ca044d81e4d32a7423a8975f2269f605ec.tar.gz
chromium_src-85a815ca044d81e4d32a7423a8975f2269f605ec.tar.bz2
GPU service interprets glFinish as glFlush.
This is so the single threaded GPU service does not get delayed executing glFinish, which could prevent progress in rendering all other GL contexts. Instead just issue a glFlush to ensure that the pending commands will be processed in the future. From a client side perspective the semantics of glFlush and glFinish are still different. glFlush is asynchronous whereas glFinish is synchronous. The latter waits for the service to acknowledge that it has issued the glFlush. glFinish can therefore be used to synchronize multiple threads that are issuing commands to GL contexts that share a common namespace. TEST=trybots BUG=none Review URL: http://codereview.chromium.org/1719019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py6
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_autogen.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 64e9539..a7a067f 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1032,7 +1032,11 @@ _FUNCTION_INFO = {
'decoder_func': 'DoEnableVertexAttribArray',
'impl_decl': False,
},
- 'Finish': {'impl_func': False},
+ 'Finish': {
+ 'impl_func': False,
+ 'decoder_func': 'glFlush',
+ 'gl_test_func': 'glFlush',
+ },
'Flush': {'impl_func': False},
'FramebufferRenderbuffer': {
'decoder_func': 'DoFramebufferRenderbuffer',
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 45c2515..a1ea7da 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -671,7 +671,7 @@ error::Error GLES2DecoderImpl::HandleEnableVertexAttribArray(
error::Error GLES2DecoderImpl::HandleFinish(
uint32 immediate_data_size, const gles2::Finish& c) {
- glFinish();
+ glFlush();
return error::kNoError;
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
index fcec43f..dbad983 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
@@ -763,7 +763,7 @@ TEST_F(GLES2DecoderTest1, EnableVertexAttribArrayValidArgs) {
}
TEST_F(GLES2DecoderTest1, FinishValidArgs) {
- EXPECT_CALL(*gl_, Finish());
+ EXPECT_CALL(*gl_, Flush());
SpecializedSetup<Finish, 0>();
Finish cmd;
cmd.Init();