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