| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 #if defined(USE_NSS_CERTS) | 179 #if defined(USE_NSS_CERTS) |
| 180 #include "crypto/nss_util.h" | 180 #include "crypto/nss_util.h" |
| 181 #endif | 181 #endif |
| 182 | 182 |
| 183 #if defined(MOJO_SHELL_CLIENT) | 183 #if defined(MOJO_SHELL_CLIENT) |
| 184 #include "services/shell/public/cpp/connector.h" | 184 #include "services/shell/public/cpp/connector.h" |
| 185 #include "ui/views/mus/window_manager_connection.h" | 185 #include "ui/views/mus/window_manager_connection.h" |
| 186 #endif | 186 #endif |
| 187 | 187 |
| 188 #if defined(ENABLE_VULKAN) |
| 189 #include "gpu/vulkan/vulkan_implementation.h" |
| 190 #endif |
| 191 |
| 188 // One of the linux specific headers defines this as a macro. | 192 // One of the linux specific headers defines this as a macro. |
| 189 #ifdef DestroyAll | 193 #ifdef DestroyAll |
| 190 #undef DestroyAll | 194 #undef DestroyAll |
| 191 #endif | 195 #endif |
| 192 | 196 |
| 193 namespace content { | 197 namespace content { |
| 194 namespace { | 198 namespace { |
| 195 | 199 |
| 196 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 200 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 197 void SetupSandbox(const base::CommandLine& parsed_command_line) { | 201 void SetupSandbox(const base::CommandLine& parsed_command_line) { |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 | 1185 |
| 1182 indexed_db_thread_.reset(new base::Thread("IndexedDB")); | 1186 indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
| 1183 indexed_db_thread_->Start(); | 1187 indexed_db_thread_->Start(); |
| 1184 | 1188 |
| 1185 HistogramSynchronizer::GetInstance(); | 1189 HistogramSynchronizer::GetInstance(); |
| 1186 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 1190 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 1187 // Up the priority of the UI thread. | 1191 // Up the priority of the UI thread. |
| 1188 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 1192 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
| 1189 #endif | 1193 #endif |
| 1190 | 1194 |
| 1195 #if defined(ENABLE_VULKAN) |
| 1196 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1197 switches::kEnableVulkan)) { |
| 1198 gpu::InitializeVulkan(); |
| 1199 } |
| 1200 #endif |
| 1201 |
| 1191 bool always_uses_gpu = true; | 1202 bool always_uses_gpu = true; |
| 1192 bool established_gpu_channel = false; | 1203 bool established_gpu_channel = false; |
| 1193 #if defined(OS_ANDROID) | 1204 #if defined(OS_ANDROID) |
| 1194 // TODO(crbug.com/439322): This should be set to |true|. | 1205 // TODO(crbug.com/439322): This should be set to |true|. |
| 1195 established_gpu_channel = false; | 1206 established_gpu_channel = false; |
| 1196 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1207 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 1197 #elif defined(USE_AURA) || defined(OS_MACOSX) | 1208 #elif defined(USE_AURA) || defined(OS_MACOSX) |
| 1198 established_gpu_channel = true; | 1209 established_gpu_channel = true; |
| 1199 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || | 1210 if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor() || |
| 1200 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) { | 1211 parsed_command_line_.HasSwitch(switches::kDisableGpuEarlyInit)) { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 audio_task_runner = audio_thread_->task_runner(); | 1491 audio_task_runner = audio_thread_->task_runner(); |
| 1481 worker_task_runner = audio_thread_->task_runner(); | 1492 worker_task_runner = audio_thread_->task_runner(); |
| 1482 monitor_task_runner = io_thread_->task_runner(); | 1493 monitor_task_runner = io_thread_->task_runner(); |
| 1483 #endif // defined(OS_MACOSX) | 1494 #endif // defined(OS_MACOSX) |
| 1484 audio_manager_ = media::AudioManager::Create( | 1495 audio_manager_ = media::AudioManager::Create( |
| 1485 std::move(audio_task_runner), std::move(worker_task_runner), | 1496 std::move(audio_task_runner), std::move(worker_task_runner), |
| 1486 std::move(monitor_task_runner), MediaInternals::GetInstance()); | 1497 std::move(monitor_task_runner), MediaInternals::GetInstance()); |
| 1487 } | 1498 } |
| 1488 | 1499 |
| 1489 } // namespace content | 1500 } // namespace content |
| OLD | NEW |