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/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/rand_util.h" | 16 #include "base/rand_util.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/threading/platform_thread.h" | 19 #include "base/threading/platform_thread.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "content/child/child_process.h" | 21 #include "content/child/child_process.h" |
22 #include "content/common/content_constants_internal.h" | 22 #include "content/common/content_constants_internal.h" |
23 #include "content/common/gpu/gpu_config.h" | 23 #include "content/common/gpu/gpu_config.h" |
24 #include "content/common/gpu/gpu_messages.h" | 24 #include "content/common/gpu/gpu_messages.h" |
| 25 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
25 #include "content/common/sandbox_linux/sandbox_linux.h" | 26 #include "content/common/sandbox_linux/sandbox_linux.h" |
26 #include "content/gpu/gpu_child_thread.h" | 27 #include "content/gpu/gpu_child_thread.h" |
27 #include "content/gpu/gpu_process.h" | 28 #include "content/gpu/gpu_process.h" |
28 #include "content/gpu/gpu_watchdog_thread.h" | 29 #include "content/gpu/gpu_watchdog_thread.h" |
29 #include "content/public/common/content_client.h" | 30 #include "content/public/common/content_client.h" |
30 #include "content/public/common/content_switches.h" | 31 #include "content/public/common/content_switches.h" |
31 #include "content/public/common/main_function_params.h" | 32 #include "content/public/common/main_function_params.h" |
32 #include "gpu/command_buffer/service/gpu_switches.h" | 33 #include "gpu/command_buffer/service/gpu_switches.h" |
33 #include "gpu/config/gpu_info_collector.h" | 34 #include "gpu/config/gpu_info_collector.h" |
34 #include "gpu/config/gpu_util.h" | 35 #include "gpu/config/gpu_util.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 322 |
322 if (!initialized_sandbox) { | 323 if (!initialized_sandbox) { |
323 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), | 324 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), |
324 should_initialize_gl_context); | 325 should_initialize_gl_context); |
325 } | 326 } |
326 #elif defined(OS_WIN) | 327 #elif defined(OS_WIN) |
327 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); | 328 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); |
328 #elif defined(OS_MACOSX) | 329 #elif defined(OS_MACOSX) |
329 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); | 330 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); |
330 #endif | 331 #endif |
| 332 |
| 333 gpu_info.video_encode_accelerator_supported_profiles = |
| 334 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); |
331 } else { | 335 } else { |
332 dead_on_arrival = true; | 336 dead_on_arrival = true; |
333 } | 337 } |
334 | 338 |
335 logging::SetLogMessageHandler(NULL); | 339 logging::SetLogMessageHandler(NULL); |
336 | 340 |
337 GpuProcess gpu_process; | 341 GpuProcess gpu_process; |
338 | 342 |
339 // These UMA must be stored after GpuProcess is constructed as it | 343 // These UMA must be stored after GpuProcess is constructed as it |
340 // initializes StatisticsRecorder which tracks the histograms. | 344 // initializes StatisticsRecorder which tracks the histograms. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 return true; | 525 return true; |
522 } | 526 } |
523 | 527 |
524 return false; | 528 return false; |
525 } | 529 } |
526 #endif // defined(OS_WIN) | 530 #endif // defined(OS_WIN) |
527 | 531 |
528 } // namespace. | 532 } // namespace. |
529 | 533 |
530 } // namespace content | 534 } // namespace content |
OLD | NEW |