| 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" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/metrics/statistics_recorder.h" | 13 #include "base/metrics/statistics_recorder.h" |
| 14 #include "base/rand_util.h" | 14 #include "base/rand_util.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 17 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
| 18 #include "base/threading/platform_thread.h" | 18 #include "base/threading/platform_thread.h" |
| 19 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.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_host_messages.h" | 24 #include "content/common/gpu/gpu_host_messages.h" |
| 25 #include "content/common/gpu/gpu_memory_buffer_factory.h" | 25 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
| 26 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" |
| 27 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
| 28 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
| 26 #include "content/common/sandbox_linux/sandbox_linux.h" | 29 #include "content/common/sandbox_linux/sandbox_linux.h" |
| 27 #include "content/gpu/gpu_child_thread.h" | 30 #include "content/gpu/gpu_child_thread.h" |
| 28 #include "content/gpu/gpu_process.h" | 31 #include "content/gpu/gpu_process.h" |
| 29 #include "content/gpu/gpu_watchdog_thread.h" | 32 #include "content/gpu/gpu_watchdog_thread.h" |
| 30 #include "content/public/common/content_client.h" | 33 #include "content/public/common/content_client.h" |
| 31 #include "content/public/common/content_switches.h" | 34 #include "content/public/common/content_switches.h" |
| 32 #include "content/public/common/main_function_params.h" | 35 #include "content/public/common/main_function_params.h" |
| 33 #include "gpu/command_buffer/service/gpu_switches.h" | 36 #include "gpu/command_buffer/service/gpu_switches.h" |
| 34 #include "gpu/command_buffer/service/sync_point_manager.h" | 37 #include "gpu/command_buffer/service/sync_point_manager.h" |
| 35 #include "gpu/config/gpu_info_collector.h" | 38 #include "gpu/config/gpu_info_collector.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 377 |
| 375 if (!initialized_sandbox) { | 378 if (!initialized_sandbox) { |
| 376 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), | 379 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), |
| 377 should_initialize_gl_context); | 380 should_initialize_gl_context); |
| 378 } | 381 } |
| 379 #elif defined(OS_WIN) | 382 #elif defined(OS_WIN) |
| 380 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); | 383 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); |
| 381 #elif defined(OS_MACOSX) | 384 #elif defined(OS_MACOSX) |
| 382 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); | 385 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); |
| 383 #endif | 386 #endif |
| 387 |
| 388 gpu_info.video_decode_accelerator_capabilities = |
| 389 content::GpuVideoDecodeAccelerator::GetCapabilities(); |
| 390 gpu_info.video_encode_accelerator_supported_profiles = |
| 391 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); |
| 392 gpu_info.jpeg_decode_accelerator_supported = |
| 393 content::GpuJpegDecodeAccelerator::IsSupported(); |
| 384 } else { | 394 } else { |
| 385 dead_on_arrival = true; | 395 dead_on_arrival = true; |
| 386 } | 396 } |
| 387 | 397 |
| 388 logging::SetLogMessageHandler(NULL); | 398 logging::SetLogMessageHandler(NULL); |
| 389 | 399 |
| 390 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory; | 400 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory; |
| 391 if (GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER) | 401 if (GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER) |
| 392 gpu_memory_buffer_factory = GpuMemoryBufferFactory::CreateNativeType(); | 402 gpu_memory_buffer_factory = GpuMemoryBufferFactory::CreateNativeType(); |
| 393 | 403 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return true; | 602 return true; |
| 593 } | 603 } |
| 594 | 604 |
| 595 return false; | 605 return false; |
| 596 } | 606 } |
| 597 #endif // defined(OS_WIN) | 607 #endif // defined(OS_WIN) |
| 598 | 608 |
| 599 } // namespace. | 609 } // namespace. |
| 600 | 610 |
| 601 } // namespace content | 611 } // namespace content |
| OLD | NEW |