Reviewers: esprehn
CL:
https://codereview.chromium.org/2646853007/Message:
Created Revert of Use ICCProfile to construct SkColorSpace
Description:
Revert of Use ICCProfile to construct SkColorSpace (patchset #1 id:1 of
https://codereview.chromium.org/2644233004/ )
Reason for revert:
Broke continuous bots, but not trybots
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.11/builds/15367Original issue's description:
> Use ICCProfile to construct SkColorSpace
>
> This is a re-landing of parts of
>
https://codereview.chromium.org/2605743002/>
> To determine the reason for trybots not matching continuous bots.
>
> TBR=esprehn
> BUG=634102
>
> Review-Url:
https://codereview.chromium.org/2644233004> Cr-Commit-Position: refs/heads/master@{#445255}
> Committed:
https://chromium.googlesource.com/chromium/src/+/a7c18cdafd7db2229539a5e0b5b19c7cb8c6d862TBR=esp...@chromium.org# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=634102
Affected files (+2, -4 lines):
M third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
Index: third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
index 8ca79b85f78cb2be9fe4a4ae75befbcacc8c7f3f..65a560a1b30309197b0221919b7667ed94038463 100644
--- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
@@ -33,11 +33,9 @@
// Attempt to convert the ICC profile to an SkColorSpace.
if (!(profile == gfx::ICCProfile())) {
- sk_sp<SkColorSpace> profileColorSpace =
- profile.GetColorSpace().ToSkColorSpace();
- gTargetColorSpace = profileColorSpace.release();
-
const std::vector<char>& data = profile.GetData();
+ gTargetColorSpace =
+ SkColorSpace::MakeICC(data.data(), data.size()).release();
sk_sp<SkICC> skICC = SkICC::Make(data.data(), data.size());
if (skICC) {
SkMatrix44 toXYZD50;