diff options
Diffstat (limited to 'include/core/SkGraphics.h')
-rw-r--r-- | include/core/SkGraphics.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h index 9e78dde5e4..3cfd70ffc2 100644 --- a/include/core/SkGraphics.h +++ b/include/core/SkGraphics.h @@ -65,6 +65,29 @@ public: */ static void SetFlags(const char* flags); + /** + * Return the max number of bytes that should be used by the thread-local + * font cache. + * If the cache needs to allocate more, it will purge previous entries. + * This max can be changed by calling SetFontCacheLimit(). + * + * If this thread has never called SetTLSFontCacheLimit, or has called it + * with 0, then this thread is using the shared font cache. In that case, + * this function will always return 0, and the caller may want to call + * GetFontCacheLimit. + */ + static size_t GetTLSFontCacheLimit(); + + /** + * Specify the max number of bytes that should be used by the thread-local + * font cache. If this value is zero (the default), then this thread will + * share the global font cache and its limit. + * + * This function returns the previous setting, as if GetFontCacheLimit() + * had be called before the new limit was set. + */ + static size_t SetTLSFontCacheLimit(size_t bytes); + private: /** This is automatically called by SkGraphics::Init(), and must be implemented by the host OS. This allows the host OS to register a callback |