Flutter Engine
The Flutter Engine
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
9
11
12namespace impeller {
13
14class TextureFilterInput final : public FilterInput {
15 public:
17
18 // |FilterInput|
19 Variant GetInput() const override;
20
21 // |FilterInput|
22 std::optional<Snapshot> GetSnapshot(const std::string& label,
24 const Entity& entity,
25 std::optional<Rect> coverage_limit,
26 int32_t mip_count) const override;
27
28 // |FilterInput|
29 std::optional<Rect> GetCoverage(const Entity& entity) const override;
30
31 // |FilterInput|
32 Matrix GetLocalTransform(const Entity& entity) const override;
33
34 private:
35 explicit TextureFilterInput(std::shared_ptr<Texture> texture,
36 Matrix local_transform = Matrix());
37
38 std::shared_ptr<Texture> texture_;
39 Matrix local_transform_;
40
41 friend FilterInput;
42};
43
44} // namespace impeller
45
46#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_TEXTURE_FILTER_INPUT_H_
std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect > Variant
Definition: filter_input.h:37
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
std::optional< Rect > GetCoverage(const Entity &entity) 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...
Variant GetInput() const override
FlTexture * texture
SK_API sk_sp< PrecompileColorFilter > Matrix()
A 4x4 matrix using column-major storage.
Definition: matrix.h:37