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

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

Issue 606005: Fix the software renderer "soft" fullscreen mode using the wrong monitor bug. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 10 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 | plugin/win/main_win.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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 bool RendererD3D9::GoFullscreen(const DisplayWindow& display, 1384 bool RendererD3D9::GoFullscreen(const DisplayWindow& display,
1385 int mode_id) { 1385 int mode_id) {
1386 if (!fullscreen_) { 1386 if (!fullscreen_) {
1387 if (d3d_device_) { // Have we been initialized yet? 1387 if (d3d_device_) { // Have we been initialized yet?
1388 const DisplayWindowWindows& platform_display = 1388 const DisplayWindowWindows& platform_display =
1389 static_cast<const DisplayWindowWindows&>(display); 1389 static_cast<const DisplayWindowWindows&>(display);
1390 HWND window = platform_display.hwnd(); 1390 HWND window = platform_display.hwnd();
1391 int refresh_rate = 0; 1391 int refresh_rate = 0;
1392 bool windowed = true; 1392 bool windowed = true;
1393 1393
1394 // With software renderer, always use DISPLAY_MODE_DEFAULT.
1395 // This is due to a bug in software renderer that only the primary
1396 // monitor/adapter is recognized.
1397 ClientInfoManager* client_info_manager =
1398 service_locator()->GetService<ClientInfoManager>();
1399 if (client_info_manager->client_info().software_renderer())
1400 mode_id = DISPLAY_MODE_DEFAULT;
1401
1394 // Look up the refresh rate, width and height. 1402 // Look up the refresh rate, width and height.
1395 DisplayMode mode; 1403 DisplayMode mode;
1396 if (!GetDisplayMode(mode_id, &mode)) { 1404 if (!GetDisplayMode(mode_id, &mode)) {
1397 LOG(ERROR) << "Failed to GetDisplayMode"; 1405 LOG(ERROR) << "Failed to GetDisplayMode";
1398 return false; 1406 return false;
1399 } 1407 }
1400 1408
1401 int width = mode.width(); 1409 int width = mode.width();
1402 int height = mode.height(); 1410 int height = mode.height();
1403 1411
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 static int swizzle_table[] = { 2, 1, 0, 3, }; 1724 static int swizzle_table[] = { 2, 1, 0, 3, };
1717 return swizzle_table; 1725 return swizzle_table;
1718 } 1726 }
1719 1727
1720 // This is a factory function for creating Renderer objects. Since 1728 // This is a factory function for creating Renderer objects. Since
1721 // we're implementing D3D9, we only ever return a D3D9 renderer. 1729 // we're implementing D3D9, we only ever return a D3D9 renderer.
1722 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { 1730 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) {
1723 return RendererD3D9::CreateDefault(service_locator); 1731 return RendererD3D9::CreateDefault(service_locator);
1724 } 1732 }
1725 } // namespace o3d 1733 } // namespace o3d
OLDNEW
« no previous file with comments | « no previous file | plugin/win/main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698