| Index: src/gpu/GrLayerCache.cpp
|
| diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp
|
| index aea1c9b30f9f737dbc7a3b82dc2cfbddf688c958..a023e6536e1faa59c2e4b0c0200f38b28bf48429 100644
|
| --- a/src/gpu/GrLayerCache.cpp
|
| +++ b/src/gpu/GrLayerCache.cpp
|
| @@ -6,6 +6,7 @@
|
| */
|
|
|
| #include "GrAtlas.h"
|
| +#include "GrDrawContext.h"
|
| #include "GrGpu.h"
|
| #include "GrLayerCache.h"
|
| #include "GrSurfacePriv.h"
|
| @@ -465,7 +466,11 @@ void GrLayerCache::purgeAll() {
|
|
|
| SkASSERT(0 == fPictureHash.count());
|
|
|
| - fContext->discardRenderTarget(fAtlas->getTexture()->asRenderTarget());
|
| + GrDrawContext* drawContext = fContext->drawContext();
|
| +
|
| + if (drawContext) {
|
| + drawContext->discard(fAtlas->getTexture()->asRenderTarget());
|
| + }
|
| }
|
| #endif
|
|
|
|
|