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

Unified Diff: gm/colorspacexform.cpp

Issue 2360863003: Make SkColorSpaceXform::New() take bare ptrs (Closed)
Patch Set: Created 4 years, 3 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 | « bench/ColorCodecBench.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698