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

Unified Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 10441140: Make context groups share a TextureBufferManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months 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
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 a9c432dcb2536988da90ca89a0bd8de4ea28200c..a2a9d39b2cfc163936b29860c0df4d3839588d3e 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -30,6 +30,7 @@
#include "gpu/command_buffer/common/constants.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/context_group.h"
+#include "gpu/command_buffer/service/transfer_buffer_manager.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
@@ -46,6 +47,8 @@ using gpu::gles2::GLES2CmdHelper;
using gpu::gles2::GLES2Implementation;
using gpu::GpuScheduler;
using gpu::TransferBuffer;
+using gpu::TransferBufferManager;
+using gpu::TransferBufferManagerInterface;
namespace webkit {
namespace gpu {
@@ -158,6 +161,7 @@ class GLInProcessContext : public base::SupportsWeakPtr<GLInProcessContext> {
base::WeakPtr<GLInProcessContext> parent_;
base::Closure context_lost_callback_;
uint32 parent_texture_id_;
+ scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
scoped_ptr<CommandBufferService> command_buffer_;
scoped_ptr< ::gpu::GpuScheduler> gpu_scheduler_;
scoped_ptr< ::gpu::gles2::GLES2Decoder> decoder_;
@@ -391,7 +395,14 @@ bool GLInProcessContext::Initialize(const gfx::Size& size,
}
}
- command_buffer_.reset(new CommandBufferService);
+ {
+ TransferBufferManager* manager = new TransferBufferManager();
+ transfer_buffer_manager_.reset(manager);
+ manager->Initialize();
+ }
+
+ command_buffer_.reset(
+ new CommandBufferService(transfer_buffer_manager_.get()));
if (!command_buffer_->Initialize()) {
LOG(ERROR) << "Could not initialize command buffer.";
Destroy();

Powered by Google App Engine
This is Rietveld 408576698