 |
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,
29 int32_t mip_count)
const {
30 if (!snapshot_.has_value()) {
31 snapshot_ = filter_->RenderToSnapshot(
38 SPrintF(
"Filter to %s Filter Snapshot", label.c_str()));
44 const Entity& entity)
const {
45 return filter_->GetCoverage(entity);
49 const Matrix& effect_transform,
50 const Rect& output_limit)
const {
51 return filter_->GetSourceCoverage(effect_transform, output_limit);
55 const Entity& entity)
const {
56 return filter_->GetLocalTransform(entity.
GetTransform());
64 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
66 filter_->PopulateGlyphAtlas(lazy_glyph_atlas,
scale);
70 return filter_->IsTranslationOnly();
79 filter_->SetLeafInputs(inputs);
83 filter_->SetEffectTransform(matrix);
88 filter_->SetRenderingMode(rendering_mode);
bool IsLeaf() const override
Returns true unless this input is a FilterInput, which may take other inputs.
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
std::optional< Rect > GetSourceCoverage(const Matrix &effect_transform, const Rect &output_limit) const override
std::optional< Snapshot > GetSnapshot(const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit, int32_t mip_count) const override
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.GetTransform() * GetLocal...
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
~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.