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

Unified Diff: src/gpu/GrLayerHoister.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/effects/SkXfermodeImageFilter.cpp ('k') | tests/ImageFilterCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerHoister.cpp
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp
index c768b7f3a4807d15926892ff73ade52214faeb5f..a2d42e02a96a889c7971f03dfb1c39aeff3555cf 100644
--- a/src/gpu/GrLayerHoister.cpp
+++ b/src/gpu/GrLayerHoister.cpp
@@ -303,7 +303,7 @@ void GrLayerHoister::FilterLayer(GrContext* context,
const SkIRect subset = SkIRect::MakeWH(layer->texture()->width(), layer->texture()->height());
sk_sp<SkSpecialImage> img(SkSpecialImage::MakeFromGpu(subset,
kNeedNewImageUniqueID_SpecialImage,
- layer->texture(),
+ sk_ref_sp(layer->texture()),
props));
SkIPoint offset = SkIPoint::Make(0, 0);
@@ -316,8 +316,8 @@ void GrLayerHoister::FilterLayer(GrContext* context,
}
SkASSERT(result->isTextureBacked());
- SkAutoTUnref<GrTexture> texture(result->asTextureRef(context));
- layer->setTexture(texture, result->subset(), false);
+ sk_sp<GrTexture> texture(result->asTextureRef(context));
+ layer->setTexture(texture.get(), result->subset(), false);
layer->setOffset(offset);
}
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | tests/ImageFilterCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698