| Flutter Impeller |

placeholder_filter_input.cc
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 #include "impeller/entity/contents/filters/inputs/placeholder_filter_input.h"
6
7 #include <optional>
8 #include <utility>
9
10 #include "impeller/base/strings.h"
11
12 namespace impeller {
13
14 PlaceholderFilterInput::PlaceholderFilterInput(Rect coverage_rect)
15 : coverage_rect_(coverage_rect) {}
16
17 PlaceholderFilterInput::~PlaceholderFilterInput() = default;
18
19 FilterInput::Variant PlaceholderFilterInput::GetInput() const {
20 return coverage_rect_;
21 }
22
23 std::optional<Snapshot> PlaceholderFilterInput::GetSnapshot(
24 const std::string& label,
25 const ContentContext& renderer,
26 const Entity& entity,
27 std::optional<Rect> coverage_limit,
28 int32_t mip_count) const {
29 return std::nullopt;
30 }
31
32 std::optional<Rect> PlaceholderFilterInput::GetCoverage(
33 const Entity& entity) const {
34 return coverage_rect_;
35 }
36
37 void PlaceholderFilterInput::PopulateGlyphAtlas(
38 const std::shared_ptr<LazyGlyphAtlas>& lazy_glyph_atlas,
39 Scalar scale) {}
40
41 } // namespace impeller
impeller::PlaceholderFilterInput::PopulateGlyphAtlas
void PopulateGlyphAtlas(const std::shared_ptr< LazyGlyphAtlas > &lazy_glyph_atlas, Scalar scale) override
Definition: placeholder_filter_input.cc:37
impeller::Scalar
float Scalar
Definition: scalar.h:18
impeller::PlaceholderFilterInput::GetInput
Variant GetInput() const override
Definition: placeholder_filter_input.cc:19
placeholder_filter_input.h
impeller::PlaceholderFilterInput::GetSnapshot
std::optional< Snapshot > GetSnapshot(const std::string &label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit, int32_t mip_count=1) const override
Definition: placeholder_filter_input.cc:23
impeller::PlaceholderFilterInput::PlaceholderFilterInput
PlaceholderFilterInput(Rect coverage)
Definition: placeholder_filter_input.cc:14
impeller::Entity
Definition: entity.h:20
impeller::PlaceholderFilterInput::GetCoverage
std::optional< Rect > GetCoverage(const Entity &entity) const override
Definition: placeholder_filter_input.cc:32
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
strings.h
scale
const Scalar scale
Definition: stroke_path_geometry.cc:308
impeller
Definition: aiks_blend_unittests.cc:18
impeller::ContentContext
Definition: content_context.h:366
impeller::TRect< Scalar >