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); |
} |