Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkImageFilterCacheKey Struct Reference

#include <SkImageFilterCache.h>

Public Member Functions

 SkImageFilterCacheKey (const uint32_t uniqueID, const SkMatrix &matrix, const SkIRect &clipBounds, uint32_t srcGenID, const SkIRect &srcSubset)
 
bool operator== (const SkImageFilterCacheKey &other) const
 

Public Attributes

uint32_t fUniqueID
 
SkMatrix fMatrix
 
SkIRect fClipBounds
 
uint32_t fSrcGenID
 
SkIRect fSrcSubset
 

Detailed Description

Definition at line 23 of file SkImageFilterCache.h.

Constructor & Destructor Documentation

◆ SkImageFilterCacheKey()

SkImageFilterCacheKey::SkImageFilterCacheKey ( const uint32_t  uniqueID,
const SkMatrix matrix,
const SkIRect clipBounds,
uint32_t  srcGenID,
const SkIRect srcSubset 
)
inline

Definition at line 24 of file SkImageFilterCache.h.

26 : fUniqueID(uniqueID)
28 , fClipBounds(clipBounds)
29 , fSrcGenID(srcGenID)
30 , fSrcSubset(srcSubset) {
31 // Assert that Key is tightly-packed, since it is hashed.
32 static_assert(sizeof(SkImageFilterCacheKey) == sizeof(uint32_t) + sizeof(SkMatrix) +
33 sizeof(SkIRect) + sizeof(uint32_t) + 4 * sizeof(int32_t),
34 "image_filter_key_tight_packing");
35 fMatrix.getType(); // force initialization of type, so hashes match
36 SkASSERT(fMatrix.isFinite()); // otherwise we can't rely on == self when comparing keys
37 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
bool isFinite() const
Definition: SkMatrix.h:1834
TypeMask getType() const
Definition: SkMatrix.h:207
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
Definition: SkRect.h:32
SkImageFilterCacheKey(const uint32_t uniqueID, const SkMatrix &matrix, const SkIRect &clipBounds, uint32_t srcGenID, const SkIRect &srcSubset)

Member Function Documentation

◆ operator==()

bool SkImageFilterCacheKey::operator== ( const SkImageFilterCacheKey other) const
inline

Definition at line 45 of file SkImageFilterCache.h.

45 {
46 return fUniqueID == other.fUniqueID &&
47 fMatrix == other.fMatrix &&
48 fClipBounds == other.fClipBounds &&
49 fSrcGenID == other.fSrcGenID &&
50 fSrcSubset == other.fSrcSubset;
51 }

Member Data Documentation

◆ fClipBounds

SkIRect SkImageFilterCacheKey::fClipBounds

Definition at line 41 of file SkImageFilterCache.h.

◆ fMatrix

SkMatrix SkImageFilterCacheKey::fMatrix

Definition at line 40 of file SkImageFilterCache.h.

◆ fSrcGenID

uint32_t SkImageFilterCacheKey::fSrcGenID

Definition at line 42 of file SkImageFilterCache.h.

◆ fSrcSubset

SkIRect SkImageFilterCacheKey::fSrcSubset

Definition at line 43 of file SkImageFilterCache.h.

◆ fUniqueID

uint32_t SkImageFilterCacheKey::fUniqueID

Definition at line 39 of file SkImageFilterCache.h.


The documentation for this struct was generated from the following file: