Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(885)

Unified Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 8919014: Revert "Revert 113479 - Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc ('k') | webkit/plugins/ppapi/ppb_graphics_3d_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index 9daaa745aa42b61637240400d1247b6577d68f2a..dd1db2e29bdf1cc761191404e70f307c38687a36 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()));
« no previous file with comments | « ppapi/thunk/ppb_graphics_3d_trusted_thunk.cc ('k') | webkit/plugins/ppapi/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698