Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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 SkPath &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 SkPath &path, DlPaint paint=DlPaint())
 
void Preroll (PrerollContext *context) override
 
void Paint (PaintContext &context) const override
 
const MutatorsStackparent_mutators ()
 
const SkMatrixparent_matrix ()
 
const SkRectparent_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 SkMatrix &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 SkRectpaint_bounds () const
 
void set_paint_bounds (const SkRect &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 SkPath &path, DlPaint paint=DlPaint())
 
static std::shared_ptr< MockLayerMakeOpacityCompatible (const SkPath &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 SkPath 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 SkPath &path, DlPaint paint=DlPaint())
Definition mock_layer.cc:15
const Paint & paint
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 switches.h:57

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.transform_3x3());
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:40
void Preroll(PrerollContext *context) override
Definition mock_layer.cc:33
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 to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent cache
Definition switches.h:191

◆ 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 }

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