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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #endif | 49 #endif |
50 | 50 |
51 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
52 #include "base/trace_event/memory_dump_manager.h" | 52 #include "base/trace_event/memory_dump_manager.h" |
53 #include "components/tracing/graphics_memory_dump_provider_android.h" | 53 #include "components/tracing/graphics_memory_dump_provider_android.h" |
54 #endif | 54 #endif |
55 | 55 |
56 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
57 #include "base/win/windows_version.h" | 57 #include "base/win/windows_version.h" |
58 #include "base/win/scoped_com_initializer.h" | 58 #include "base/win/scoped_com_initializer.h" |
59 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" | 59 #include "media/gpu/dxva_video_decode_accelerator_win.h" |
60 #include "sandbox/win/src/sandbox.h" | 60 #include "sandbox/win/src/sandbox.h" |
61 #endif | 61 #endif |
62 | 62 |
63 #if defined(USE_X11) | 63 #if defined(USE_X11) |
64 #include "ui/base/x/x11_util.h" | 64 #include "ui/base/x/x11_util.h" |
65 #include "ui/gfx/x/x11_switches.h" // nogncheck | 65 #include "ui/gfx/x/x11_switches.h" // nogncheck |
66 #endif | 66 #endif |
67 | 67 |
68 #if defined(OS_LINUX) | 68 #if defined(OS_LINUX) |
69 #include "content/public/common/sandbox_init.h" | 69 #include "content/public/common/sandbox_init.h" |
70 #endif | 70 #endif |
71 | 71 |
72 #if defined(OS_MACOSX) | 72 #if defined(OS_MACOSX) |
73 #include "base/message_loop/message_pump_mac.h" | 73 #include "base/message_loop/message_pump_mac.h" |
74 #include "content/common/sandbox_mac.h" | 74 #include "content/common/sandbox_mac.h" |
75 #endif | 75 #endif |
76 | 76 |
77 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 77 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
78 #include "content/common/gpu/media/vaapi_wrapper.h" | 78 #include "media/gpu/vaapi_wrapper.h" |
79 #endif | 79 #endif |
80 | 80 |
81 #if defined(SANITIZER_COVERAGE) | 81 #if defined(SANITIZER_COVERAGE) |
82 #include <sanitizer/common_interface_defs.h> | 82 #include <sanitizer/common_interface_defs.h> |
83 #include <sanitizer/coverage_interface.h> | 83 #include <sanitizer/coverage_interface.h> |
84 #endif | 84 #endif |
85 | 85 |
86 #if defined(CYGPROFILE_INSTRUMENTATION) | 86 #if defined(CYGPROFILE_INSTRUMENTATION) |
87 const int kGpuTimeout = 30000; | 87 const int kGpuTimeout = 30000; |
88 #else | 88 #else |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // Initializes StatisticsRecorder which tracks UMA histograms. | 240 // Initializes StatisticsRecorder which tracks UMA histograms. |
241 base::StatisticsRecorder::Initialize(); | 241 base::StatisticsRecorder::Initialize(); |
242 | 242 |
243 gpu::GPUInfo gpu_info; | 243 gpu::GPUInfo gpu_info; |
244 // Get vendor_id, device_id, driver_version from browser process through | 244 // Get vendor_id, device_id, driver_version from browser process through |
245 // commandline switches. | 245 // commandline switches. |
246 GetGpuInfoFromCommandLine(gpu_info, command_line); | 246 GetGpuInfoFromCommandLine(gpu_info, command_line); |
247 gpu_info.in_process_gpu = false; | 247 gpu_info.in_process_gpu = false; |
248 | 248 |
249 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 249 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
250 VaapiWrapper::PreSandboxInitialization(); | 250 media::VaapiWrapper::PreSandboxInitialization(); |
251 #endif | 251 #endif |
252 | 252 |
253 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 253 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
254 // Set thread priority before sandbox initialization. | 254 // Set thread priority before sandbox initialization. |
255 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); | 255 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY); |
256 #endif | 256 #endif |
257 | 257 |
258 // Warm up resources that don't need access to GPUInfo. | 258 // Warm up resources that don't need access to GPUInfo. |
259 if (WarmUpSandbox(command_line)) { | 259 if (WarmUpSandbox(command_line)) { |
260 #if defined(OS_LINUX) | 260 #if defined(OS_LINUX) |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 return true; | 585 return true; |
586 } | 586 } |
587 | 587 |
588 return false; | 588 return false; |
589 } | 589 } |
590 #endif // defined(OS_WIN) | 590 #endif // defined(OS_WIN) |
591 | 591 |
592 } // namespace. | 592 } // namespace. |
593 | 593 |
594 } // namespace content | 594 } // namespace content |
OLD | NEW |