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

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 1913743002: Add another dollop of sk_sp to SkSpecialImage and SkSpecialSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm std::move Created 4 years, 8 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 | « src/core/SkSpecialSurface.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurImageFilter.cpp
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index d233c04ea7c3e1e67f8871090a1b5ed8f3aa63b5..bbe351db47d0a78bdea92cf6f286e26dee768e32 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -106,7 +106,7 @@ sk_sp<SkSpecialImage> SkBlurImageFilter::onFilterImage(SkSpecialImage* source,
#if SK_SUPPORT_GPU
if (source->isTextureBacked()) {
GrContext* context = source->getContext();
- SkAutoTUnref<GrTexture> inputTexture(input->asTextureRef(context));
+ sk_sp<GrTexture> inputTexture(input->asTextureRef(context));
SkASSERT(inputTexture);
if (0 == sigma.x() && 0 == sigma.y()) {
@@ -121,21 +121,21 @@ sk_sp<SkSpecialImage> SkBlurImageFilter::onFilterImage(SkSpecialImage* source,
inputBounds.offset(-inputOffset);
dstBounds.offset(-inputOffset);
SkRect inputBoundsF(SkRect::Make(inputBounds));
- SkAutoTUnref<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(context,
- inputTexture,
- false,
- source->props().isGammaCorrect(),
- SkRect::Make(dstBounds),
- &inputBoundsF,
- sigma.x(),
- sigma.y()));
+ sk_sp<GrTexture> tex(SkGpuBlurUtils::GaussianBlur(context,
+ inputTexture.get(),
+ false,
+ source->props().isGammaCorrect(),
+ SkRect::Make(dstBounds),
+ &inputBoundsF,
+ sigma.x(),
+ sigma.y()));
if (!tex) {
return nullptr;
}
return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(dstBounds.width(), dstBounds.height()),
kNeedNewImageUniqueID_SpecialImage,
- tex, &source->props());
+ std::move(tex), &source->props());
}
#endif
« no previous file with comments | « src/core/SkSpecialSurface.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698