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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/rand_util.h" | 15 #include "base/rand_util.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 18 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
19 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
20 #include "base/trace_event/trace_event.h" | 20 #include "base/trace_event/trace_event.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "content/child/child_process.h" | 22 #include "content/child/child_process.h" |
23 #include "content/common/content_constants_internal.h" | 23 #include "content/common/content_constants_internal.h" |
24 #include "content/common/gpu/gpu_config.h" | 24 #include "content/common/gpu/gpu_config.h" |
25 #include "content/common/gpu/gpu_messages.h" | 25 #include "content/common/gpu/gpu_messages.h" |
| 26 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
26 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" | 27 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
27 #include "content/common/sandbox_linux/sandbox_linux.h" | 28 #include "content/common/sandbox_linux/sandbox_linux.h" |
28 #include "content/gpu/gpu_child_thread.h" | 29 #include "content/gpu/gpu_child_thread.h" |
29 #include "content/gpu/gpu_process.h" | 30 #include "content/gpu/gpu_process.h" |
30 #include "content/gpu/gpu_watchdog_thread.h" | 31 #include "content/gpu/gpu_watchdog_thread.h" |
31 #include "content/public/common/content_client.h" | 32 #include "content/public/common/content_client.h" |
32 #include "content/public/common/content_switches.h" | 33 #include "content/public/common/content_switches.h" |
33 #include "content/public/common/main_function_params.h" | 34 #include "content/public/common/main_function_params.h" |
34 #include "gpu/command_buffer/service/gpu_switches.h" | 35 #include "gpu/command_buffer/service/gpu_switches.h" |
35 #include "gpu/config/gpu_info_collector.h" | 36 #include "gpu/config/gpu_info_collector.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 if (!initialized_sandbox) { | 326 if (!initialized_sandbox) { |
326 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), | 327 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), |
327 should_initialize_gl_context); | 328 should_initialize_gl_context); |
328 } | 329 } |
329 #elif defined(OS_WIN) | 330 #elif defined(OS_WIN) |
330 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); | 331 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); |
331 #elif defined(OS_MACOSX) | 332 #elif defined(OS_MACOSX) |
332 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); | 333 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); |
333 #endif | 334 #endif |
334 | 335 |
| 336 gpu_info.video_decode_accelerator_supported_profiles = |
| 337 content::GpuVideoDecodeAccelerator::GetSupportedProfiles(); |
335 gpu_info.video_encode_accelerator_supported_profiles = | 338 gpu_info.video_encode_accelerator_supported_profiles = |
336 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); | 339 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); |
337 } else { | 340 } else { |
338 dead_on_arrival = true; | 341 dead_on_arrival = true; |
339 } | 342 } |
340 | 343 |
341 logging::SetLogMessageHandler(NULL); | 344 logging::SetLogMessageHandler(NULL); |
342 | 345 |
343 GpuProcess gpu_process; | 346 GpuProcess gpu_process; |
344 | 347 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 return true; | 537 return true; |
535 } | 538 } |
536 | 539 |
537 return false; | 540 return false; |
538 } | 541 } |
539 #endif // defined(OS_WIN) | 542 #endif // defined(OS_WIN) |
540 | 543 |
541 } // namespace. | 544 } // namespace. |
542 | 545 |
543 } // namespace content | 546 } // namespace content |
OLD | NEW |