Index: src/gpu/GrGpu.cpp |
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp |
index 0a2592d38046085131bc9e3a41c96e3f6fa6e0a1..d82a062c3b9bbbdb307ef292ecde68785b948e1a 100644 |
--- a/src/gpu/GrGpu.cpp |
+++ b/src/gpu/GrGpu.cpp |
@@ -178,6 +178,11 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, SkBudgeted budget |
fStats.incTextureUploads(); |
} |
} |
+ if (isRT && texels.empty()) { |
bsalomon
2016/06/30 13:47:31
I imagine that this is not going to be a long term
|
+ GrRenderTarget* rt = tex->asRenderTarget(); |
+ SkASSERT(rt); |
+ rt->discard(); |
+ } |
} |
return tex; |
} |