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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « gyp/tools.gyp ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkDiscardableMemoryPool_DEFINED 8 #ifndef SkDiscardableMemoryPool_DEFINED
9 #define SkDiscardableMemoryPool_DEFINED 9 #define SkDiscardableMemoryPool_DEFINED
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 size_t size, SkBaseMutex* mutex = NULL); 55 size_t size, SkBaseMutex* mutex = NULL);
56 }; 56 };
57 57
58 /** 58 /**
59 * Returns (and creates if needed) a threadsafe global 59 * Returns (and creates if needed) a threadsafe global
60 * SkDiscardableMemoryPool. 60 * SkDiscardableMemoryPool.
61 */ 61 */
62 SkDiscardableMemoryPool* SkGetGlobalDiscardableMemoryPool(); 62 SkDiscardableMemoryPool* SkGetGlobalDiscardableMemoryPool();
63 63
64 #if !defined(SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE) 64 #if !defined(SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE)
65 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (128 * 1024 * 1024) 65 #if defined(SK_DEFAULT_RESOURCE_CACHE_MB_LIMIT) && \
66 SK_DEFAULT_RESOURCE_CACHE_MB_LIMIT > 0
67 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE \
68 (SK_DEFAULT_RESOURCE_CACHE_MB_LIMIT * 1024 * 1024)
69 #else
70 #ifdef SK_BUILD_FOR_ANDROID
71 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE \
72 (64 * 1024 * 1024)
73 #else
74 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE \
75 (128 * 1024 * 1024)
76 #endif
77 #endif
66 #endif 78 #endif
67 79
68 #endif // SkDiscardableMemoryPool_DEFINED 80 #endif // SkDiscardableMemoryPool_DEFINED
OLDNEW
« 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