| Flutter Impeller |

local_matrix_filter_contents.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_LOCAL_MATRIX_FILTER_CONTENTS_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_LOCAL_MATRIX_FILTER_CONTENTS_H_
7
8 #include "impeller/entity/contents/filters/filter_contents.h"
9 #include "impeller/entity/contents/filters/inputs/filter_input.h"
10
11 namespace impeller {
12
13 class LocalMatrixFilterContents final : public FilterContents {
14 public:
15 LocalMatrixFilterContents();
16
17 ~LocalMatrixFilterContents() override;
18
19 void SetMatrix(Matrix matrix);
20
21 // |FilterContents|
22 Matrix GetLocalTransform(const Matrix& parent_transform) const override;
23
24 // |FilterContents|
25 std::optional<Rect> GetFilterSourceCoverage(
26 const Matrix& effect_transform,
27 const Rect& output_limit) const override;
28
29 private:
30 // |FilterContents|
31 std::optional<Entity> RenderFilter(
32 const FilterInput::Vector& input_textures,
33 const ContentContext& renderer,
34 const Entity& entity,
35 const Matrix& effect_transform,
36 const Rect& coverage,
37 const std::optional<Rect>& coverage_hint) const override;
38
39 Matrix matrix_;
40
41 LocalMatrixFilterContents(const LocalMatrixFilterContents&) = delete;
42
43 LocalMatrixFilterContents& operator=(const LocalMatrixFilterContents&) =
44 delete;
45 };
46
47 } // namespace impeller
48
49 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_LOCAL_MATRIX_FILTER_CONTENTS_H_
impeller::ContentContext
Definition: content_context.h:371
impeller::Entity
Definition: entity.h:20
impeller::FilterContents
Definition: filter_contents.h:24
impeller::FilterInput::Vector
std::vector< FilterInput::Ref > Vector
Definition: filter_input.h:33
impeller::LocalMatrixFilterContents
Definition: local_matrix_filter_contents.h:13
impeller::LocalMatrixFilterContents::~LocalMatrixFilterContents
~LocalMatrixFilterContents() override
impeller::LocalMatrixFilterContents::SetMatrix
void SetMatrix(Matrix matrix)
Definition: local_matrix_filter_contents.cc:13
impeller::LocalMatrixFilterContents::GetFilterSourceCoverage
std::optional< Rect > GetFilterSourceCoverage(const Matrix &effect_transform, const Rect &output_limit) const override
Internal utility method for |GetSourceCoverage| that computes the inverse effect of this transform on...
Definition: local_matrix_filter_contents.cc:22
impeller::LocalMatrixFilterContents::GetLocalTransform
Matrix GetLocalTransform(const Matrix &parent_transform) const override
Definition: local_matrix_filter_contents.cc:17
impeller::LocalMatrixFilterContents::LocalMatrixFilterContents
LocalMatrixFilterContents()
filter_contents.h
filter_input.h
impeller
Definition: allocation.cc:12
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::TRect< Scalar >