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

Unified Diff: ui/gfx/color_transform.cc

Issue 2712533002: color: Fix accidental partial color conversion (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_transform.cc
diff --git a/ui/gfx/color_transform.cc b/ui/gfx/color_transform.cc
index 1d562d48401ec84c1b60a4d3f80bfb59954f310a..e6d8907a96c48b4e95bbdf0d3c8b457994638ffb 100644
--- a/ui/gfx/color_transform.cc
+++ b/ui/gfx/color_transform.cc
@@ -732,8 +732,14 @@ ColorTransformInternal::ColorTransformInternal(const ColorSpace& src,
if (!src_.IsValid())
return;
- ScopedQcmsProfile src_profile = GetQCMSProfileIfNecessary(src_);
- ScopedQcmsProfile dst_profile = GetQCMSProfileIfNecessary(dst_);
+ // If the dst profile is not set, then do only YUV to RGB conversion, so
hubbe 2017/02/21 22:46:49 I'm afraid I don't get this. When does this happen
ccameron 2017/02/22 00:08:29 This happens whenever media::kVideoColorManagement
hubbe 2017/02/22 00:10:05 Can we add some more meat to the comment to descri
ccameron 2017/02/22 00:30:48 Done.
+ // ignore any ICC profiles.
+ ScopedQcmsProfile src_profile;
+ ScopedQcmsProfile dst_profile;
+ if (dst.IsValid()) {
+ src_profile = GetQCMSProfileIfNecessary(src_);
+ dst_profile = GetQCMSProfileIfNecessary(dst_);
+ }
bool has_src_profile = !!src_profile;
bool has_dst_profile = !!dst_profile;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698