Commit 6d1a552b authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Fix reversed logic in IOSurface colors

Bug: 
Change-Id: Ifec62565e096220b53149fd77e9bc96e46caa7c1
Reviewed-on: https://chromium-review.googlesource.com/792390Reviewed-by: default avatarFredrik Hubinette <hubbe@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519504}
parent 4face974
...@@ -228,13 +228,15 @@ void IOSurfaceSetColorSpace(IOSurfaceRef io_surface, ...@@ -228,13 +228,15 @@ void IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
ICCProfile icc_profile = ICCProfile::FromCacheMac(color_space); ICCProfile icc_profile = ICCProfile::FromCacheMac(color_space);
// If that fails, generate parametric data. // If that fails, generate parametric data.
if (icc_profile.IsValid()) { if (!icc_profile.IsValid()) {
icc_profile = icc_profile =
ICCProfile::FromParametricColorSpace(color_space.GetAsFullRangeRGB()); ICCProfile::FromParametricColorSpace(color_space.GetAsFullRangeRGB());
} }
// If that fails, we can't use this color space.
if (!icc_profile.IsValid()) { if (!icc_profile.IsValid()) {
DLOG(ERROR) << "Failed to set color space for IOSurface: no ICC profile."; DLOG(ERROR) << "Failed to set color space for IOSurface: no ICC profile: "
<< color_space.ToString();
return; return;
} }
std::vector<char> icc_profile_data = icc_profile.GetData(); std::vector<char> icc_profile_data = icc_profile.GetData();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment