| Flutter Impeller |

filter_contents_filter_input.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #pragma once
6
7 #include "impeller/entity/contents/filters/inputs/filter_input.h"
8
9 namespace impeller {
10
11 class FilterContentsFilterInput final : public FilterInput {
12 public:
13 ~FilterContentsFilterInput() override;
14
15 // |FilterInput|
16 Variant GetInput() const override;
17
18 // |FilterInput|
19 std::optional<Snapshot> GetSnapshot(
20 const std::string& label,
21 const ContentContext& renderer,
22 const Entity& entity,
23 std::optional<Rect> coverage_limit) const override;
24
25 // |FilterInput|
26 std::optional<Rect> GetCoverage(const Entity& entity) const override;
27
28 // |FilterInput|
29 Matrix GetLocalTransform(const Entity& entity) const override;
30
31 // |FilterInput|
32 Matrix GetTransform(const Entity& entity) const override;
33
34 // |FilterInput|
35 void PopulateGlyphAtlas(
36 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
37 Scalar scale) override;
38
39 // |FilterInput|
40 bool IsTranslationOnly() const override;
41
42 // |FilterInput|
43 bool IsLeaf() const override;
44
45 // |FilterInput|
46 void SetLeafInputs(const FilterInput::Vector& inputs) override;
47
48 // |FilterInput|
49 virtual void SetEffectTransform(const Matrix& matrix) override;
50
51 // |FilterInput|
52 virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override;
53
54 private:
55 explicit FilterContentsFilterInput(std::shared_ptr<FilterContents> filter);
56
57 std::shared_ptr<FilterContents> filter_;
58 mutable std::optional<Snapshot> snapshot_;
59
60 friend FilterInput;
61 };
62
63 } // namespace impeller
impeller::FilterContentsFilterInput::IsLeaf
bool IsLeaf() const override
Returns true unless this input is a FilterInput, which may take other inputs.
Definition: filter_contents_filter_input.cc:65
impeller::FilterContentsFilterInput
Definition: filter_contents_filter_input.h:11
impeller::Scalar
float Scalar
Definition: scalar.h:15
impeller::FilterContentsFilterInput::SetRenderingMode
virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override
Turns on subpass mode for filter inputs.
Definition: filter_contents_filter_input.cc:78
impeller::FilterContentsFilterInput::GetTransform
Matrix GetTransform(const Entity &entity) const override
Get the transform of this FilterInput. This is equivalent to calling entity.GetTransformation() * Get...
Definition: filter_contents_filter_input.cc:51
impeller::FilterContentsFilterInput::GetInput
Variant GetInput() const override
Definition: filter_contents_filter_input.cc:20
impeller::Entity
Definition: entity.h:21
impeller::FilterContentsFilterInput::GetLocalTransform
Matrix GetLocalTransform(const Entity &entity) const override
Get the local transform of this filter input. This transform is relative to the Entity transform spac...
Definition: filter_contents_filter_input.cc:46
impeller::FilterContentsFilterInput::SetEffectTransform
virtual void SetEffectTransform(const Matrix &matrix) override
Sets the effect transform of filter inputs.
Definition: filter_contents_filter_input.cc:74
impeller::FilterContentsFilterInput::IsTranslationOnly
bool IsTranslationOnly() const override
Definition: filter_contents_filter_input.cc:61
impeller::FilterInput
Definition: filter_input.h:29
impeller::FilterInput::Variant
std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect > Variant
Definition: filter_input.h:36
filter_input.h
impeller::FilterContentsFilterInput::PopulateGlyphAtlas
void PopulateGlyphAtlas(const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) override
Definition: filter_contents_filter_input.cc:55
impeller::FilterContentsFilterInput::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Definition: filter_contents_filter_input.cc:41
impeller::FilterContentsFilterInput::GetSnapshot
std::optional< Snapshot > GetSnapshot(const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit) const override
Definition: filter_contents_filter_input.cc:24
impeller::Entity::RenderingMode
RenderingMode
Definition: entity.h:26
impeller::FilterInput::Vector
std::vector< FilterInput::Ref > Vector
Definition: filter_input.h:32
impeller
Definition: aiks_context.cc:10
impeller::FilterContentsFilterInput::~FilterContentsFilterInput
~FilterContentsFilterInput() override
impeller::ContentContext
Definition: content_context.h:344
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:36
impeller::FilterContentsFilterInput::SetLeafInputs
void SetLeafInputs(const FilterInput::Vector &inputs) override
Replaces the inputs of all leaf FilterContents with a new set of inputs.
Definition: filter_contents_filter_input.cc:69