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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2925473002: color: Disable Javascript setColorSpace with color correct rendering (Closed)
Patch Set: Clean up 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
« no previous file with comments | « no previous file | content/shell/app/shell_main_delegate.cc » ('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 afd133a40c4f41e3cd54aa510658a05d2113af68..b0d3c28e316f369d2348b993236ef23a5ebeebac 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -174,6 +174,7 @@
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/switches.h"
#include "ui/latency/latency_info.h"
#include "url/origin.h"
#include "url/url_constants.h"
@@ -2523,6 +2524,13 @@ void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) {
void RenderViewImpl::SetDeviceColorProfileForTesting(
const gfx::ICCProfile& icc_profile) {
+ // TODO(ccameron): Remove this call when color correct rendering is the
+ // default.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableColorCorrectRendering)) {
+ return;
+ }
+
if (webview())
webview()->SetDeviceColorProfile(icc_profile);
« no previous file with comments | « no previous file | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698