| Flutter Impeller |

texture_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_TEXTURE_FILTER_INPUT_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_TEXTURE_FILTER_INPUT_H_
7
8 #include "impeller/entity/contents/filters/inputs/filter_input.h"
9
10 #include "impeller/geometry/matrix.h"
11
12 namespace impeller {
13
14 class TextureFilterInput final : public FilterInput {
15 public:
16 ~TextureFilterInput() override;
17
18 // |FilterInput|
19 std::optional<Snapshot> GetSnapshot(std::string_view label,
20 const ContentContext& renderer,
21 const Entity& entity,
22 std::optional<Rect> coverage_limit,
23 int32_t mip_count) 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 private:
32 explicit TextureFilterInput(std::shared_ptr<Texture> texture,
33 Matrix local_transform = Matrix());
34
35 std::shared_ptr<Texture> texture_;
36 Matrix local_transform_;
37
38 friend FilterInput;
39 };
40
41 } // namespace impeller
42
43 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_TEXTURE_FILTER_INPUT_H_
impeller::ContentContext
Definition: content_context.h:122
impeller::Entity
Definition: entity.h:26
impeller::FilterInput
Definition: filter_input.h:30
impeller::TextureFilterInput
Definition: texture_filter_input.h:14
impeller::TextureFilterInput::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Definition: texture_filter_input.cc:34
impeller::TextureFilterInput::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: texture_filter_input.cc:19
impeller::TextureFilterInput::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: texture_filter_input.cc:40
impeller::TextureFilterInput::~TextureFilterInput
~TextureFilterInput() override
filter_input.h
matrix.h
impeller
Definition: allocation.cc:12
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37