aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMultiPictureDraw.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-10-29 13:56:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-29 13:56:03 -0700
commit4ab5a9048cf327adfc9ef9757ea956d7003ba047 (patch)
treed765921e3899abbdf80158a3f9dac7d7060b9828 /src/core/SkMultiPictureDraw.cpp
parent79c276e4fd93d9c9fd57a45bc6929c48e4415b2f (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/core/SkMultiPictureDraw.cpp')
-rw-r--r--src/core/SkMultiPictureDraw.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp
index b59b63bffc..2690e8f7c0 100644
--- a/src/core/SkMultiPictureDraw.cpp
+++ b/src/core/SkMultiPictureDraw.cpp
@@ -182,6 +182,9 @@ void SkMultiPictureDraw::draw() {
#ifndef SK_IGNORE_GPU_LAYER_HOISTING
GrLayerHoister::UnlockLayers(context, atlasedNeedRendering);
GrLayerHoister::UnlockLayers(context, atlasedRecycled);
+#if !GR_CACHE_HOISTED_LAYERS
+ GrLayerHoister::PurgeCache(context);
+#endif
#endif
}