| OLD | NEW |
| 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 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 switches::kEnableVulkan)) { | 1239 switches::kEnableVulkan)) { |
| 1240 gpu::InitializeVulkan(); | 1240 gpu::InitializeVulkan(); |
| 1241 } | 1241 } |
| 1242 #endif | 1242 #endif |
| 1243 | 1243 |
| 1244 bool always_uses_gpu = true; | 1244 bool always_uses_gpu = true; |
| 1245 bool established_gpu_channel = false; | 1245 bool established_gpu_channel = false; |
| 1246 #if defined(OS_ANDROID) | 1246 #if defined(OS_ANDROID) |
| 1247 // TODO(crbug.com/439322): This should be set to |true|. | 1247 // TODO(crbug.com/439322): This should be set to |true|. |
| 1248 established_gpu_channel = false; | 1248 established_gpu_channel = false; |
| 1249 always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup(); |
| 1249 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1250 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 1250 #elif defined(USE_AURA) || defined(OS_MACOSX) | 1251 #elif defined(USE_AURA) || defined(OS_MACOSX) |
| 1251 established_gpu_channel = true; | 1252 established_gpu_channel = true; |
| 1252 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || | 1253 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || |
| 1253 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) { | 1254 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) { |
| 1254 established_gpu_channel = always_uses_gpu = false; | 1255 established_gpu_channel = always_uses_gpu = false; |
| 1255 } | 1256 } |
| 1256 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1257 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 1257 ImageTransportFactory::Initialize(); | 1258 ImageTransportFactory::Initialize(); |
| 1258 #if defined(USE_AURA) | 1259 #if defined(USE_AURA) |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 std::move(worker_task_runner), | 1541 std::move(worker_task_runner), |
| 1541 MediaInternals::GetInstance()); | 1542 MediaInternals::GetInstance()); |
| 1542 } | 1543 } |
| 1543 CHECK(audio_manager_); | 1544 CHECK(audio_manager_); |
| 1544 | 1545 |
| 1545 if (use_hang_monitor) | 1546 if (use_hang_monitor) |
| 1546 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1547 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
| 1547 } | 1548 } |
| 1548 | 1549 |
| 1549 } // namespace content | 1550 } // namespace content |
| OLD | NEW |