| 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 #ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_FILTER_CONTENTS_FILTER_INPUT_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_FILTER_CONTENTS_FILTER_INPUT_H_
7
8 #include "impeller/entity/contents/filters/inputs/filter_input.h"
9
10 namespace impeller {
11
12 class FilterContentsFilterInput final : public FilterInput {
13 public:
14 ~FilterContentsFilterInput() override;
15
16 // |FilterInput|
17 std::optional<Snapshot> GetSnapshot(std::string_view label,
18 const ContentContext& renderer,
19 const Entity& entity,
20 std::optional<Rect> coverage_limit,
21 int32_t mip_count) const override;
22
23 // |FilterInput|
24 std::optional<Rect> GetCoverage(const Entity& entity) const override;
25
26 // |FilterInput|
27 std::optional<Rect> GetSourceCoverage(
28 const Matrix& effect_transform,
29 const Rect& output_limit) const override;
30
31 // |FilterInput|
32 Matrix GetLocalTransform(const Entity& entity) const override;
33
34 // |FilterInput|
35 Matrix GetTransform(const Entity& entity) const override;
36
37 // |FilterInput|
38 virtual void SetEffectTransform(const Matrix& matrix) override;
39
40 // |FilterInput|
41 virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override;
42
43 private:
44 explicit FilterContentsFilterInput(std::shared_ptr<FilterContents> filter);
45
46 std::shared_ptr<FilterContents> filter_;
47 mutable std::optional<Snapshot> snapshot_;
48
49 friend FilterInput;
50 };
51
52 } // namespace impeller
53
54 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_FILTER_CONTENTS_FILTER_INPUT_H_
impeller::ContentContext
Definition: content_context.h:138
impeller::Entity
Definition: entity.h:26
impeller::Entity::RenderingMode
RenderingMode
Definition: entity.h:33
impeller::FilterContentsFilterInput
Definition: filter_contents_filter_input.h:12
impeller::FilterContentsFilterInput::GetSnapshot
std::optional< Snapshot > GetSnapshot(std::string_view label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit, int32_t mip_count) const override
Definition: filter_contents_filter_input.cc:20
impeller::FilterContentsFilterInput::SetRenderingMode
virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override
Turns on subpass mode for filter inputs.
Definition: filter_contents_filter_input.cc:62
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:49
impeller::FilterContentsFilterInput::GetTransform
Matrix GetTransform(const Entity &entity) const override
Get the transform of this FilterInput. This is equivalent to calling entity.GetTransform() * GetLocal...
Definition: filter_contents_filter_input.cc:54
impeller::FilterContentsFilterInput::~FilterContentsFilterInput
~FilterContentsFilterInput() override
impeller::FilterContentsFilterInput::GetSourceCoverage
std::optional< Rect > GetSourceCoverage(const Matrix &effect_transform, const Rect &output_limit) const override
Definition: filter_contents_filter_input.cc:43
impeller::FilterContentsFilterInput::SetEffectTransform
virtual void SetEffectTransform(const Matrix &matrix) override
Sets the effect transform of filter inputs.
Definition: filter_contents_filter_input.cc:58
impeller::FilterContentsFilterInput::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Definition: filter_contents_filter_input.cc:38
impeller::FilterInput
Definition: filter_input.h:30
filter_input.h
impeller
Definition: allocation.cc:12
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::TRect< Scalar >