aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/yuvtorgbeffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/yuvtorgbeffect.cpp')
-rw-r--r--gm/yuvtorgbeffect.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 5a9ccddb71..001c53d701 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -118,7 +118,7 @@ protected:
{1, 2, 0}, {2, 0, 1}, {2, 1, 0}};
for (int i = 0; i < 6; ++i) {
- sk_sp<GrFragmentProcessor> fp(
+ std::unique_ptr<GrFragmentProcessor> fp(
GrYUVEffect::MakeYUVToRGB(proxy[indices[i][0]],
proxy[indices[i][1]],
proxy[indices[i][2]],
@@ -247,13 +247,12 @@ protected:
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
- sk_sp<GrFragmentProcessor> fp(
- GrYUVEffect::MakeYUVToRGB(proxy[0], proxy[1], proxy[2], sizes,
- static_cast<SkYUVColorSpace>(space), true));
+ auto fp = GrYUVEffect::MakeYUVToRGB(proxy[0], proxy[1], proxy[2], sizes,
+ static_cast<SkYUVColorSpace>(space), true);
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
- grPaint.addColorFragmentProcessor(fp);
+ grPaint.addColorFragmentProcessor(std::move(fp));
renderTargetContext->priv().testingOnly_addDrawOp(GrRectOpFactory::MakeNonAAFill(
std::move(grPaint), viewMatrix, renderRect, GrAAType::kNone));
}