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

Unified Diff: gpu/command_buffer/service/context_group.cc

Issue 515943002: Manual fixups in gpu/ for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 4 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
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fc42c1dd6d8f85fbfdbc2868a1bd97379ec01c51..5225896cfa9939cb563795f4b7b6a66870e83410 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -28,12 +28,12 @@ namespace gpu {
namespace gles2 {
ContextGroup::ContextGroup(
- MailboxManager* mailbox_manager,
- MemoryTracker* memory_tracker,
- ShaderTranslatorCache* shader_translator_cache,
- FeatureInfo* feature_info,
+ const scoped_refptr<MailboxManager>& mailbox_manager,
+ const scoped_refptr<MemoryTracker>& memory_tracker,
+ const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
+ const scoped_refptr<FeatureInfo>& feature_info,
bool bind_generates_resource)
- : mailbox_manager_(mailbox_manager ? mailbox_manager : new MailboxManager),
+ : mailbox_manager_(mailbox_manager),
memory_tracker_(memory_tracker),
shader_translator_cache_(shader_translator_cache),
enforce_gl_minimums_(CommandLine::ForCurrentProcess()->HasSwitch(
@@ -49,9 +49,13 @@ ContextGroup::ContextGroup(
max_color_attachments_(1u),
max_draw_buffers_(1u),
program_cache_(NULL),
- feature_info_(feature_info ? feature_info : new FeatureInfo),
+ feature_info_(feature_info),
draw_buffer_(GL_BACK) {
{
+ if (!mailbox_manager_.get())
+ mailbox_manager_ = new MailboxManager;
+ if (!feature_info.get())
+ feature_info_ = new FeatureInfo;
TransferBufferManager* manager = new TransferBufferManager();
transfer_buffer_manager_.reset(manager);
manager->Initialize();
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698