OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 SkGlyphCache_Globals_DEFINED | 8 #ifndef SkGlyphCache_Globals_DEFINED |
9 #define SkGlyphCache_Globals_DEFINED | 9 #define SkGlyphCache_Globals_DEFINED |
10 | 10 |
11 #include "SkGlyphCache.h" | 11 #include "SkGlyphCache.h" |
12 #include "SkTLS.h" | 12 #include "SkTLS.h" |
13 | 13 |
14 #ifndef SK_DEFAULT_FONT_CACHE_COUNT_LIMIT | 14 #ifndef SK_DEFAULT_FONT_CACHE_COUNT_LIMIT |
15 #define SK_DEFAULT_FONT_CACHE_COUNT_LIMIT 256 | 15 #define SK_DEFAULT_FONT_CACHE_COUNT_LIMIT 2048 |
16 #endif | 16 #endif |
17 | 17 |
18 #ifndef SK_DEFAULT_FONT_CACHE_LIMIT | 18 #ifndef SK_DEFAULT_FONT_CACHE_LIMIT |
19 #define SK_DEFAULT_FONT_CACHE_LIMIT (2 * 1024 * 1024) | 19 #define SK_DEFAULT_FONT_CACHE_LIMIT (2 * 1024 * 1024) |
20 #endif | 20 #endif |
21 | 21 |
22 /////////////////////////////////////////////////////////////////////////////// | 22 /////////////////////////////////////////////////////////////////////////////// |
23 | 23 |
24 class SkMutex; | 24 class SkMutex; |
25 | 25 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 static void* CreateTLS() { | 113 static void* CreateTLS() { |
114 return SkNEW_ARGS(SkGlyphCache_Globals, (kNo_UseMutex)); | 114 return SkNEW_ARGS(SkGlyphCache_Globals, (kNo_UseMutex)); |
115 } | 115 } |
116 | 116 |
117 static void DeleteTLS(void* ptr) { | 117 static void DeleteTLS(void* ptr) { |
118 SkDELETE((SkGlyphCache_Globals*)ptr); | 118 SkDELETE((SkGlyphCache_Globals*)ptr); |
119 } | 119 } |
120 }; | 120 }; |
121 | 121 |
122 #endif | 122 #endif |
OLD | NEW |