8#ifndef SkImageFilterCache_DEFINED
9#define SkImageFilterCache_DEFINED
21namespace skif {
class FilterResult; }
25 const SkIRect& clipBounds, uint32_t srcGenID,
const SkIRect& srcSubset)
33 sizeof(
SkIRect) +
sizeof(uint32_t) + 4 *
sizeof(int32_t),
34 "image_filter_key_tight_packing");
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
virtual bool get(const SkImageFilterCacheKey &key, skif::FilterResult *result) const =0
virtual void set(const SkImageFilterCacheKey &key, const SkImageFilter *filter, const skif::FilterResult &result)=0
static sk_sp< SkImageFilterCache > Get(CreateIfNecessary=CreateIfNecessary::kYes)
virtual void purgeByImageFilter(const SkImageFilter *)=0
static constexpr size_t kDefaultTransientSize
static sk_sp< SkImageFilterCache > Create(size_t maxBytes)
~SkImageFilterCache() override
unsigned useCenter Optional< SkMatrix > matrix
SkImageFilterCacheKey(const uint32_t uniqueID, const SkMatrix &matrix, const SkIRect &clipBounds, uint32_t srcGenID, const SkIRect &srcSubset)
bool operator==(const SkImageFilterCacheKey &other) const