Index: src/gpu/SkGr.cpp |
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp |
index 3334095a95f700b8183bef085d053de92d87ecda..9aa79618a2dd04f9bd597e97e53b8a5c89b747e6 100644 |
--- a/src/gpu/SkGr.cpp |
+++ b/src/gpu/SkGr.cpp |
@@ -407,9 +407,11 @@ static GrTexture* load_yuv_texture(GrContext* ctx, const GrUniqueKey& optionalKe |
bool needsExactTexture = |
(yuvDesc.fWidth != yuvInfo.fSize[0].fWidth) || |
(yuvDesc.fHeight != yuvInfo.fSize[0].fHeight); |
- yuvTextures[i].reset(ctx->textureProvider()->refScratchTexture(yuvDesc, |
- needsExactTexture ? GrTextureProvider::kExact_ScratchTexMatch : |
- GrTextureProvider::kApprox_ScratchTexMatch)); |
+ if (needsExactTexture) { |
+ yuvTextures[i].reset(ctx->textureProvider()->createTexture(yuvDesc, true)); |
+ } else { |
+ yuvTextures[i].reset(ctx->textureProvider()->createApproxTexture(yuvDesc)); |
+ } |
if (!yuvTextures[i] || |
!yuvTextures[i]->writePixels(0, 0, yuvDesc.fWidth, yuvDesc.fHeight, |
yuvDesc.fConfig, planes[i], yuvInfo.fRowBytes[i])) { |