 |
Flutter Impeller
|
|
Go to the documentation of this file.
14 FilterContentsFilterInput::FilterContentsFilterInput(
15 std::shared_ptr<FilterContents> filter)
16 : filter_(
std::move(filter)) {}
25 const std::string& label,
28 std::optional<Rect> coverage_limit)
const {
29 if (!snapshot_.has_value()) {
30 snapshot_ = filter_->RenderToSnapshot(
36 SPrintF(
"Filter to %s Filter Snapshot", label.c_str()));
42 const Entity& entity)
const {
43 return filter_->GetCoverage(entity);
47 const Entity& entity)
const {
56 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
58 filter_->PopulateGlyphAtlas(lazy_glyph_atlas, scale);
62 return filter_->IsTranslationOnly();
71 filter_->SetLeafInputs(inputs);
75 filter_->SetEffectTransform(matrix);
80 filter_->SetRenderingMode(rendering_mode);
bool IsLeaf() const override
Returns true unless this input is a FilterInput, which may take other inputs.
virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override
Turns on subpass mode for filter inputs.
Matrix GetTransform(const Entity &entity) const override
Get the transform of this FilterInput. This is equivalent to calling entity.GetTransformation() * Get...
const Matrix & GetTransformation() const
Variant GetInput() 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 spac...
virtual void SetEffectTransform(const Matrix &matrix) override
Sets the effect transform of filter inputs.
std::string SPrintF(const char *format,...)
bool IsTranslationOnly() const override
void PopulateGlyphAtlas(const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) override
std::optional< Rect > GetCoverage(const Entity &entity) const override
std::optional< Snapshot > GetSnapshot(const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit) const override
~FilterContentsFilterInput() override
A 4x4 matrix using column-major storage.
void SetLeafInputs(const FilterInput::Vector &inputs) override
Replaces the inputs of all leaf FilterContents with a new set of inputs.