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

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

Issue 2496913003: Display linear-srgb color managed canvas (Closed)
Patch Set: Created 4 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
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 a0f34b66f7d98c3db9ead41896275692cb19d157..ae97d2d3682be2cbcd45847d606d8df827570a76 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -372,9 +372,15 @@ bool RenderViewHostImpl::CreateRenderView(
params->page_zoom_level = delegate_->GetPendingPageZoomLevel();
params->image_decode_color_space = gfx::ICCProfile::FromBestMonitor();
+ // If color correct rendering is enabled, we need to communicate it to
+ // gfx::ICCProfile so the conversion requests to gfx::ColorSpace do not
+ // return unspecified color space.
+ base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
+ gfx::ICCProfile::SetColorCorrectRendering(
+ cmd->HasSwitch(cc::switches::kEnableColorCorrectRendering));
+
GetWidget()->GetResizeParams(&params->initial_size);
GetWidget()->SetInitialRenderSizeParams(params->initial_size);
-
GetProcess()->GetRendererInterface()->CreateView(std::move(params));
// If it's enabled, tell the renderer to set up the Javascript bindings for

Powered by Google App Engine
This is Rietveld 408576698