diff options
author | nduca@google.com <nduca@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-28 00:27:34 +0000 |
---|---|---|
committer | nduca@google.com <nduca@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-28 00:27:34 +0000 |
commit | 3e25dc3c954485b068da34a1b2378c6cfda42105 (patch) | |
tree | 917d05fa245f8042e44dfbb1a0d5b79dc3f5dcce /gpu/command_buffer | |
parent | 137455c494c1869a219f46ba4defff4a512928a4 (diff) | |
download | chromium_src-3e25dc3c954485b068da34a1b2378c6cfda42105.zip chromium_src-3e25dc3c954485b068da34a1b2378c6cfda42105.tar.gz chromium_src-3e25dc3c954485b068da34a1b2378c6cfda42105.tar.bz2 |
Disable flushers on CrOS to improve GPU process saturation during bulk texture uploads
We might want to have a flame war about this. But my intuition is that this is
a net-win, and that in the long run, this behavior should be up in WebGL
somewhere and that the compositor and ganesh should flush manually.
BUG=120548
R=jbates@chromium.org,jamesr@chromium.org,marcheu@chromium.org,piman@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9809013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rw-r--r-- | gpu/command_buffer/client/cmd_buffer_helper.cc | 2 | ||||
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc index 29770b8..f78bc34 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper.cc @@ -229,7 +229,7 @@ void CommandBufferHelper::WaitForAvailableEntries(int32 count) { if (pending > limit) { Flush(); } else if (commands_issued_ % kCommandsPerFlushCheck == 0) { -#if !defined(OS_ANDROID) +#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) // Allow this command buffer to be pre-empted by another if a "reasonable" // amount of work has been done. On highend machines, this reduces the // latency of GPU commands. However, on Android, this can cause the diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 504eca1..cf55bb1 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -2694,7 +2694,12 @@ void GLES2Implementation::UnmapBufferSubDataCHROMIUM(const void* mem) { helper_->BufferSubData( mb.target, mb.offset, mb.size, mb.shm_id, mb.shm_offset); mapped_memory_->FreePendingToken(mb.shm_memory, helper_->InsertToken()); + // Flushing after unmap lets the service side start processing commands + // sooner. However, on lowend devices, the thread thrashing causes is + // worse than the latency hit. +#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) helper_->CommandBufferHelper::Flush(); +#endif mapped_buffers_.erase(it); } @@ -2767,7 +2772,9 @@ void GLES2Implementation::UnmapTexSubImage2DCHROMIUM(const void* mem) { mt.target, mt.level, mt.xoffset, mt.yoffset, mt.width, mt.height, mt.format, mt.type, mt.shm_id, mt.shm_offset, GL_FALSE); mapped_memory_->FreePendingToken(mt.shm_memory, helper_->InsertToken()); +#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) helper_->CommandBufferHelper::Flush(); +#endif mapped_textures_.erase(it); } |