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

Unified Diff: app/gfx/gl/gl_context_win.cc

Issue 4281003: Fixed mismatched channel order in OSMesaViewGLContext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/gl/gl_context_win.cc
===================================================================
--- app/gfx/gl/gl_context_win.cc (revision 64773)
+++ app/gfx/gl/gl_context_win.cc (working copy)
@@ -490,10 +490,10 @@
info.bV4Planes = 1;
info.bV4BitCount = 32;
info.bV4V4Compression = BI_BITFIELDS;
- info.bV4RedMask = 0xFF000000;
- info.bV4GreenMask = 0x00FF0000;
- info.bV4BlueMask = 0x0000FF00;
- info.bV4AlphaMask = 0x000000FF;
+ info.bV4RedMask = 0x000000FF;
+ info.bV4GreenMask = 0x0000FF00;
+ info.bV4BlueMask = 0x00FF0000;
+ info.bV4AlphaMask = 0xFF000000;
// Copy the back buffer to the window's device context.
return StretchDIBits(device_context_,
@@ -522,7 +522,9 @@
void OSMesaViewGLContext::UpdateSize() {
// Change back buffer size to that of window.
RECT rect;
- GetClientRect(window_, &rect);
+ if (!GetClientRect(window_, &rect))
+ return;
+
gfx::Size window_size = gfx::Size(
std::max(1, static_cast<int>(rect.right - rect.left)),
std::max(1, static_cast<int>(rect.bottom - rect.top)));
« 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