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

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

Issue 2945453002: color: Use base::Feature to control color correct rendering (Closed)
Patch Set: Add histogram enum Created 3 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: 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 2b9c1d562c4274d8b745f21fa9b4cab5ad3a6651..006dab2cd47d13a854761252793aec7eec37ae1b 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -332,10 +332,8 @@ bool RenderViewHostImpl::CreateRenderView(
force_srgb_image_decode_color_space = true;
// When color correct rendering is enabled, the image_decode_color_space
// parameter should not be used (and all users of it should be using sRGB).
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableColorCorrectRendering)) {
+ if (base::FeatureList::IsEnabled(features::kColorCorrectRendering))
force_srgb_image_decode_color_space = true;
- }
if (force_srgb_image_decode_color_space) {
gfx::ColorSpace::CreateSRGB().GetICCProfile(
&params->image_decode_color_space);
@@ -514,7 +512,7 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges);
prefs.color_correct_rendering_enabled =
- command_line.HasSwitch(switches::kEnableColorCorrectRendering);
+ base::FeatureList::IsEnabled(features::kColorCorrectRendering);
prefs.spatial_navigation_enabled = command_line.HasSwitch(
switches::kEnableSpatialNavigation);
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698