Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index 2c2405839529f7aa27ffcef65536495542bd0490..f026ebcb378c89740bf8dcf1f82cee98a2566991 100644 |
--- a/src/image/SkImage_Gpu.cpp |
+++ b/src/image/SkImage_Gpu.cpp |
@@ -140,13 +140,13 @@ sk_sp<SkImage> SkImage_Gpu::onMakeSubset(const SkIRect& subset) const { |
desc.fWidth = subset.width(); |
desc.fHeight = subset.height(); |
- GrTexture* subTx = ctx->textureProvider()->createTexture(desc, fBudgeted); |
+ sk_sp<GrTexture> subTx(ctx->textureProvider()->createTexture(desc, fBudgeted)); |
if (!subTx) { |
return nullptr; |
} |
- ctx->copySurface(subTx, fTexture, subset, SkIPoint::Make(0, 0)); |
+ ctx->copySurface(subTx.get(), fTexture, subset, SkIPoint::Make(0, 0)); |
return sk_make_sp<SkImage_Gpu>(desc.fWidth, desc.fHeight, kNeedNewImageUniqueID, |
- fAlphaType, subTx, fBudgeted); |
+ fAlphaType, subTx.get(), fBudgeted); |
} |
/////////////////////////////////////////////////////////////////////////////////////////////////// |