Flutter Engine
The Flutter Engine
|
#include <filter_input.h>
Public Types | |
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 > |
Public Member Functions | |
virtual | ~FilterInput () |
virtual Variant | GetInput () const =0 |
virtual std::optional< Snapshot > | GetSnapshot (const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit=std::nullopt, int32_t mip_count=1) const =0 |
std::optional< Rect > | GetLocalCoverage (const Entity &entity) const |
virtual std::optional< Rect > | GetCoverage (const Entity &entity) const =0 |
virtual std::optional< Rect > | GetSourceCoverage (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. More... | |
virtual Matrix | GetTransform (const Entity &entity) const |
Get the transform of this FilterInput . This is equivalent to calling entity.GetTransform() * GetLocalTransform() . More... | |
virtual void | PopulateGlyphAtlas (const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) |
virtual bool | IsTranslationOnly () const |
virtual bool | IsLeaf () const |
Returns true unless this input is a FilterInput , which may take other inputs. More... | |
virtual void | SetLeafInputs (const FilterInput::Vector &inputs) |
Replaces the inputs of all leaf FilterContents with a new set of inputs . More... | |
virtual void | SetEffectTransform (const Matrix &matrix) |
Sets the effect transform of filter inputs. More... | |
virtual void | SetRenderingMode (Entity::RenderingMode rendering_mode) |
Turns on subpass mode for filter inputs. More... | |
Static Public Member Functions | |
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) |
FilterInput
is a lazy/single eval Snapshot
which may be shared across filter parameters and used to evaluate input coverage.
A FilterInput
can be re-used for any filter inputs across an entity's filter graph without repeating subpasses unnecessarily.
Filters may decide to not evaluate inputs in situations where they won't contribute to the filter's output texture.
Definition at line 30 of file filter_input.h.
using impeller::FilterInput::Ref = std::shared_ptr<FilterInput> |
Definition at line 32 of file filter_input.h.
using impeller::FilterInput::Variant = std::variant<std::shared_ptr<FilterContents>, std::shared_ptr<Contents>, std::shared_ptr<Texture>, Rect> |
Definition at line 34 of file filter_input.h.
using impeller::FilterInput::Vector = std::vector<FilterInput::Ref> |
Definition at line 33 of file filter_input.h.
|
virtualdefault |
|
pure virtual |
Definition at line 63 of file filter_input.cc.
Get the local transform of this filter input. This transform is relative to the Entity
transform space.
Reimplemented in impeller::FilterContentsFilterInput, and impeller::TextureFilterInput.
Definition at line 59 of file filter_input.cc.
|
pure virtual |
|
virtual |
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 69 of file filter_input.cc.
Get the transform of this FilterInput
. This is equivalent to calling entity.GetTransform() * GetLocalTransform()
.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 75 of file filter_input.cc.
|
virtual |
Returns true
unless this input is a FilterInput
, which may take other inputs.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 89 of file filter_input.cc.
|
virtual |
FilterContents::HasBasisTransforms
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 85 of file filter_input.cc.
|
static |
Definition at line 50 of file filter_input.cc.
|
static |
Definition at line 44 of file filter_input.cc.
|
static |
Definition at line 19 of file filter_input.cc.
|
virtual |
Contents::PopulateGlyphAtlas
Reimplemented in impeller::ContentsFilterInput, impeller::FilterContentsFilterInput, and impeller::PlaceholderFilterInput.
Definition at line 79 of file filter_input.cc.
|
virtual |
Sets the effect transform of filter inputs.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 95 of file filter_input.cc.
|
virtual |
Replaces the inputs of all leaf FilterContents
with a new set of inputs
.
FilterInput::IsLeaf
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 93 of file filter_input.cc.
|
virtual |
Turns on subpass mode for filter inputs.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 97 of file filter_input.cc.