Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: src/gpu/GrLayerCache.h

Issue 678403002: Discard atlas after every MultiPictureDraw::draw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix rebase error Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkMultiPictureDraw.cpp ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.h
diff --git a/src/gpu/GrLayerCache.h b/src/gpu/GrLayerCache.h
index c77233292254ee9a155a528087de48e9d4563c2e..632cd0054028547722a91c2caa35931e918abd5d 100644
--- a/src/gpu/GrLayerCache.h
+++ b/src/gpu/GrLayerCache.h
@@ -18,6 +18,9 @@
class SkPicture;
+// Set to 0 to disable caching of hoisted layers
+#define GR_CACHE_HOISTED_LAYERS 0
+
// The layer cache listens for these messages to purge picture-related resources.
struct GrPictureDeletedMessage {
uint32_t pictureID;
@@ -249,6 +252,10 @@ public:
return width <= kPlotWidth && height <= kPlotHeight;
}
+#if !GR_CACHE_HOISTED_LAYERS
+ void purgeAll();
+#endif
+
private:
static const int kAtlasTextureWidth = 1024;
static const int kAtlasTextureHeight = 1024;
@@ -291,8 +298,6 @@ private:
const SkIRect& bounds, const SkMatrix& ctm,
const SkPaint* paint);
- void purgeAll();
-
// Remove all the layers (and unlock any resources) associated with 'pictureID'
void purge(uint32_t pictureID);
« no previous file with comments | « src/core/SkMultiPictureDraw.cpp ('k') | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698