diff options
Diffstat (limited to 'src/gpu/GrLayerHoister.cpp')
-rw-r--r-- | src/gpu/GrLayerHoister.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp index 1f7ce419ae..00576710cd 100644 --- a/src/gpu/GrLayerHoister.cpp +++ b/src/gpu/GrLayerHoister.cpp @@ -314,13 +314,16 @@ void GrLayerHoister::UnlockLayers(GrContext* context, layerCache->removeUse(layers[i].fLayer); } -#if DISABLE_CACHING + SkDEBUGCODE(layerCache->validate();) +} + +void GrLayerHoister::PurgeCache(GrContext* context) { +#if !GR_CACHE_HOISTED_LAYERS + GrLayerCache* layerCache = context->getLayerCache(); + // This code completely clears out the atlas. It is required when // caching is disabled so the atlas doesn't fill up and force more // free floating layers layerCache->purgeAll(); #endif - - SkDEBUGCODE(layerCache->validate();) } - |