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

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 (!use_mus_in_renderer || env_->mode() == aura::Env::Mode::LOCAL) {
1472 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1472 env_->set_context_factory(GetContextFactory());
1473 aura::Env::GetInstance()->set_context_factory_private( 1473 env_->set_context_factory_private(GetContextFactoryPrivate());
1474 GetContextFactoryPrivate());
1475 } 1474 }
1476 #endif // defined(USE_AURA) 1475 #endif // defined(USE_AURA)
1477 #endif // defined(OS_ANDROID) 1476 #endif // defined(OS_ANDROID)
1478 1477
1479 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that 1478 // Enable the GpuMemoryBuffer dump provider with IO thread affinity. Note that
1480 // unregistration happens on the IO thread (See 1479 // unregistration happens on the IO thread (See
1481 // BrowserProcessSubThread::IOThreadPreCleanUp). 1480 // BrowserProcessSubThread::IOThreadPreCleanUp).
1482 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 1481 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
1483 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager", 1482 BrowserGpuMemoryBufferManager::current(), "BrowserGpuMemoryBufferManager",
1484 io_thread_->task_runner()); 1483 io_thread_->task_runner());
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 if (!audio_manager_) { 1789 if (!audio_manager_) {
1791 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1790 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1792 audio_manager_ = media::AudioManager::Create( 1791 audio_manager_ = media::AudioManager::Create(
1793 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1792 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1794 MediaInternals::GetInstance()); 1793 MediaInternals::GetInstance());
1795 } 1794 }
1796 CHECK(audio_manager_); 1795 CHECK(audio_manager_);
1797 } 1796 }
1798 1797
1799 } // namespace content 1798 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698