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

#include <SkBitmapCache.h>

Public Member Functions

void validate () const
 

Static Public Member Functions

static SkBitmapCacheDesc Make (const SkImage *)
 
static SkBitmapCacheDesc Make (uint32_t genID, const SkIRect &subset)
 

Public Attributes

uint32_t fImageID
 
SkIRect fSubset
 

Detailed Description

Definition at line 29 of file SkBitmapCache.h.

Member Function Documentation

◆ Make() [1/2]

SkBitmapCacheDesc SkBitmapCacheDesc::Make ( const SkImage image)
static

Definition at line 49 of file SkBitmapCache.cpp.

49 {
51 return Make(image->uniqueID(), bounds);
52}
uint32_t uniqueID() const
Definition: SkImage.h:311
int width() const
Definition: SkImage.h:285
int height() const
Definition: SkImage.h:291
Optional< SkRect > bounds
Definition: SkRecords.h:189
sk_sp< const SkImage > image
Definition: SkRecords.h:269
static SkBitmapCacheDesc Make(const SkImage *)
Definition: SkRect.h:32
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
Definition: SkRect.h:56

◆ Make() [2/2]

SkBitmapCacheDesc SkBitmapCacheDesc::Make ( uint32_t  genID,
const SkIRect subset 
)
static

Definition at line 43 of file SkBitmapCache.cpp.

43 {
44 SkASSERT(imageID);
45 SkASSERT(subset.width() > 0 && subset.height() > 0);
46 return { imageID, subset };
47}
#define SkASSERT(cond)
Definition: SkAssert.h:116
constexpr int32_t height() const
Definition: SkRect.h:165
constexpr int32_t width() const
Definition: SkRect.h:158

◆ validate()

void SkBitmapCacheDesc::validate ( ) const
inline

Definition at line 33 of file SkBitmapCache.h.

33 {
35 SkASSERT(fSubset.fLeft >= 0 && fSubset.fTop >= 0);
36 SkASSERT(fSubset.width() > 0 && fSubset.height() > 0);
37 }
int32_t fTop
smaller y-axis bounds
Definition: SkRect.h:34
int32_t fLeft
smaller x-axis bounds
Definition: SkRect.h:33

Member Data Documentation

◆ fImageID

uint32_t SkBitmapCacheDesc::fImageID

Definition at line 30 of file SkBitmapCache.h.

◆ fSubset

SkIRect SkBitmapCacheDesc::fSubset

Definition at line 31 of file SkBitmapCache.h.


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