summaryrefslogtreecommitdiffstats
path: root/webkit/gpu
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-12 23:29:40 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-12 23:29:40 +0000
commit503b3a2ed9be72b3697f1c02cdc7efd29fec987a (patch)
treef715ec00989bded6c3bdb3919cace05a7d33fc05 /webkit/gpu
parent6e6f8836c975eebd3620974c3de6d564967821e9 (diff)
downloadchromium_src-503b3a2ed9be72b3697f1c02cdc7efd29fec987a.zip
chromium_src-503b3a2ed9be72b3697f1c02cdc7efd29fec987a.tar.gz
chromium_src-503b3a2ed9be72b3697f1c02cdc7efd29fec987a.tar.bz2
Revert "Revert 113479 - Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer""
This reverts commit 84677847c10d0319d8d996aea9b310add85c0bd3. TEST=ran browser tests on OSX BUG=103989 TBR=apatrick@chromiu.org Review URL: http://codereview.chromium.org/8919014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc10
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()));