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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 131002: Enable off-by-default monitor color management on Windows. This is enabled vi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 18625)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -711,6 +711,9 @@
gfx::Rect paint_rect = bitmap_rect.Intersect(damaged_rect);
if (!paint_rect.IsEmpty()) {
DrawResizeCorner(paint_rect, backing_store->hdc());
+ bool manage_colors = BackingStore::ColorManagementEnabled();
+ if (manage_colors)
+ SetICMMode(paint_dc.m_hDC, ICM_ON);
BitBlt(paint_dc.m_hDC,
paint_rect.x(),
paint_rect.y(),
@@ -720,6 +723,8 @@
paint_rect.x(),
paint_rect.y(),
SRCCOPY);
+ if (manage_colors)
+ SetICMMode(paint_dc.m_hDC, ICM_OFF);
}
// Fill the remaining portion of the damaged_rect with the background

Powered by Google App Engine
This is Rietveld 408576698