aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrLayerHoister.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-10-29 08:05:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-29 08:05:21 -0700
commit6d5b5455743414ddb11d2b8c1fe9d7959f2b853d (patch)
treed93832b6b22fd657e5c1a18ffcb768c75a421e7c /src/gpu/GrLayerHoister.h
parent5abfa688b7beafaecbfbdbc76677344f78394f4b (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. Review URL: https://codereview.chromium.org/678403002
Diffstat (limited to 'src/gpu/GrLayerHoister.h')
-rw-r--r--src/gpu/GrLayerHoister.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrLayerHoister.h b/src/gpu/GrLayerHoister.h
index 82dd967bb3..c3a451df57 100644
--- a/src/gpu/GrLayerHoister.h
+++ b/src/gpu/GrLayerHoister.h
@@ -87,6 +87,12 @@ public:
@param layers Unneeded layers in the atlas
*/
static void UnlockLayers(GrContext* context, const SkTDArray<GrHoistedLayer>& layers);
+
+ /** Forceably remove all cached layers and release the atlas. Useful for debugging and timing.
+ This is only functional when GR_CACHE_HOISTED_LAYERS is set to 1 in GrLayerCache.h
+ @param context Owner of the layer cache (and thus the layers)
+ */
+ static void PurgeCache(GrContext* context);
};
#endif