Index: gm/image_pict.cpp |
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp |
index e8cd5e0748c42579141076b383731f447cc1a89c..f88a20ba277ea46b0bf752f948701ae925e1d7e1 100644 |
--- a/gm/image_pict.cpp |
+++ b/gm/image_pict.cpp |
@@ -314,10 +314,10 @@ protected: |
static void draw_as_tex(SkCanvas* canvas, SkImageCacherator* cache, SkScalar x, SkScalar y) { |
#if SK_SUPPORT_GPU |
- SkAutoTUnref<GrTexture> texture(cache->lockAsTexture(canvas->getGrContext(), |
- GrTextureParams::ClampBilerp(), |
- SkSourceGammaTreatment::kRespect, |
- nullptr)); |
+ sk_sp<GrTexture> texture(cache->lockAsTexture(canvas->getGrContext(), |
+ GrTextureParams::ClampBilerp(), |
+ SkSourceGammaTreatment::kRespect, |
+ nullptr)); |
if (!texture) { |
// show placeholder if we have no texture |
SkPaint paint; |
@@ -330,11 +330,12 @@ protected: |
return; |
} |
// No API to draw a GrTexture directly, so we cheat and create a private image subclass |
- SkAutoTUnref<SkImage> image(new SkImage_Gpu(cache->info().width(), cache->info().height(), |
- cache->uniqueID(), kPremul_SkAlphaType, texture, |
- sk_ref_sp(cache->info().colorSpace()), |
- SkBudgeted::kNo)); |
- canvas->drawImage(image, x, y); |
+ sk_sp<SkImage> image(new SkImage_Gpu(cache->info().width(), cache->info().height(), |
+ cache->uniqueID(), kPremul_SkAlphaType, |
+ std::move(texture), |
+ sk_ref_sp(cache->info().colorSpace()), |
+ SkBudgeted::kNo)); |
+ canvas->drawImage(image.get(), x, y); |
#endif |
} |