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

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

Issue 8510039: Initial implementation of the DXVA 2.0 H.264 hardware decoder for pepper for Windows. The decodin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
11 #include "base/environment.h" 11 #include "base/environment.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/threading/platform_thread.h" 14 #include "base/threading/platform_thread.h"
15 #include "base/win/scoped_com_initializer.h" 15 #include "base/win/scoped_com_initializer.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "content/common/gpu/gpu_config.h" 17 #include "content/common/gpu/gpu_config.h"
18 #include "content/public/common/content_switches.h" 18 #include "content/public/common/content_switches.h"
19 #include "content/public/common/main_function_params.h" 19 #include "content/public/common/main_function_params.h"
20 #include "content/gpu/gpu_child_thread.h" 20 #include "content/gpu/gpu_child_thread.h"
21 #include "content/gpu/gpu_process.h" 21 #include "content/gpu/gpu_process.h"
22 #include "ui/gfx/gl/gl_surface.h" 22 #include "ui/gfx/gl/gl_surface.h"
23 #include "ui/gfx/gl/gl_switches.h" 23 #include "ui/gfx/gl/gl_switches.h"
24 24
25 #if defined(OS_WIN) 25 #if defined(OS_WIN)
26 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
26 #include "sandbox/src/sandbox.h" 27 #include "sandbox/src/sandbox.h"
27 #endif 28 #endif
28 29
29 #if defined(USE_X11) 30 #if defined(USE_X11)
30 #include "ui/base/x/x11_util.h" 31 #include "ui/base/x/x11_util.h"
31 #endif 32 #endif
32 33
33 #if defined(TOOLKIT_USES_GTK) 34 #if defined(TOOLKIT_USES_GTK)
34 #include "ui/gfx/gtk_util.h" 35 #include "ui/gfx/gtk_util.h"
35 #endif 36 #endif
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (!gfx::GLSurface::InitializeOneOff()) { 77 if (!gfx::GLSurface::InitializeOneOff()) {
77 LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed"; 78 LOG(INFO) << "gfx::GLSurface::InitializeOneOff failed";
78 dead_on_arrival = true; 79 dead_on_arrival = true;
79 } 80 }
80 81
81 base::win::ScopedCOMInitializer com_initializer; 82 base::win::ScopedCOMInitializer com_initializer;
82 83
83 #if defined(OS_WIN) 84 #if defined(OS_WIN)
84 sandbox::TargetServices* target_services = 85 sandbox::TargetServices* target_services =
85 parameters.sandbox_info->target_services; 86 parameters.sandbox_info->target_services;
87 // Load the dlls required for H/W video decoding before lowering the process
88 // token. The dlls like mfplat, d3d9, etc fail to load in the sandbox.
89 DXVAVideoDecodeAccelerator::LoadDecodingDlls();
Ami GONE FROM CHROMIUM 2011/12/21 06:13:55 You'll need to get content/gpu/OWNERS' say-so on t
ananta 2011/12/21 07:04:55 Done.
86 // For windows, if the target_services interface is not zero, the process 90 // For windows, if the target_services interface is not zero, the process
87 // is sandboxed and we must call LowerToken() before rendering untrusted 91 // is sandboxed and we must call LowerToken() before rendering untrusted
88 // content. 92 // content.
89 if (target_services) 93 if (target_services)
90 target_services->LowerToken(); 94 target_services->LowerToken();
91 #endif 95 #endif
92 96
93 MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI; 97 MessageLoop::Type message_loop_type = MessageLoop::TYPE_UI;
94 #if defined(OS_WIN) 98 #if defined(OS_WIN)
95 // Unless we're running on desktop GL, we don't need a UI message 99 // Unless we're running on desktop GL, we don't need a UI message
(...skipping 17 matching lines...) Expand all
113 child_thread->Init(start_time); 117 child_thread->Init(start_time);
114 118
115 gpu_process.set_main_thread(child_thread); 119 gpu_process.set_main_thread(child_thread);
116 120
117 main_message_loop.Run(); 121 main_message_loop.Run();
118 122
119 child_thread->StopWatchdog(); 123 child_thread->StopWatchdog();
120 124
121 return 0; 125 return 0;
122 } 126 }
OLDNEW
« content/common/gpu/media/dxva_video_decode_accelerator.cc ('K') | « content/content_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698