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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2216073002: Color: Add ColorCorrectRendering flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decoder_profile
Patch Set: Rebase Created 4 years, 4 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 | « content/public/common/web_preferences.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 81b2c975cd4da79da85e0de6ce200d073e2dc95d..e520a33f9fc20339077e364b54fe300addc7d0ac 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1033,8 +1033,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
settings->setDeviceSupportsMouse(prefs.device_supports_mouse);
settings->setEnableTouchAdjustment(prefs.touch_adjustment_enabled);
- WebRuntimeFeatures::enableImageColorProfiles(
- prefs.image_color_profiles_enabled);
+ WebRuntimeFeatures::enableColorCorrectRendering(
+ prefs.color_correct_rendering_enabled);
settings->setShouldRespectImageOrientation(
prefs.should_respect_image_orientation);
@@ -2700,14 +2700,8 @@ void RenderViewImpl::SetFocus(bool enable) {
void RenderViewImpl::RenderWidgetDidSetColorProfile(
const std::vector<char>& profile) {
if (webview()) {
- bool was_reset = (profile.size() == 1 && profile[0] == '0');
-
- if (was_reset) {
- webview()->resetDeviceColorProfileForTesting();
- } else {
- WebVector<char> colorProfile = profile;
- webview()->setDeviceColorProfile(colorProfile);
- }
+ WebVector<char> colorProfile = profile;
+ webview()->setDeviceColorProfile(colorProfile);
}
}
« no previous file with comments | « content/public/common/web_preferences.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698