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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2748273003: HDR: Force raster into sRGB space when HDR is enabled (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 752c352ef24b4558a268792a59dc5bf41eaac24b..27f9a45fc1c1a884b0473ebf7d8966ece433723b 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -316,6 +316,15 @@ bool RenderViewHostImpl::CreateRenderView(
params->page_zoom_level = delegate_->GetPendingPageZoomLevel();
params->image_decode_color_space = gfx::ICCProfile::FromBestMonitor();
+ // Pretend that HDR displays are sRGB so that we do not have inconsistent
+ // coloring.
+ // TODO(ccameron): Disable this once color correct rasterization is functional
+ // https://crbug.com/701942
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableHDR)) {
+ gfx::ColorSpace::CreateSRGB().GetICCProfile(
+ &params->image_decode_color_space);
+ }
+
GetWidget()->GetResizeParams(&params->initial_size);
GetWidget()->SetInitialRenderSizeParams(params->initial_size);
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698