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

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

Issue 2247173002: gpu: Use GpuMemoryBufferManager from GpuService when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus-gpu-memory-buffer-manager
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); 1221 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1222 ui::ContextProviderFactory::SetInstance( 1222 ui::ContextProviderFactory::SetInstance(
1223 ContextProviderFactoryImpl::GetInstance()); 1223 ContextProviderFactoryImpl::GetInstance());
1224 #elif defined(USE_AURA) || defined(OS_MACOSX) 1224 #elif defined(USE_AURA) || defined(OS_MACOSX)
1225 established_gpu_channel = true; 1225 established_gpu_channel = true;
1226 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || 1226 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() ||
1227 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit) || 1227 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit) ||
1228 shell::ShellIsRemote()) { 1228 shell::ShellIsRemote()) {
1229 established_gpu_channel = always_uses_gpu = false; 1229 established_gpu_channel = always_uses_gpu = false;
1230 } 1230 }
1231 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1232 ImageTransportFactory::Initialize();
1233
1234 gpu::GpuChannelEstablishFactory* factory = 1231 gpu::GpuChannelEstablishFactory* factory =
1235 GetContentClient()->browser()->GetGpuChannelEstablishFactory(); 1232 GetContentClient()->browser()->GetGpuChannelEstablishFactory();
1236 if (!factory) 1233 if (!factory) {
1234 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1237 factory = BrowserGpuChannelHostFactory::instance(); 1235 factory = BrowserGpuChannelHostFactory::instance();
1236 }
1238 DCHECK(factory); 1237 DCHECK(factory);
1238 ImageTransportFactory::Initialize();
1239 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory); 1239 ImageTransportFactory::GetInstance()->SetGpuChannelEstablishFactory(factory);
1240 #if defined(USE_AURA) 1240 #if defined(USE_AURA)
1241 bool use_mus_in_renderer = base::CommandLine::ForCurrentProcess()->HasSwitch( 1241 bool use_mus_in_renderer = base::CommandLine::ForCurrentProcess()->HasSwitch(
1242 switches::kUseMusInRenderer); 1242 switches::kUseMusInRenderer);
1243 if (aura::Env::GetInstance() && !use_mus_in_renderer) { 1243 if (aura::Env::GetInstance() && !use_mus_in_renderer) {
1244 aura::Env::GetInstance()->set_context_factory(GetContextFactory()); 1244 aura::Env::GetInstance()->set_context_factory(GetContextFactory());
1245 } 1245 }
1246 #endif // defined(USE_AURA) 1246 #endif // defined(USE_AURA)
1247 #endif // defined(OS_ANDROID) 1247 #endif // defined(OS_ANDROID)
1248 1248
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = 1539 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner =
1540 audio_thread_->task_runner(); 1540 audio_thread_->task_runner();
1541 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), 1541 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner),
1542 std::move(worker_task_runner), 1542 std::move(worker_task_runner),
1543 MediaInternals::GetInstance()); 1543 MediaInternals::GetInstance());
1544 } 1544 }
1545 CHECK(audio_manager_); 1545 CHECK(audio_manager_);
1546 } 1546 }
1547 1547
1548 } // namespace content 1548 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698