Index: src/core/SkImageCacherator.cpp |
diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp |
index 7b5ff2267774463584c525bdd0f2cc5ee3fcbd8a..0df14df95c5f8f3542acbee5060f84f14a6549d2 100644 |
--- a/src/core/SkImageCacherator.cpp |
+++ b/src/core/SkImageCacherator.cpp |
@@ -291,11 +291,11 @@ GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key |
{ |
ScopedGenerator generator(this); |
Generator_GrYUVProvider provider(generator); |
- GrTexture* tex = provider.refAsTexture(ctx, desc, true); |
+ sk_sp<GrTexture> tex = provider.refAsTexture(ctx, desc, true); |
if (tex) { |
SK_HISTOGRAM_ENUMERATION("LockTexturePath", kYUV_LockTexturePath, |
kLockTexturePathCount); |
- return set_key_and_return(tex, key); |
+ return set_key_and_return(tex.release(), key); |
} |
} |