Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
flutter::RasterCacheItem Class Referenceabstract

#include <raster_cache_item.h>

Inheritance diagram for flutter::RasterCacheItem:
flutter::DisplayListRasterCacheItem flutter::LayerRasterCacheItem flutter::testing::MockLayerCacheableItem

Public Types

enum  CacheState { kNone = 0 , kCurrent , kChildren }
 

Public Member Functions

 RasterCacheItem (RasterCacheKeyID key_id, CacheState cache_state=CacheState::kNone, unsigned child_entries=0)
 
virtual void PrerollSetup (PrerollContext *context, const SkMatrix &matrix)=0
 
virtual void PrerollFinalize (PrerollContext *context, const SkMatrix &matrix)=0
 
virtual bool Draw (const PaintContext &context, const DlPaint *paint) const =0
 
virtual bool Draw (const PaintContext &context, DlCanvas *canvas, const DlPaint *paint) const =0
 
virtual std::optional< RasterCacheKeyIDGetId () const
 
virtual bool TryToPrepareRasterCache (const PaintContext &context, bool parent_cached=false) const =0
 
unsigned child_items () const
 
void set_matrix (const SkMatrix &matrix)
 
CacheState cache_state () const
 
bool need_caching () const
 
virtual ~RasterCacheItem ()=default
 

Protected Attributes

RasterCacheKeyID key_id_
 
CacheState cache_state_ = CacheState::kNone
 
SkMatrix matrix_
 
unsigned child_items_
 

Detailed Description

Definition at line 24 of file raster_cache_item.h.

Member Enumeration Documentation

◆ CacheState

Enumerator
kNone 
kCurrent 
kChildren 

Definition at line 26 of file raster_cache_item.h.

Constructor & Destructor Documentation

◆ RasterCacheItem()

flutter::RasterCacheItem::RasterCacheItem ( RasterCacheKeyID  key_id,
CacheState  cache_state = CacheState::kNone,
unsigned  child_entries = 0 
)
inlineexplicit

Definition at line 32 of file raster_cache_item.h.

35 : key_id_(std::move(key_id)),
37 child_items_(child_entries) {}
CacheState cache_state() const

◆ ~RasterCacheItem()

virtual flutter::RasterCacheItem::~RasterCacheItem ( )
virtualdefault

Member Function Documentation

◆ cache_state()

CacheState flutter::RasterCacheItem::cache_state ( ) const
inline

Definition at line 61 of file raster_cache_item.h.

61{ return cache_state_; }

◆ child_items()

unsigned flutter::RasterCacheItem::child_items ( ) const
inline

Definition at line 57 of file raster_cache_item.h.

57{ return child_items_; }

◆ Draw() [1/2]

virtual bool flutter::RasterCacheItem::Draw ( const PaintContext context,
const DlPaint paint 
) const
pure virtual

◆ Draw() [2/2]

virtual bool flutter::RasterCacheItem::Draw ( const PaintContext context,
DlCanvas canvas,
const DlPaint paint 
) const
pure virtual

◆ GetId()

virtual std::optional< RasterCacheKeyID > flutter::RasterCacheItem::GetId ( ) const
inlinevirtual

Reimplemented in flutter::LayerRasterCacheItem.

Definition at line 52 of file raster_cache_item.h.

52{ return key_id_; }

◆ need_caching()

bool flutter::RasterCacheItem::need_caching ( ) const
inline

Definition at line 63 of file raster_cache_item.h.

◆ PrerollFinalize()

virtual void flutter::RasterCacheItem::PrerollFinalize ( PrerollContext context,
const SkMatrix matrix 
)
pure virtual

◆ PrerollSetup()

virtual void flutter::RasterCacheItem::PrerollSetup ( PrerollContext context,
const SkMatrix matrix 
)
pure virtual

◆ set_matrix()

void flutter::RasterCacheItem::set_matrix ( const SkMatrix matrix)
inline

Definition at line 59 of file raster_cache_item.h.

59{ matrix_ = matrix; }
unsigned useCenter Optional< SkMatrix > matrix
Definition SkRecords.h:258

◆ TryToPrepareRasterCache()

virtual bool flutter::RasterCacheItem::TryToPrepareRasterCache ( const PaintContext context,
bool  parent_cached = false 
) const
pure virtual

Member Data Documentation

◆ cache_state_

CacheState flutter::RasterCacheItem::cache_state_ = CacheState::kNone
protected

Definition at line 70 of file raster_cache_item.h.

◆ child_items_

unsigned flutter::RasterCacheItem::child_items_
protected

Definition at line 72 of file raster_cache_item.h.

◆ key_id_

RasterCacheKeyID flutter::RasterCacheItem::key_id_
protected

Definition at line 69 of file raster_cache_item.h.

◆ matrix_

SkMatrix flutter::RasterCacheItem::matrix_
mutableprotected

Definition at line 71 of file raster_cache_item.h.


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