OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkGraphics_DEFINED | 10 #ifndef SkGraphics_DEFINED |
11 #define SkGraphics_DEFINED | 11 #define SkGraphics_DEFINED |
12 | 12 |
13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
14 | 14 |
15 class SkDiscardableMemoryFactory; | |
16 | |
15 class SK_API SkGraphics { | 17 class SK_API SkGraphics { |
16 public: | 18 public: |
17 /** | 19 /** |
18 * Call this at process initialization time if your environment does not | 20 * Call this at process initialization time if your environment does not |
19 * permit static global initializers that execute code. Note that | 21 * permit static global initializers that execute code. Note that |
20 * Init() is not thread-safe. | 22 * Init() is not thread-safe. |
21 */ | 23 */ |
22 static void Init(); | 24 static void Init(); |
23 | 25 |
24 /** | 26 /** |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 * For debugging purposes, this will attempt to purge the font cache. It | 59 * For debugging purposes, this will attempt to purge the font cache. It |
58 * does not change the limit, but will cause subsequent font measures and | 60 * does not change the limit, but will cause subsequent font measures and |
59 * draws to be recreated, since they will no longer be in the cache. | 61 * draws to be recreated, since they will no longer be in the cache. |
60 */ | 62 */ |
61 static void PurgeFontCache(); | 63 static void PurgeFontCache(); |
62 | 64 |
63 static size_t GetImageCacheBytesUsed(); | 65 static size_t GetImageCacheBytesUsed(); |
64 static size_t GetImageCacheByteLimit(); | 66 static size_t GetImageCacheByteLimit(); |
65 static size_t SetImageCacheByteLimit(size_t newLimit); | 67 static size_t SetImageCacheByteLimit(size_t newLimit); |
66 | 68 |
69 static void SetSkDiscardableMemoryFactory( | |
scroggo
2013/08/15 14:06:06
Once SetSkDiscardableMemoryFactory does something,
ernstm
2013/08/15 20:26:37
Replaced SkDiscardableMemoryFactory by a factory f
| |
70 SkDiscardableMemoryFactory* factory); | |
71 | |
67 /** | 72 /** |
68 * Applications with command line options may pass optional state, such | 73 * Applications with command line options may pass optional state, such |
69 * as cache sizes, here, for instance: | 74 * as cache sizes, here, for instance: |
70 * font-cache-limit=12345678 | 75 * font-cache-limit=12345678 |
71 * | 76 * |
72 * The flags format is name=value[;name=value...] with no spaces. | 77 * The flags format is name=value[;name=value...] with no spaces. |
73 * This format is subject to change. | 78 * This format is subject to change. |
74 */ | 79 */ |
75 static void SetFlags(const char* flags); | 80 static void SetFlags(const char* flags); |
76 | 81 |
(...skipping 29 matching lines...) Expand all Loading... | |
106 public: | 111 public: |
107 SkAutoGraphics() { | 112 SkAutoGraphics() { |
108 SkGraphics::Init(); | 113 SkGraphics::Init(); |
109 } | 114 } |
110 ~SkAutoGraphics() { | 115 ~SkAutoGraphics() { |
111 SkGraphics::Term(); | 116 SkGraphics::Term(); |
112 } | 117 } |
113 }; | 118 }; |
114 | 119 |
115 #endif | 120 #endif |
OLD | NEW |