diff options
author | 2014-10-29 13:56:02 -0700 | |
---|---|---|
committer | 2014-10-29 13:56:03 -0700 | |
commit | 4ab5a9048cf327adfc9ef9757ea956d7003ba047 (patch) | |
tree | d765921e3899abbdf80158a3f9dac7d7060b9828 /src/gpu/GrLayerHoister.cpp | |
parent | 79c276e4fd93d9c9fd57a45bc6929c48e4415b2f (diff) |
Discard atlas after every MultiPictureDraw::draw
This is intended to prevent ghosting on tiled architectures.
This CL also defers creation of the atlas (and its texture) until it is actually needed.
Committed: https://skia.googlesource.com/skia/+/6d5b5455743414ddb11d2b8c1fe9d7959f2b853d
Review URL: https://codereview.chromium.org/678403002
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();) } - |