Flutter Impeller
placeholder_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_PLACEHOLDER_FILTER_INPUT_H_
6 #define FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_PLACEHOLDER_FILTER_INPUT_H_
7 
9 
10 namespace impeller {
11 
12 class PlaceholderFilterInput final : public FilterInput {
13  public:
14  explicit PlaceholderFilterInput(Rect coverage);
15 
16  ~PlaceholderFilterInput() override;
17 
18  // |FilterInput|
19  Variant GetInput() const override;
20 
21  // |FilterInput|
22  std::optional<Snapshot> GetSnapshot(
23  const std::string& label,
24  const ContentContext& renderer,
25  const Entity& entity,
26  std::optional<Rect> coverage_limit) const override;
27 
28  // |FilterInput|
29  std::optional<Rect> GetCoverage(const Entity& entity) const override;
30 
31  // |FilterInput|
32  void PopulateGlyphAtlas(
33  const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
34  Scalar scale) override;
35 
36  private:
37  Rect coverage_rect_;
38 
39  friend FilterInput;
40 };
41 
42 } // namespace impeller
43 
44 #endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_FILTERS_INPUTS_PLACEHOLDER_FILTER_INPUT_H_
impeller::PlaceholderFilterInput::PopulateGlyphAtlas
void PopulateGlyphAtlas(const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) override
Definition: placeholder_filter_input.cc:36
impeller::PlaceholderFilterInput::GetSnapshot
std::optional< Snapshot > GetSnapshot(const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit) const override
Definition: placeholder_filter_input.cc:23
impeller::Scalar
float Scalar
Definition: scalar.h:18
impeller::PlaceholderFilterInput::GetInput
Variant GetInput() const override
Definition: placeholder_filter_input.cc:19
impeller::PlaceholderFilterInput::PlaceholderFilterInput
PlaceholderFilterInput(Rect coverage)
Definition: placeholder_filter_input.cc:14
impeller::Entity
Definition: entity.h:21
impeller::PlaceholderFilterInput::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Definition: placeholder_filter_input.cc:31
impeller::FilterInput
Definition: filter_input.h:30
impeller::PlaceholderFilterInput::~PlaceholderFilterInput
~PlaceholderFilterInput() override
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
Definition: aiks_context.cc:10
impeller::ContentContext
Definition: content_context.h:332
impeller::TRect< Scalar >
impeller::PlaceholderFilterInput
Definition: placeholder_filter_input.h:12