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 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "ui/gl/gpu_switching_manager.h" | 48 #include "ui/gl/gpu_switching_manager.h" |
49 | 49 |
50 #if defined(OS_ANDROID) | 50 #if defined(OS_ANDROID) |
51 #include "base/trace_event/memory_dump_manager.h" | 51 #include "base/trace_event/memory_dump_manager.h" |
52 #include "components/tracing/graphics_memory_dump_provider_android.h" | 52 #include "components/tracing/graphics_memory_dump_provider_android.h" |
53 #endif | 53 #endif |
54 | 54 |
55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
56 #include "base/win/windows_version.h" | 56 #include "base/win/windows_version.h" |
57 #include "base/win/scoped_com_initializer.h" | 57 #include "base/win/scoped_com_initializer.h" |
| 58 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
58 #include "sandbox/win/src/sandbox.h" | 59 #include "sandbox/win/src/sandbox.h" |
59 #endif | 60 #endif |
60 | 61 |
61 #if defined(USE_X11) | 62 #if defined(USE_X11) |
62 #include "ui/base/x/x11_util.h" | 63 #include "ui/base/x/x11_util.h" |
63 #endif | 64 #endif |
64 | 65 |
65 #if defined(OS_LINUX) | 66 #if defined(OS_LINUX) |
66 #include "content/public/common/sandbox_init.h" | 67 #include "content/public/common/sandbox_init.h" |
67 #endif | 68 #endif |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 GetContentClient()->SetGpuInfo(gpu_info); | 429 GetContentClient()->SetGpuInfo(gpu_info); |
429 } | 430 } |
430 | 431 |
431 bool WarmUpSandbox(const base::CommandLine& command_line) { | 432 bool WarmUpSandbox(const base::CommandLine& command_line) { |
432 { | 433 { |
433 TRACE_EVENT0("gpu", "Warm up rand"); | 434 TRACE_EVENT0("gpu", "Warm up rand"); |
434 // Warm up the random subsystem, which needs to be done pre-sandbox on all | 435 // Warm up the random subsystem, which needs to be done pre-sandbox on all |
435 // platforms. | 436 // platforms. |
436 (void) base::RandUint64(); | 437 (void) base::RandUint64(); |
437 } | 438 } |
| 439 |
| 440 #if defined(OS_WIN) |
| 441 content::DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
| 442 #endif |
438 return true; | 443 return true; |
439 } | 444 } |
440 | 445 |
441 #if !defined(OS_MACOSX) | 446 #if !defined(OS_MACOSX) |
442 bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info) { | 447 bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info) { |
443 TRACE_EVENT0("gpu,startup", "Collect Graphics Info"); | 448 TRACE_EVENT0("gpu,startup", "Collect Graphics Info"); |
444 | 449 |
445 bool res = true; | 450 bool res = true; |
446 gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info); | 451 gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info); |
447 switch (result) { | 452 switch (result) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 return true; | 569 return true; |
565 } | 570 } |
566 | 571 |
567 return false; | 572 return false; |
568 } | 573 } |
569 #endif // defined(OS_WIN) | 574 #endif // defined(OS_WIN) |
570 | 575 |
571 } // namespace. | 576 } // namespace. |
572 | 577 |
573 } // namespace content | 578 } // namespace content |
OLD | NEW |