diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 22:06:18 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 22:06:18 +0000 |
commit | bb62ce3d7922d0bd07b066f6460c7cd00f946011 (patch) | |
tree | 22657f3db7f64c7b8ace37bb2a3d4d1e2426cba0 /webkit/gpu | |
parent | 481a6d899f7c9a4d3e029fa6553f6bec589b5564 (diff) | |
download | chromium_src-bb62ce3d7922d0bd07b066f6460c7cd00f946011.zip chromium_src-bb62ce3d7922d0bd07b066f6460c7cd00f946011.tar.gz chromium_src-bb62ce3d7922d0bd07b066f6460c7cd00f946011.tar.bz2 |
Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer"
This reverts commit bd45bd252aeb8babac62547a5c605fbf64287cd3.
TEST=ran webkit tests in DRT and webgl tests in chrome
BUG=103989
Review URL: http://codereview.chromium.org/8758026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 9daaa74..dd1db2e 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -86,6 +86,7 @@ class GLInProcessContext : public base::SupportsWeakPtr<GLInProcessContext> { ~GLInProcessContext(); void PumpCommands(); + bool GetBufferChanged(int32 transfer_buffer_id); // Create a GLInProcessContext that renders directly to a view. The view and // the associated window must not be destroyed until the returned @@ -311,6 +312,10 @@ void GLInProcessContext::PumpCommands() { CHECK(state.error == ::gpu::error::kNoError); } +bool GLInProcessContext::GetBufferChanged(int32 transfer_buffer_id) { + return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); +} + uint32 GLInProcessContext::GetParentTextureId() { return parent_texture_id_; } @@ -457,7 +462,7 @@ bool GLInProcessContext::Initialize(bool onscreen, } command_buffer_.reset(new CommandBufferService); - if (!command_buffer_->Initialize(kCommandBufferSize)) { + if (!command_buffer_->Initialize()) { LOG(ERROR) << "Could not initialize command buffer."; Destroy(); return false; @@ -523,6 +528,9 @@ bool GLInProcessContext::Initialize(bool onscreen, command_buffer_->SetPutOffsetChangeCallback( base::Bind(&GLInProcessContext::PumpCommands, base::Unretained(this))); + command_buffer_->SetGetBufferChangeCallback( + base::Bind( + &GLInProcessContext::GetBufferChanged, base::Unretained(this))); // Create the GLES2 helper, which writes the command buffer protocol. gles2_helper_.reset(new GLES2CmdHelper(command_buffer_.get())); |