Flutter Engine
 
Loading...
Searching...
No Matches
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
9
10namespace impeller {
11
13 public:
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_
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
virtual void SetRenderingMode(Entity::RenderingMode rendering_mode) override
Turns on subpass mode for filter inputs.
Matrix GetLocalTransform(const Entity &entity) const override
Get the local transform of this filter input. This transform is relative to the Entity transform spac...
Matrix GetTransform(const Entity &entity) const override
Get the transform of this FilterInput. This is equivalent to calling entity.GetTransform() * GetLocal...
std::optional< Rect > GetSourceCoverage(const Matrix &effect_transform, const Rect &output_limit) const override
virtual void SetEffectTransform(const Matrix &matrix) override
Sets the effect transform of filter inputs.
std::optional< Rect > GetCoverage(const Entity &entity) const override
A 4x4 matrix using column-major storage.
Definition matrix.h:37