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

Side by Side Diff: ui/gfx/gl/gl_implementation_win.cc

Issue 9567021: Preload ddraw.dll before initializing sandbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 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 <d3dx9.h> 5 #include <d3dx9.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 FilePath gles_path; 140 FilePath gles_path;
141 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 141 const CommandLine* command_line = CommandLine::ForCurrentProcess();
142 bool using_swift_shader = 142 bool using_swift_shader =
143 command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader"; 143 command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader";
144 if (using_swift_shader) { 144 if (using_swift_shader) {
145 if (!command_line->HasSwitch(switches::kSwiftShaderPath)) 145 if (!command_line->HasSwitch(switches::kSwiftShaderPath))
146 return false; 146 return false;
147 gles_path = 147 gles_path =
148 command_line->GetSwitchValuePath(switches::kSwiftShaderPath); 148 command_line->GetSwitchValuePath(switches::kSwiftShaderPath);
149 // Preload library
150 base::NativeLibrary ddraw_library = base::LoadNativeLibrary(
apatrick_chromium 2012/03/01 20:30:29 "base::NativeLibrary ddraw_library = " part is red
151 L"ddraw.dll", NULL);
149 } else { 152 } else {
150 gles_path = module_path; 153 gles_path = module_path;
151 } 154 }
152 155
153 // Load libglesv2.dll before libegl.dll because the latter is dependent on 156 // Load libglesv2.dll before libegl.dll because the latter is dependent on
154 // the former and if there is another version of libglesv2.dll in the dll 157 // the former and if there is another version of libglesv2.dll in the dll
155 // search path, it will get loaded instead. 158 // search path, it will get loaded instead.
156 base::NativeLibrary gles_library = base::LoadNativeLibrary( 159 base::NativeLibrary gles_library = base::LoadNativeLibrary(
157 gles_path.Append(L"libglesv2.dll"), NULL); 160 gles_path.Append(L"libglesv2.dll"), NULL);
158 if (!gles_library) { 161 if (!gles_library) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ClearGLBindingsGL(); 282 ClearGLBindingsGL();
280 ClearGLBindingsOSMESA(); 283 ClearGLBindingsOSMESA();
281 ClearGLBindingsWGL(); 284 ClearGLBindingsWGL();
282 SetGLImplementation(kGLImplementationNone); 285 SetGLImplementation(kGLImplementationNone);
283 286
284 UnloadGLNativeLibraries(); 287 UnloadGLNativeLibraries();
285 UnloadD3DXLibraries(NULL); 288 UnloadD3DXLibraries(NULL);
286 } 289 }
287 290
288 } // namespace gfx 291 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698