| Flutter Impeller |

Public Member Functions | List of all members
impeller::FilterContentsFilterInput Class Referencefinal

`#include <filter_contents_filter_input.h>`

Inheritance diagram for impeller::FilterContentsFilterInput:

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

## 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 filter_contents_filter_input.h.

## Constructor & Destructor Documentation

## ◆ ~FilterContentsFilterInput()

impeller::FilterContentsFilterInput::~FilterContentsFilterInput | ( |  | ) |
| override default

## Member Function Documentation

## ◆ GetCoverage()

std::optional< Rect > impeller::FilterContentsFilterInput::GetCoverage | ( | const Entity & | entity | ) | const
| override virtual

Implements impeller::FilterInput.

Definition at line 41 of file filter_contents_filter_input.cc.

42 {
43 return filter_->GetCoverage(entity);
44 }

## ◆ GetInput()

FilterInput::Variant impeller::FilterContentsFilterInput::GetInput | ( |  | ) | const
| override virtual

Implements impeller::FilterInput.

Definition at line 20 of file filter_contents_filter_input.cc.

20 {
21 return filter_;
22 }

## ◆ GetLocalTransform()

Matrix impeller::FilterContentsFilterInput::GetLocalTransform | ( | const Entity & | entity | ) | const
| override virtual

Get the local transform of this filter input. This transform is relative to the `Entity` transform space.

Reimplemented from impeller::FilterInput.

Definition at line 52 of file filter_contents_filter_input.cc.

53 {
54 return filter_->GetLocalTransform(entity.GetTransform());
55 }

References impeller::Entity::GetTransform().

## ◆ GetSnapshot()

std::optional< Snapshot > impeller::FilterContentsFilterInput::GetSnapshot | ( | const std::string & | label,
|  | const ContentContext & | renderer,
|  | const Entity & | entity,
|  | std::optional< Rect > | coverage_limit
| ) |  | const
| override virtual

Implements impeller::FilterInput.

Definition at line 24 of file filter_contents_filter_input.cc.

28 {
29 if (!snapshot_.has_value()) {
30 snapshot_ = filter_->RenderToSnapshot(
31 renderer, // renderer
32 entity, // entity
33 coverage_limit, // coverage_limit
34 std::nullopt, // sampler_descriptor
35 true, // msaa_enabled
36 SPrintF("Filter to %s Filter Snapshot", label.c_str())); // label
37 }
38 return snapshot_;
39 }

References impeller::SPrintF().

## ◆ GetSourceCoverage()

std::optional< Rect > impeller::FilterContentsFilterInput::GetSourceCoverage | ( | const Matrix & | effect_transform,
|  | const Rect & | output_limit
| ) |  | const
| override virtual

Reimplemented from impeller::FilterInput.

Definition at line 46 of file filter_contents_filter_input.cc.

48 {
49 return filter_->GetSourceCoverage(effect_transform, output_limit);
50 }

## ◆ GetTransform()

Matrix impeller::FilterContentsFilterInput::GetTransform | ( | const Entity & | entity | ) | const
| override virtual

Get the transform of this `FilterInput`. This is equivalent to calling `entity.GetTransform() * GetLocalTransform()`.

Reimplemented from impeller::FilterInput.

Definition at line 57 of file filter_contents_filter_input.cc.

57 {
58 return filter_->GetTransform(entity.GetTransform());
59 }

References impeller::Entity::GetTransform().

## ◆ IsLeaf()

bool impeller::FilterContentsFilterInput::IsLeaf | ( |  | ) | const
| override virtual

Returns `true` unless this input is a `FilterInput`, which may take other inputs.

Reimplemented from impeller::FilterInput.

Definition at line 71 of file filter_contents_filter_input.cc.

71 {
72 return false;
73 }

## ◆ IsTranslationOnly()

bool impeller::FilterContentsFilterInput::IsTranslationOnly | ( |  | ) | const
| override virtual

See also
  `FilterContents::HasBasisTransforms`

Reimplemented from impeller::FilterInput.

Definition at line 67 of file filter_contents_filter_input.cc.

67 {
68 return filter_->IsTranslationOnly();
69 }

## ◆ PopulateGlyphAtlas()

void impeller::FilterContentsFilterInput::PopulateGlyphAtlas | ( | const std::shared_ptr< LazyGlyphAtlas > & | lazy_glyph_atlas,
|  | Scalar | scale
| ) |  |
| override virtual

See also
  `Contents::PopulateGlyphAtlas`

Reimplemented from impeller::FilterInput.

Definition at line 61 of file filter_contents_filter_input.cc.

63 {
64 filter_->PopulateGlyphAtlas(lazy_glyph_atlas, scale);
65 }

## ◆ SetEffectTransform()

void impeller::FilterContentsFilterInput::SetEffectTransform | ( | const Matrix & | matrix | ) |
| override virtual

Sets the effect transform of filter inputs.

Reimplemented from impeller::FilterInput.

Definition at line 80 of file filter_contents_filter_input.cc.

80 {
81 filter_->SetEffectTransform(matrix);
82 }

## ◆ SetLeafInputs()

void impeller::FilterContentsFilterInput::SetLeafInputs | ( | const FilterInput::Vector & | inputs | ) |
| override virtual

Replaces the inputs of all leaf `FilterContents` with a new set of `inputs`.

See also
  `FilterInput::IsLeaf`

Reimplemented from impeller::FilterInput.

Definition at line 75 of file filter_contents_filter_input.cc.

76 {
77 filter_->SetLeafInputs(inputs);
78 }

## ◆ SetRenderingMode()

void impeller::FilterContentsFilterInput::SetRenderingMode | ( | Entity::RenderingMode | rendering_mode | ) |
| override virtual

Turns on subpass mode for filter inputs.

Reimplemented from impeller::FilterInput.

Definition at line 84 of file filter_contents_filter_input.cc.

85 {
86 filter_->SetRenderingMode(rendering_mode);
87 }

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

- impeller/entity/contents/filters/inputs/filter_contents_filter_input.h
- impeller/entity/contents/filters/inputs/filter_contents_filter_input.cc

impeller::SPrintF
std::string SPrintF(const char *format,...)
Definition: strings.cc:12