Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1463)

Side by Side Diff: content/gpu/gpu_main.cc

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address patch 19 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/metrics/statistics_recorder.h" 15 #include "base/metrics/statistics_recorder.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/third_party/dynamic_annotations/dynamic_annotations.h" 19 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
20 #include "base/threading/platform_thread.h" 20 #include "base/threading/platform_thread.h"
21 #include "base/trace_event/trace_event.h" 21 #include "base/trace_event/trace_event.h"
22 #include "build/build_config.h" 22 #include "build/build_config.h"
23 #include "content/child/child_process.h" 23 #include "content/child/child_process.h"
24 #include "content/common/content_constants_internal.h" 24 #include "content/common/content_constants_internal.h"
25 #include "content/common/gpu/gpu_config.h" 25 #include "content/common/gpu/gpu_config.h"
26 #include "content/common/gpu/gpu_messages.h" 26 #include "content/common/gpu/gpu_messages.h"
27 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
27 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" 28 #include "content/common/gpu/media/gpu_video_encode_accelerator.h"
28 #include "content/common/sandbox_linux/sandbox_linux.h" 29 #include "content/common/sandbox_linux/sandbox_linux.h"
29 #include "content/gpu/gpu_child_thread.h" 30 #include "content/gpu/gpu_child_thread.h"
30 #include "content/gpu/gpu_process.h" 31 #include "content/gpu/gpu_process.h"
31 #include "content/gpu/gpu_watchdog_thread.h" 32 #include "content/gpu/gpu_watchdog_thread.h"
32 #include "content/public/common/content_client.h" 33 #include "content/public/common/content_client.h"
33 #include "content/public/common/content_switches.h" 34 #include "content/public/common/content_switches.h"
34 #include "content/public/common/main_function_params.h" 35 #include "content/public/common/main_function_params.h"
35 #include "gpu/command_buffer/service/gpu_switches.h" 36 #include "gpu/command_buffer/service/gpu_switches.h"
36 #include "gpu/config/gpu_info_collector.h" 37 #include "gpu/config/gpu_info_collector.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 if (!initialized_sandbox) { 330 if (!initialized_sandbox) {
330 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(), 331 gpu_info.sandboxed = StartSandboxLinux(gpu_info, watchdog_thread.get(),
331 should_initialize_gl_context); 332 should_initialize_gl_context);
332 } 333 }
333 #elif defined(OS_WIN) 334 #elif defined(OS_WIN)
334 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info); 335 gpu_info.sandboxed = StartSandboxWindows(parameters.sandbox_info);
335 #elif defined(OS_MACOSX) 336 #elif defined(OS_MACOSX)
336 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); 337 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive();
337 #endif 338 #endif
338 339
340 gpu_info.video_decode_accelerator_supported_profiles =
341 content::GpuVideoDecodeAccelerator::GetSupportedProfiles();
339 gpu_info.video_encode_accelerator_supported_profiles = 342 gpu_info.video_encode_accelerator_supported_profiles =
340 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); 343 content::GpuVideoEncodeAccelerator::GetSupportedProfiles();
341 } else { 344 } else {
342 dead_on_arrival = true; 345 dead_on_arrival = true;
343 } 346 }
344 347
345 logging::SetLogMessageHandler(NULL); 348 logging::SetLogMessageHandler(NULL);
346 349
347 GpuProcess gpu_process; 350 GpuProcess gpu_process;
348 351
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 return true; 536 return true;
534 } 537 }
535 538
536 return false; 539 return false;
537 } 540 }
538 #endif // defined(OS_WIN) 541 #endif // defined(OS_WIN)
539 542
540 } // namespace. 543 } // namespace.
541 544
542 } // namespace content 545 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698