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

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

Issue 1428213003: Preload the media foundation, h.264 decoder and the dxva2.dll before the gpu sandbox is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix defined macros Created 5 years, 1 month 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
« no previous file with comments | « content/common/gpu/media/dxva_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/media/dxva_video_decode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698