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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2664963002: mus: Make --use-mus-in-renderer the default for --mash. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 gpu::GpuChannelEstablishFactory* factory = 1459 gpu::GpuChannelEstablishFactory* factory =
1460 GetContentClient()->browser()->GetGpuChannelEstablishFactory(); 1460 GetContentClient()->browser()->GetGpuChannelEstablishFactory();
1461 if (!factory) { 1461 if (!factory) {
1462 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); 1462 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1463 factory = BrowserGpuChannelHostFactory::instance(); 1463 factory = BrowserGpuChannelHostFactory::instance();
1464 } 1464 }
1465 DCHECK(factory); 1465 DCHECK(factory);
1466 ImageTransportFactory::Initialize(); 1466 ImageTransportFactory::Initialize();
1467 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); 1467 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory);
1468 #if defined(USE_AURA) 1468 #if defined(USE_AURA)
1469 bool use_mus_in_renderer = base::CommandLine::ForCurrentProcess()->HasSwitch( 1469 bool use_mus_in_renderer = !base::CommandLine::ForCurrentProcess()->HasSwitch(
1470 switches::kUseMusInRenderer); 1470 switches::kNoUseMusInRenderer);
1471 if (aura::Env::GetInstance() && !use_mus_in_renderer) { 1471 if (env_.get() &&
sky 2017/01/31 04:17:30 env_.get() -> env_. Also, Env::GetInstance() reall
sadrul 2017/01/31 15:45:13 I don't think so. I have removed this check.
1472 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1472 (!use_mus_in_renderer || env_->mode() == aura::Env::Mode::LOCAL)) {
1473 aura::Env::GetInstance()->set_context_factory_private( 1473 env_->set_context_factory(GetContextFactory());
1474 GetContextFactoryPrivate()); 1474 env_->set_context_factory_private(GetContextFactoryPrivate());
1475 } 1475 }
1476 #endif // defined(USE_AURA) 1476 #endif // defined(USE_AURA)
1477 #endif // defined(OS_ANDROID) 1477 #endif // defined(OS_ANDROID)
1478 1478
1479 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that 1479 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that
1480 // unregistration happens on the IO thread (See 1480 // unregistration happens on the IO thread (See
1481 // BrowserProcessSubThread::IOThreadPreCleanUp). 1481 // BrowserProcessSubThread::IOThreadPreCleanUp).
1482 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 1482 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1483 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager", 1483 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager",
1484 io_thread_->task_runner()); 1484 io_thread_->task_runner());
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 if (!audio_manager_) { 1790 if (!audio_manager_) {
1791 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1791 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1792 audio_manager_ = media::AudioManager::Create( 1792 audio_manager_ = media::AudioManager::Create(
1793 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1793 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1794 MediaInternals::GetInstance()); 1794 MediaInternals::GetInstance());
1795 } 1795 }
1796 CHECK(audio_manager_); 1796 CHECK(audio_manager_);
1797 } 1797 }
1798 1798
1799 } // namespace content 1799 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | content/public/common/content_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698