| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "content/browser/device_sensors/device_sensor_service.h" | 53 #include "content/browser/device_sensors/device_sensor_service.h" |
| 54 #include "content/browser/dom_storage/dom_storage_area.h" | 54 #include "content/browser/dom_storage/dom_storage_area.h" |
| 55 #include "content/browser/download/download_resource_handler.h" | 55 #include "content/browser/download/download_resource_handler.h" |
| 56 #include "content/browser/download/save_file_manager.h" | 56 #include "content/browser/download/save_file_manager.h" |
| 57 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 57 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 58 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 58 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 59 #include "content/browser/gpu/compositor_util.h" | 59 #include "content/browser/gpu/compositor_util.h" |
| 60 #include "content/browser/gpu/gpu_data_manager_impl.h" | 60 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 61 #include "content/browser/gpu/gpu_process_host.h" | 61 #include "content/browser/gpu/gpu_process_host.h" |
| 62 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 62 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 63 #include "content/browser/gpu/shader_disk_cache.h" | 63 #include "content/browser/gpu/shader_cache_factory.h" |
| 64 #include "content/browser/histogram_synchronizer.h" | 64 #include "content/browser/histogram_synchronizer.h" |
| 65 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 65 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 66 #include "content/browser/loader_delegate_impl.h" | 66 #include "content/browser/loader_delegate_impl.h" |
| 67 #include "content/browser/media/media_internals.h" | 67 #include "content/browser/media/media_internals.h" |
| 68 #include "content/browser/memory/memory_coordinator.h" | 68 #include "content/browser/memory/memory_coordinator.h" |
| 69 #include "content/browser/net/browser_online_state_observer.h" | 69 #include "content/browser/net/browser_online_state_observer.h" |
| 70 #include "content/browser/renderer_host/media/media_stream_manager.h" | 70 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 71 #include "content/browser/renderer_host/render_process_host_impl.h" | 71 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 72 #include "content/browser/service_manager/service_manager_context.h" | 72 #include "content/browser/service_manager/service_manager_context.h" |
| 73 #include "content/browser/speech/speech_recognition_manager_impl.h" | 73 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 #if defined(ENABLE_VULKAN) | 1335 #if defined(ENABLE_VULKAN) |
| 1336 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1336 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1337 switches::kEnableVulkan)) { | 1337 switches::kEnableVulkan)) { |
| 1338 gpu::InitializeVulkan(); | 1338 gpu::InitializeVulkan(); |
| 1339 } | 1339 } |
| 1340 #endif | 1340 #endif |
| 1341 | 1341 |
| 1342 // Initialize the GPU shader cache. This needs to be initialized before | 1342 // Initialize the GPU shader cache. This needs to be initialized before |
| 1343 // BrowserGpuChannelHostFactory below, since that depends on an initialized | 1343 // BrowserGpuChannelHostFactory below, since that depends on an initialized |
| 1344 // ShaderCacheFactory. | 1344 // ShaderCacheFactory. |
| 1345 ShaderCacheFactory::InitInstance( | 1345 InitShaderCacheFactorySingleton( |
| 1346 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), | 1346 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
| 1347 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)); | 1347 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)); |
| 1348 | 1348 |
| 1349 bool always_uses_gpu = true; | 1349 bool always_uses_gpu = true; |
| 1350 bool established_gpu_channel = false; | 1350 bool established_gpu_channel = false; |
| 1351 #if defined(OS_ANDROID) | 1351 #if defined(OS_ANDROID) |
| 1352 // TODO(crbug.com/439322): This should be set to |true|. | 1352 // TODO(crbug.com/439322): This should be set to |true|. |
| 1353 established_gpu_channel = false; | 1353 established_gpu_channel = false; |
| 1354 always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup(); | 1354 always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup(); |
| 1355 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1355 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 if (!audio_manager_) { | 1701 if (!audio_manager_) { |
| 1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); | 1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); |
| 1703 audio_manager_ = media::AudioManager::Create( | 1703 audio_manager_ = media::AudioManager::Create( |
| 1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), | 1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), |
| 1705 MediaInternals::GetInstance()); | 1705 MediaInternals::GetInstance()); |
| 1706 } | 1706 } |
| 1707 CHECK(audio_manager_); | 1707 CHECK(audio_manager_); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 } // namespace content | 1710 } // namespace content |
| OLD | NEW |