OLD | NEW |
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 |
11 #include "SkDiscardableMemory.h" | 11 #include "SkDiscardableMemory.h" |
| 12 #include "SkMutex.h" |
12 | 13 |
13 #ifndef SK_LAZY_CACHE_STATS | 14 #ifndef SK_LAZY_CACHE_STATS |
14 #ifdef SK_DEBUG | 15 #ifdef SK_DEBUG |
15 #define SK_LAZY_CACHE_STATS 1 | 16 #define SK_LAZY_CACHE_STATS 1 |
16 #else | 17 #else |
17 #define SK_LAZY_CACHE_STATS 0 | 18 #define SK_LAZY_CACHE_STATS 0 |
18 #endif | 19 #endif |
19 #endif | 20 #endif |
20 | 21 |
21 /** | 22 /** |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 * Returns (and creates if needed) a threadsafe global | 60 * Returns (and creates if needed) a threadsafe global |
60 * SkDiscardableMemoryPool. | 61 * SkDiscardableMemoryPool. |
61 */ | 62 */ |
62 SkDiscardableMemoryPool* SkGetGlobalDiscardableMemoryPool(); | 63 SkDiscardableMemoryPool* SkGetGlobalDiscardableMemoryPool(); |
63 | 64 |
64 #if !defined(SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE) | 65 #if !defined(SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE) |
65 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (128 * 1024 * 1024) | 66 #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (128 * 1024 * 1024) |
66 #endif | 67 #endif |
67 | 68 |
68 #endif // SkDiscardableMemoryPool_DEFINED | 69 #endif // SkDiscardableMemoryPool_DEFINED |
OLD | NEW |