Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::ContentsFilterInput Class Referencefinal

#include <contents_filter_input.h>

Inheritance diagram for impeller::ContentsFilterInput:
impeller::FilterInput

Public Member Functions

 ~ContentsFilterInput () override
 
Variant GetInput () const override
 
std::optional< SnapshotGetSnapshot (const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit, int32_t mip_count) const override
 
std::optional< RectGetCoverage (const Entity &entity) const override
 
void PopulateGlyphAtlas (const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) override
 
- Public Member Functions inherited from impeller::FilterInput
virtual ~FilterInput ()
 
std::optional< RectGetLocalCoverage (const Entity &entity) const
 
virtual std::optional< RectGetSourceCoverage (const Matrix &effect_transform, const Rect &output_limit) const
 
virtual Matrix GetLocalTransform (const Entity &entity) const
 Get the local transform of this filter input. This transform is relative to the Entity transform space.
 
virtual Matrix GetTransform (const Entity &entity) const
 Get the transform of this FilterInput. This is equivalent to calling entity.GetTransform() * GetLocalTransform().
 
virtual bool IsTranslationOnly () const
 
virtual bool IsLeaf () const
 Returns true unless this input is a FilterInput, which may take other inputs.
 
virtual void SetLeafInputs (const FilterInput::Vector &inputs)
 Replaces the inputs of all leaf FilterContents with a new set of inputs.
 
virtual void SetEffectTransform (const Matrix &matrix)
 Sets the effect transform of filter inputs.
 
virtual void SetRenderingMode (Entity::RenderingMode rendering_mode)
 Turns on subpass mode for filter inputs.
 

Additional Inherited Members

- Public Types inherited from impeller::FilterInput
using Ref = std::shared_ptr< FilterInput >
 
using Vector = std::vector< FilterInput::Ref >
 
using Variant = std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect >
 
- Static Public Member Functions inherited from impeller::FilterInput
static FilterInput::Ref Make (Variant input, bool msaa_enabled=true)
 
static FilterInput::Ref Make (std::shared_ptr< Texture > input, Matrix local_transform)
 
static FilterInput::Vector Make (std::initializer_list< Variant > inputs)
 

Detailed Description

Definition at line 12 of file contents_filter_input.h.

Constructor & Destructor Documentation

◆ ~ContentsFilterInput()

impeller::ContentsFilterInput::~ContentsFilterInput ( )
overridedefault

Member Function Documentation

◆ GetCoverage()

std::optional< Rect > impeller::ContentsFilterInput::GetCoverage ( const Entity entity) const
overridevirtual

Implements impeller::FilterInput.

Definition at line 46 of file contents_filter_input.cc.

47 {
48 return contents_->GetCoverage(entity);
49}

◆ GetInput()

FilterInput::Variant impeller::ContentsFilterInput::GetInput ( ) const
overridevirtual

Implements impeller::FilterInput.

Definition at line 20 of file contents_filter_input.cc.

20 {
21 return contents_;
22}

◆ GetSnapshot()

std::optional< Snapshot > impeller::ContentsFilterInput::GetSnapshot ( const std::string &  label,
const ContentContext renderer,
const Entity entity,
std::optional< Rect coverage_limit,
int32_t  mip_count 
) const
overridevirtual

Implements impeller::FilterInput.

Definition at line 24 of file contents_filter_input.cc.

29 {
30 if (!coverage_limit.has_value() && entity.GetContents()) {
31 coverage_limit = entity.GetContents()->GetCoverageHint();
32 }
33 if (!snapshot_.has_value()) {
34 snapshot_ = contents_->RenderToSnapshot(
35 renderer, // renderer
36 entity, // entity
37 coverage_limit, // coverage_limit
38 std::nullopt, // sampler_descriptor
39 msaa_enabled_, // msaa_enabled
40 /*mip_count=*/mip_count,
41 SPrintF("Contents to %s Filter Snapshot", label.c_str())); // label
42 }
43 return snapshot_;
44}
std::string SPrintF(const char *format,...)
Definition strings.cc:12

◆ PopulateGlyphAtlas()

void impeller::ContentsFilterInput::PopulateGlyphAtlas ( const std::shared_ptr< LazyGlyphAtlas > &  lazy_glyph_atlas,
Scalar  scale 
)
overridevirtual
See also
Contents::PopulateGlyphAtlas

Reimplemented from impeller::FilterInput.

Definition at line 51 of file contents_filter_input.cc.

53 {
54 contents_->PopulateGlyphAtlas(lazy_glyph_atlas, scale);
55}
const Scalar scale

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