| Flutter Impeller |

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_CONTENTS_FILTER_INPUT_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_CONTENTS_FILTER_INPUT_H_
7
8 #include "impeller/entity/contents/filters/inputs/filter_input.h"
9
10 namespace impeller {
11
12 class ContentsFilterInput final : public FilterInput {
13 public:
14 ~ContentsFilterInput() override;
15
16 // |FilterInput|
17 Variant GetInput() const override;
18
19 // |FilterInput|
20 std::optional<Snapshot> GetSnapshot(
21 const std::string& label,
22 const ContentContext& renderer,
23 const Entity& entity,
24 std::optional<Rect> coverage_limit) const override;
25
26 // |FilterInput|
27 std::optional<Rect> GetCoverage(const Entity& entity) const override;
28
29 // |FilterInput|
30 void PopulateGlyphAtlas(
31 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
32 Scalar scale) override;
33
34 private:
35 ContentsFilterInput(std::shared_ptr<Contents> contents, bool msaa_enabled);
36
37 std::shared_ptr<Contents> contents_;
38 mutable std::optional<Snapshot> snapshot_;
39 bool msaa_enabled_;
40
41 friend FilterInput;
42 };
43
44 } // namespace impeller
45
46 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_CONTENTS_FILTER_INPUT_H_
impeller::Scalar
float Scalar
Definition: scalar.h:18
impeller::ContentsFilterInput::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Definition: contents_filter_input.cc:44
impeller::ContentsFilterInput::GetSnapshot
std::optional< Snapshot > GetSnapshot(const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit) const override
Definition: contents_filter_input.cc:24
impeller::Entity
Definition: entity.h:21
impeller::ContentsFilterInput::GetInput
Variant GetInput() const override
Definition: contents_filter_input.cc:20
impeller::FilterInput
Definition: filter_input.h:30
impeller::ContentsFilterInput
Definition: contents_filter_input.h:12
impeller::FilterInput::Variant
std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect > Variant
Definition: filter_input.h:37
filter_input.h
impeller::ContentsFilterInput::~ContentsFilterInput
~ContentsFilterInput() override
impeller::ContentsFilterInput::PopulateGlyphAtlas
void PopulateGlyphAtlas(const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) override
Definition: contents_filter_input.cc:49
impeller
Definition: aiks_context.cc:10
impeller::ContentContext
Definition: content_context.h:332