| Index: src/gpu/GrGpu.cpp
|
| diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
|
| index 0a2592d38046085131bc9e3a41c96e3f6fa6e0a1..1397845f42de6d9bcf7d0ef931ee1e3672bae285 100644
|
| --- a/src/gpu/GrGpu.cpp
|
| +++ b/src/gpu/GrGpu.cpp
|
| @@ -178,6 +178,14 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, SkBudgeted budget
|
| fStats.incTextureUploads();
|
| }
|
| }
|
| + // This is a current work around to get discards into newly created textures. Once we are in
|
| + // MDB world, we should remove this code a rely on the draw target having specified load
|
| + // operations.
|
| + if (isRT && texels.empty()) {
|
| + GrRenderTarget* rt = tex->asRenderTarget();
|
| + SkASSERT(rt);
|
| + rt->discard();
|
| + }
|
| }
|
| return tex;
|
| }
|
|
|