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

Side by Side Diff: core/win/d3d9/install_check.cc

Issue 147039: Code to load the software renderer and initialize it. Build scripts copy the ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 6 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 | core/win/d3d9/renderer_d3d9.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 return true; 209 return true;
210 } 210 }
211 211
212 bool D3D9SoftwareInstallCheck(std::string* error) { 212 bool D3D9SoftwareInstallCheck(std::string* error) {
213 scoped_array<TCHAR> dll_path(new TCHAR[_MAX_PATH]); 213 scoped_array<TCHAR> dll_path(new TCHAR[_MAX_PATH]);
214 if (!GetModuleDirectory(dll_path.get(), error)) { 214 if (!GetModuleDirectory(dll_path.get(), error)) {
215 return false; 215 return false;
216 } 216 }
217 217
218 if (!PathAppend(dll_path.get(), _T("O3DExtras\\swrend\\d3d9.dll"))) { 218 if (!PathAppend(dll_path.get(), _T("O3DExtras\\swiftshader_d3d9.dll"))) {
219 *error = "Failed to compute new plugin location."; 219 *error = "Failed to compute new software renderer location.";
220 return false; 220 return false;
221 } 221 }
222 222
223 g_d3d9_software = LoadLibrary(dll_path.get()); 223 g_d3d9_software = LoadLibrary(dll_path.get());
224 if (!g_d3d9_software) { 224 if (!g_d3d9_software) {
225 *error = "Failed to load software renderer."; 225 *error = "Failed to load software renderer.";
226 return false; 226 return false;
227 } 227 }
228 228
229 Direct3DCreate9Software = reinterpret_cast<Direct3DCreate9_Ptr>( 229 Direct3DCreate9Software = reinterpret_cast<Direct3DCreate9_Ptr>(
(...skipping 16 matching lines...) Expand all
246 return false; 246 return false;
247 } 247 }
248 248
249 // Failure to find the software renderer is not an error at this point. 249 // Failure to find the software renderer is not an error at this point.
250 D3D9SoftwareInstallCheck(error); 250 D3D9SoftwareInstallCheck(error);
251 251
252 return true; 252 return true;
253 } 253 }
254 254
255 } // namespace o3d 255 } // namespace o3d
OLDNEW
« no previous file with comments | « no previous file | core/win/d3d9/renderer_d3d9.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698