From ad3f1a3f48eafff9eab52bee5e955fcb4e1f4c30 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" Date: Thu, 28 Jul 2011 18:23:32 +0000 Subject: Insert a soft flush into the command buffer on unmapTexSubImage2D This does a CommandBufferHelper flush in UnmapTexSubImage2DCHROMIUM so the gpu process can start processing texture uploads as soon as the texture is unmapped instead of waiting until the next hard flush or finish. This increase parallelization for tile uploads, especially during compositor startup and when the entire root layer is damaged. On my linux z600, this cuts down on the time taken to initially composite the poster circle page measured from start of RenderWidget::DoDeferredUpdate to the first SwapBuffers completing from 100ms->50ms BUG=none TEST=none Review URL: http://codereview.chromium.org/7492060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94504 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/client/gles2_implementation.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gpu/command_buffer') diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index b11554a..a0f3dd3 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -2155,6 +2155,7 @@ 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()); + helper_->CommandBufferHelper::Flush(); mapped_buffers_.erase(it); } @@ -2225,6 +2226,7 @@ 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()); + helper_->CommandBufferHelper::Flush(); mapped_textures_.erase(it); } -- cgit v1.1