| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "content/browser/dom_storage/dom_storage_area.h" | 47 #include "content/browser/dom_storage/dom_storage_area.h" |
| 48 #include "content/browser/download/download_resource_handler.h" | 48 #include "content/browser/download/download_resource_handler.h" |
| 49 #include "content/browser/download/save_file_manager.h" | 49 #include "content/browser/download/save_file_manager.h" |
| 50 #include "content/browser/gamepad/gamepad_service.h" | 50 #include "content/browser/gamepad/gamepad_service.h" |
| 51 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 51 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 52 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 52 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 53 #include "content/browser/gpu/compositor_util.h" | 53 #include "content/browser/gpu/compositor_util.h" |
| 54 #include "content/browser/gpu/gpu_data_manager_impl.h" | 54 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 55 #include "content/browser/gpu/gpu_process_host.h" | 55 #include "content/browser/gpu/gpu_process_host.h" |
| 56 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 56 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 57 #include "content/browser/gpu/shader_disk_cache.h" |
| 57 #include "content/browser/histogram_synchronizer.h" | 58 #include "content/browser/histogram_synchronizer.h" |
| 58 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 59 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 59 #include "content/browser/loader_delegate_impl.h" | 60 #include "content/browser/loader_delegate_impl.h" |
| 60 #include "content/browser/media/media_internals.h" | 61 #include "content/browser/media/media_internals.h" |
| 61 #include "content/browser/memory/memory_coordinator.h" | 62 #include "content/browser/memory/memory_coordinator.h" |
| 62 #include "content/browser/net/browser_online_state_observer.h" | 63 #include "content/browser/net/browser_online_state_observer.h" |
| 63 #include "content/browser/renderer_host/media/media_stream_manager.h" | 64 #include "content/browser/renderer_host/media/media_stream_manager.h" |
| 64 #include "content/browser/renderer_host/render_process_host_impl.h" | 65 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 65 #include "content/browser/service_manager/service_manager_context.h" | 66 #include "content/browser/service_manager/service_manager_context.h" |
| 66 #include "content/browser/speech/speech_recognition_manager_impl.h" | 67 #include "content/browser/speech/speech_recognition_manager_impl.h" |
| (...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 1221 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
| 1221 #endif | 1222 #endif |
| 1222 | 1223 |
| 1223 #if defined(ENABLE_VULKAN) | 1224 #if defined(ENABLE_VULKAN) |
| 1224 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1225 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1225 switches::kEnableVulkan)) { | 1226 switches::kEnableVulkan)) { |
| 1226 gpu::InitializeVulkan(); | 1227 gpu::InitializeVulkan(); |
| 1227 } | 1228 } |
| 1228 #endif | 1229 #endif |
| 1229 | 1230 |
| 1231 // Initialize the GPU shader cache. This needs to be initialized before |
| 1232 // BrowserGpuChannelHostFactory below, since that depends on an initialized |
| 1233 // ShaderCacheFactory. |
| 1234 ShaderCacheFactory::InitInstance( |
| 1235 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
| 1236 BrowserThread::GetTaskRunnerForThread(BrowserThread::CACHE)); |
| 1237 |
| 1230 bool always_uses_gpu = true; | 1238 bool always_uses_gpu = true; |
| 1231 bool established_gpu_channel = false; | 1239 bool established_gpu_channel = false; |
| 1232 #if defined(OS_ANDROID) | 1240 #if defined(OS_ANDROID) |
| 1233 // TODO(crbug.com/439322): This should be set to |true|. | 1241 // TODO(crbug.com/439322): This should be set to |true|. |
| 1234 established_gpu_channel = false; | 1242 established_gpu_channel = false; |
| 1235 always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup(); | 1243 always_uses_gpu = ShouldStartGpuProcessOnBrowserStartup(); |
| 1236 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); | 1244 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); |
| 1237 ContextProviderFactoryImpl::Initialize( | 1245 ContextProviderFactoryImpl::Initialize( |
| 1238 BrowserGpuChannelHostFactory::instance()); | 1246 BrowserGpuChannelHostFactory::instance()); |
| 1239 ui::ContextProviderFactory::SetInstance( | 1247 ui::ContextProviderFactory::SetInstance( |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1600 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1593 audio_thread_->task_runner(); | 1601 audio_thread_->task_runner(); |
| 1594 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1602 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1595 std::move(worker_task_runner), | 1603 std::move(worker_task_runner), |
| 1596 MediaInternals::GetInstance()); | 1604 MediaInternals::GetInstance()); |
| 1597 } | 1605 } |
| 1598 CHECK(audio_manager_); | 1606 CHECK(audio_manager_); |
| 1599 } | 1607 } |
| 1600 | 1608 |
| 1601 } // namespace content | 1609 } // namespace content |
| OLD | NEW |