Flutter Engine
 
Loading...
Searching...
No Matches
flutter::testing::MockCacheableLayer Class Reference

#include <mock_layer.h>

Inheritance diagram for flutter::testing::MockCacheableLayer:
flutter::testing::MockLayer flutter::Layer

Public Member Functions

 MockCacheableLayer (const DlPath &path, DlPaint paint=DlPaint(), int render_limit=3)
 
const LayerRasterCacheItemraster_cache_item () const
 
void Preroll (PrerollContext *context) override
 
- Public Member Functions inherited from flutter::testing::MockLayer
 MockLayer (const DlPath &path, DlPaint paint=DlPaint())
 
void Preroll (PrerollContext *context) override
 
void Paint (PaintContext &context) const override
 
const MutatorsStackparent_mutators ()
 
const DlMatrixparent_matrix ()
 
const DlRectparent_cull_rect ()
 
bool IsReplacing (DiffContext *context, const Layer *layer) const override
 
void Diff (DiffContext *context, const Layer *old_layer) override
 
const MockLayeras_mock_layer () const override
 
bool parent_has_platform_view ()
 
bool parent_has_texture_layer ()
 
bool fake_has_platform_view ()
 
bool fake_reads_surface ()
 
bool fake_opacity_compatible ()
 
bool fake_has_texture_layer ()
 
MockLayerset_parent_has_platform_view (bool flag)
 
MockLayerset_parent_has_texture_layer (bool flag)
 
MockLayerset_fake_has_platform_view (bool flag)
 
MockLayerset_fake_reads_surface (bool flag)
 
MockLayerset_fake_opacity_compatible (bool flag)
 
MockLayerset_fake_has_texture_layer (bool flag)
 
void set_expected_paint_matrix (const DlMatrix &matrix)
 
- Public Member Functions inherited from flutter::Layer
 Layer ()
 
virtual ~Layer ()
 
void AssignOldLayer (Layer *old_layer)
 
virtual void PreservePaintRegion (DiffContext *context)
 
virtual void PaintChildren (PaintContext &context) const
 
bool subtree_has_platform_view () const
 
void set_subtree_has_platform_view (bool value)
 
const DlRectpaint_bounds () const
 
void set_paint_bounds (const DlRect &paint_bounds)
 
bool is_empty () const
 
bool needs_painting (PaintContext &context) const
 
uint64_t original_layer_id () const
 
uint64_t unique_id () const
 
virtual RasterCacheKeyID caching_key_id () const
 
virtual const ContainerLayeras_container_layer () const
 
virtual const DisplayListLayeras_display_list_layer () const
 
virtual const TextureLayeras_texture_layer () const
 
virtual const PerformanceOverlayLayeras_performance_overlay_layer () const
 

Additional Inherited Members

- Static Public Member Functions inherited from flutter::testing::MockLayer
static std::shared_ptr< MockLayerMake (const DlPath &path, DlPaint paint=DlPaint())
 
static std::shared_ptr< MockLayerMakeOpacityCompatible (const DlPath &path)
 
- Static Public Attributes inherited from flutter::Layer
static constexpr int kSaveLayerRenderFlags
 
static constexpr int kRasterCacheRenderFlags
 

Detailed Description

Definition at line 154 of file mock_layer.h.

Constructor & Destructor Documentation

◆ MockCacheableLayer()

flutter::testing::MockCacheableLayer::MockCacheableLayer ( const DlPath path,
DlPaint  paint = DlPaint(),
int  render_limit = 3 
)
inlineexplicit

Definition at line 156 of file mock_layer.h.

159 : MockLayer(path, std::move(paint)) {
160 raster_cache_item_ =
161 std::make_unique<MockLayerCacheableItem>(this, render_limit);
162 }
MockLayer(const DlPath &path, DlPaint paint=DlPaint())
Definition mock_layer.cc:17
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switch_defs.h:52

Member Function Documentation

◆ Preroll()

void flutter::testing::MockCacheableLayer::Preroll ( PrerollContext context)
overridevirtual

Implements flutter::Layer.

Definition at line 75 of file mock_layer.cc.

75 {
76 Layer::AutoPrerollSaveLayerState save =
78 auto cache = AutoCache(raster_cache_item_.get(), context,
79 context->state_stack.matrix());
80
81 MockLayer::Preroll(context);
82}
static AutoPrerollSaveLayerState Create(PrerollContext *preroll_context, bool save_layer_is_active=true, bool layer_itself_performs_readback=false)
Definition layer.cc:37
void Preroll(PrerollContext *context) override
Definition mock_layer.cc:35

References flutter::Layer::AutoPrerollSaveLayerState::Create(), flutter::LayerStateStack::matrix(), flutter::testing::MockLayer::Preroll(), and flutter::PrerollContext::state_stack.

Referenced by flutter::testing::MockRasterCache::AddMockLayer().

◆ raster_cache_item()

const LayerRasterCacheItem * flutter::testing::MockCacheableLayer::raster_cache_item ( ) const
inline

Definition at line 164 of file mock_layer.h.

164 {
165 return raster_cache_item_.get();
166 }

Referenced by flutter::testing::MockRasterCache::AddMockLayer().


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