#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) const =0 |
| std::optional< Rect > | GetLocalCoverage (const Entity &entity) const |
| virtual std::optional< Rect > | GetCoverage (const Entity &entity) const =0 |
| 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.GetTransformation() * 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 29 of file filter_input.h.
| using impeller::FilterInput::Ref = std::shared_ptr<FilterInput> |
Definition at line 31 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 36 of file filter_input.h.
| using impeller::FilterInput::Vector = std::vector<FilterInput::Ref> |
Definition at line 32 of file filter_input.h.
|
virtualdefault |
|
pure virtual |
Implemented in impeller::PlaceholderFilterInput, impeller::TextureFilterInput, impeller::ContentsFilterInput, and impeller::FilterContentsFilterInput.
Referenced by GetLocalCoverage().
|
pure virtual |
Definition at line 63 of file filter_input.cc.
References GetCoverage(), GetLocalTransform(), and impeller::Entity::SetTransformation().
Get the local transform of this filter input. This transform is relative to the Entity transform space.
Reimplemented in impeller::TextureFilterInput, and impeller::FilterContentsFilterInput.
Definition at line 59 of file filter_input.cc.
Referenced by GetLocalCoverage(), and GetTransform().
|
pure virtual |
Get the transform of this FilterInput. This is equivalent to calling entity.GetTransformation() * GetLocalTransform().
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 69 of file filter_input.cc.
References GetLocalTransform(), and impeller::Entity::GetTransformation().
Referenced by impeller::TextureFilterInput::GetCoverage(), and impeller::TextureFilterInput::GetSnapshot().
|
virtual |
Returns true unless this input is a FilterInput, which may take other inputs.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 83 of file filter_input.cc.
|
virtual |
FilterContents::HasBasisTransformations Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 79 of file filter_input.cc.
|
static |
|
static |
Definition at line 44 of file filter_input.cc.
|
static |
Definition at line 19 of file filter_input.cc.
Referenced by impeller::Paint::MaskBlurDescriptor::CreateMaskBlur(), impeller::EntityPass::GetElementsCoverage(), impeller::ImageFilter::GetFilterContents(), Make(), impeller::ColorFilterContents::MakeBlend(), impeller::FilterContents::MakeGaussianBlur(), impeller::FilterContents::MakeMorphology(), impeller::FilterContents::MakeYUVToRGBFilter(), impeller::VerticesContents::Render(), impeller::AtlasContents::Render(), impeller::testing::TEST(), impeller::testing::TEST_P(), impeller::Paint::WithImageFilter(), impeller::Paint::WithMaskBlur(), impeller::ComposeImageFilter::WrapInput(), and impeller::LocalMatrixImageFilter::WrapInput().
|
virtual |
Contents::PopulateGlyphAtlas Reimplemented in impeller::FilterContentsFilterInput, impeller::PlaceholderFilterInput, and impeller::ContentsFilterInput.
Definition at line 73 of file filter_input.cc.
|
virtual |
Sets the effect transform of filter inputs.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 89 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 87 of file filter_input.cc.
|
virtual |
Turns on subpass mode for filter inputs.
Reimplemented in impeller::FilterContentsFilterInput.
Definition at line 91 of file filter_input.cc.