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

Unified Diff: gpu/command_buffer/service/context_group.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: gpu/command_buffer/service/context_group.cc
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index 2b6c8efce6149ce3ddf7aa254962f82b4b9d0078..81fd606c64c591571f9fd60f848b4cf36b110313 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -18,13 +18,15 @@
#include "gpu/command_buffer/service/renderbuffer_manager.h"
#include "gpu/command_buffer/service/shader_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
+#include "gpu/command_buffer/service/transfer_buffer_manager.h"
#include "ui/gl/gl_implementation.h"
namespace gpu {
namespace gles2 {
-ContextGroup::ContextGroup(MailboxManager* mailbox_manager,
- bool bind_generates_resource)
+ContextGroup::ContextGroup(
+ MailboxManager* mailbox_manager,
+ bool bind_generates_resource)
: mailbox_manager_(mailbox_manager ? mailbox_manager : new MailboxManager),
num_contexts_(0),
enforce_gl_minimums_(CommandLine::ForCurrentProcess()->HasSwitch(
@@ -38,6 +40,12 @@ ContextGroup::ContextGroup(MailboxManager* mailbox_manager,
max_varying_vectors_(0u),
max_vertex_uniform_vectors_(0u),
feature_info_(new FeatureInfo()) {
+ {
+ TransferBufferManager* manager = new TransferBufferManager();
+ transfer_buffer_manager_.reset(manager);
+ manager->Initialize();
+ }
+
id_namespaces_[id_namespaces::kBuffers].reset(new IdAllocator);
id_namespaces_[id_namespaces::kFramebuffers].reset(new IdAllocator);
id_namespaces_[id_namespaces::kProgramsAndShaders].reset(

Powered by Google App Engine
This is Rietveld 408576698