8 #ifndef SkGraphics_DEFINED
9 #define SkGraphics_DEFINED
12 #include "include/private/base/SkAPI.h"
130 typedef std::unique_ptr<SkImageGenerator>
140 static ImageGeneratorFromEncodedDataFactory
151 std::unique_ptr<SkOpenTypeSVGDecoder> (*)(
const uint8_t* svg,
size_t length);
SkData holds an immutable data buffer.
Definition: SkData.h:25
Definition: SkGraphics.h:23
static int GetFontCacheCountLimit()
Return the current limit to the number of entries in the font cache.
std::unique_ptr< SkOpenTypeSVGDecoder >(*)(const uint8_t *svg, size_t length) OpenTypeSVGDecoderFactory
To draw OpenType SVG data, Skia will look at this runtime function pointer.
Definition: SkGraphics.h:151
static size_t SetResourceCacheSingleAllocationByteLimit(size_t newLimit)
static size_t SetResourceCacheTotalByteLimit(size_t newLimit)
static size_t SetFontCacheLimit(size_t bytes)
Specify the max number of bytes that should be used by the font cache.
static ImageGeneratorFromEncodedDataFactory SetImageGeneratorFromEncodedDataFactory(ImageGeneratorFromEncodedDataFactory)
To instantiate images from encoded data, first looks at this runtime function-ptr.
static void PurgeFontCache()
For debugging purposes, this will attempt to purge the font cache.
static void PurgeResourceCache()
For debugging purposes, this will attempt to purge the resource cache.
static void PurgePinnedFontCache()
If the strike cache is above the cache limit, attempt to purge strikes with pinners.
static OpenTypeSVGDecoderFactory GetOpenTypeSVGDecoderFactory()
static int SetFontCacheCountLimit(int count)
Set the limit to the number of entries in the font cache, and return the previous value.
static int GetFontCacheCountUsed()
Return the number of entries in the font cache.
static size_t GetFontCacheUsed()
Return the number of bytes currently used by the font cache.
static void PurgeAllCaches()
Free as much globally cached memory as possible.
static OpenTypeSVGDecoderFactory SetOpenTypeSVGDecoderFactory(OpenTypeSVGDecoderFactory)
static size_t GetFontCacheLimit()
Return the max number of bytes that should be used by the font cache.
static void DumpMemoryStatistics(SkTraceMemoryDump *dump)
Dumps memory usage of caches using the SkTraceMemoryDump interface.
static size_t GetResourceCacheSingleAllocationByteLimit()
When the cachable entry is very lage (e.g.
static size_t GetResourceCacheTotalBytesUsed()
This function returns the memory used for temporary images and other resources.
static size_t GetResourceCacheTotalByteLimit()
These functions get/set the memory usage limit for the resource cache, used for temporary bitmaps and...
static void Init()
Call this at process initialization time if your environment does not permit static global initialize...
Definition: SkImageGenerator.h:28
Definition: SkOpenTypeSVGDecoder.h:19
Interface for memory tracing.
Definition: SkTraceMemoryDump.h:20