Index: gm/colorspacexform.cpp |
diff --git a/gm/colorspacexform.cpp b/gm/colorspacexform.cpp |
index b3d79c91f027f910cea41caffc4aba421d53df54..e1afb1cbfbbd4804fdedcdd58bd947fbb4c183ad 100644 |
--- a/gm/colorspacexform.cpp |
+++ b/gm/colorspacexform.cpp |
@@ -37,9 +37,12 @@ protected: |
SkMatrix44 wideGamut(SkMatrix44::kUninitialized_Constructor); |
wideGamut.set3x3RowMajorf(kWideGamutRGB_toXYZD50); |
- std::unique_ptr<SkColorSpaceXform> xform = SkColorSpaceXform::New( |
- SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named), |
- SkColorSpace::NewRGB(SkColorSpace::kLinear_RenderTargetGamma, wideGamut)); |
+ |
+ sk_sp<SkColorSpace> srcSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
+ sk_sp<SkColorSpace> dstSpace = |
+ SkColorSpace::NewRGB(SkColorSpace::kLinear_RenderTargetGamma, wideGamut); |
+ std::unique_ptr<SkColorSpaceXform> xform = SkColorSpaceXform::New(srcSpace.get(), |
+ dstSpace.get()); |
xform->apply(fWideGamutColors, colors, kNumColors, |
SkColorSpaceXform::kRGBA_F32_ColorFormat, kOpaque_SkAlphaType); |