#include <layer_raster_cache_item.h>
Public Member Functions | |
| LayerRasterCacheItem (Layer *layer, int layer_cached_threshold=1, bool can_cache_children=false) | |
| std::optional< RasterCacheKeyID > | GetId () const override |
| void | PrerollSetup (PrerollContext *context, const DlMatrix &matrix) override |
| void | PrerollFinalize (PrerollContext *context, const DlMatrix &matrix) override |
| bool | Draw (const PaintContext &context, const DlPaint *paint) const override |
| bool | Draw (const PaintContext &context, DlCanvas *canvas, const DlPaint *paint) const override |
| bool | TryToPrepareRasterCache (const PaintContext &context, bool parent_cached=false) const override |
| void | MarkCacheChildren () |
| void | MarkNotCacheChildren () |
| bool | IsCacheChildren () const |
Public Member Functions inherited from flutter::RasterCacheItem | |
| RasterCacheItem (RasterCacheKeyID key_id, CacheState cache_state=CacheState::kNone, unsigned child_entries=0) | |
| unsigned | child_items () const |
| void | set_matrix (const DlMatrix &matrix) |
| void | set_matrix (const SkMatrix &matrix) |
| CacheState | cache_state () const |
| bool | need_caching () const |
| virtual | ~RasterCacheItem ()=default |
Static Public Member Functions | |
| static std::unique_ptr< LayerRasterCacheItem > | Make (Layer *, int layer_cache_threshold, bool can_cache_children=false) |
| Create a LayerRasterCacheItem, connect a layer and manage the Layer's raster cache. | |
Protected Member Functions | |
| const SkRect * | GetPaintBoundsFromLayer () const |
Protected Attributes | |
| Layer * | layer_ |
| std::optional< RasterCacheKeyID > | layer_children_id_ |
| int | layer_cached_threshold_ = 1 |
| bool | can_cache_children_ = false |
| int | num_cache_attempts_ = 1 |
Protected Attributes inherited from flutter::RasterCacheItem | |
| RasterCacheKeyID | key_id_ |
| CacheState | cache_state_ = CacheState::kNone |
| SkMatrix | matrix_ |
| unsigned | child_items_ |
Additional Inherited Members | |
Public Types inherited from flutter::RasterCacheItem | |
| enum | CacheState { kNone = 0 , kCurrent , kChildren } |
Definition at line 17 of file layer_raster_cache_item.h.
|
explicit |
Definition at line 15 of file layer_raster_cache_item.cc.
|
overridevirtual |
Implements flutter::RasterCacheItem.
Definition at line 171 of file layer_raster_cache_item.cc.
References flutter::PaintContext::canvas.
Referenced by flutter::testing::TEST_F().
|
overridevirtual |
Implements flutter::RasterCacheItem.
Definition at line 176 of file layer_raster_cache_item.cc.
References flutter::RasterCacheItem::kChildren, flutter::RasterCacheItem::kCurrent, flutter::RasterCacheItem::kNone, and flutter::PaintContext::rendering_above_platform_view.
|
overridevirtual |
Reimplemented from flutter::RasterCacheItem.
Definition at line 80 of file layer_raster_cache_item.cc.
|
protected |
Definition at line 91 of file layer_raster_cache_item.cc.
References FML_DCHECK, and flutter::ToSkRect().
|
inline |
Definition at line 54 of file layer_raster_cache_item.h.
References flutter::RasterCacheItem::cache_state_, and flutter::RasterCacheItem::kChildren.
|
static |
Create a LayerRasterCacheItem, connect a layer and manage the Layer's raster cache.
| layer_cache_threshold | after how many frames to start trying to cache the layer self |
| can_cache_children | the layer can do a cache for his children |
Definition at line 36 of file layer_raster_cache_item.cc.
Referenced by flutter::CacheableContainerLayer::CacheableContainerLayer().
|
inline |
|
inline |
|
overridevirtual |
Implements flutter::RasterCacheItem.
Definition at line 44 of file layer_raster_cache_item.cc.
References flutter::LayerStateStack::content_culled(), flutter::PrerollContext::has_platform_view, flutter::PrerollContext::has_texture_layer, flutter::kLayerChildren, flutter::RasterCacheKeyID::LayerChildrenIds(), flutter::PrerollContext::raster_cached_entries, and flutter::PrerollContext::state_stack.
Referenced by flutter::testing::TEST_F().
|
overridevirtual |
Implements flutter::RasterCacheItem.
Definition at line 26 of file layer_raster_cache_item.cc.
References flutter::PrerollContext::raster_cached_entries.
Referenced by flutter::testing::TEST_F().
|
overridevirtual |
Implements flutter::RasterCacheItem.
Definition at line 142 of file layer_raster_cache_item.cc.
References flutter::PaintContext::dst_color_space, flutter::flow_type, flutter::PaintContext::gr_context, flutter::RasterCache::Context::gr_context, flutter::kNone, and flutter::Rasterize().
Referenced by flutter::testing::MockRasterCache::AddMockLayer(), and flutter::testing::TEST_F().
|
protected |
Definition at line 67 of file layer_raster_cache_item.h.
Referenced by MarkCacheChildren(), and MarkNotCacheChildren().
|
protected |
Definition at line 59 of file layer_raster_cache_item.h.
|
protected |
Definition at line 64 of file layer_raster_cache_item.h.
|
protected |
Definition at line 62 of file layer_raster_cache_item.h.
|
mutableprotected |
Definition at line 69 of file layer_raster_cache_item.h.