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

Unified Diff: src/lazy/SkDiscardableMemoryPool.h

Issue 433063002: Memory improvements to render_pdfs; better DM pool size defaults (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: default DM_POOL_SIZE smalle ron android Created 6 years, 4 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 | « gyp/tools.gyp ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkDiscardableMemoryPool.h
diff --git a/src/lazy/SkDiscardableMemoryPool.h b/src/lazy/SkDiscardableMemoryPool.h
index d141507004151360931df09b8622862dc480962b..6f528782b9e87d1e2e1ca112ec61869d8c24ecd3 100644
--- a/src/lazy/SkDiscardableMemoryPool.h
+++ b/src/lazy/SkDiscardableMemoryPool.h
@@ -62,7 +62,19 @@ public:
SkDiscardableMemoryPool* SkGetGlobalDiscardableMemoryPool();
#if !defined(SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE)
-#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (128 * 1024 * 1024)
+ #if defined(SK_DEFAULT_RESOURCE_CACHE_MB_LIMIT) && \
+ SK_DEFAULT_RESOURCE_CACHE_MB_LIMIT > 0
+ #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE \
+ (SK_DEFAULT_RESOURCE_CACHE_MB_LIMIT * 1024 * 1024)
+ #else
+ #ifdef SK_BUILD_FOR_ANDROID
+ #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE \
+ (64 * 1024 * 1024)
+ #else
+ #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE \
+ (128 * 1024 * 1024)
+ #endif
+ #endif
#endif
#endif // SkDiscardableMemoryPool_DEFINED
« no previous file with comments | « gyp/tools.gyp ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698