Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
entity_pass_delegate.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
7
8namespace impeller {
9
11
13
15 public:
17
18 // |EntityPassDelegate|
19 ~DefaultEntityPassDelegate() override = default;
20
21 // |EntityPassDelegate|
22 bool CanElide() override { return false; }
23
24 // |EntityPassDelegate|
25 bool CanCollapseIntoParentPass(EntityPass* entity_pass) override {
26 return true;
27 }
28
29 // |EntityPassDelegate|
30 std::shared_ptr<Contents> CreateContentsForSubpassTarget(
31 std::shared_ptr<Texture> target,
32 const Matrix& effect_transform) override {
33 // Not possible since this pass always collapses into its parent.
35 }
36
37 // |EntityPassDelgate|
38 std::shared_ptr<FilterContents> WithImageFilter(
39 const FilterInput::Variant& input,
40 const Matrix& effect_transform) const override {
41 return nullptr;
42 }
43
44 private:
46
48 delete;
49};
50
51std::unique_ptr<EntityPassDelegate> EntityPassDelegate::MakeDefault() {
52 return std::make_unique<DefaultEntityPassDelegate>();
53}
54
55} // namespace impeller
std::shared_ptr< Contents > CreateContentsForSubpassTarget(std::shared_ptr< Texture > target, const Matrix &effect_transform) override
~DefaultEntityPassDelegate() override=default
bool CanCollapseIntoParentPass(EntityPass *entity_pass) override
Whether or not this entity pass can be collapsed into the parent. If true, this method may modify the...
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform) const override
static std::unique_ptr< EntityPassDelegate > MakeDefault()
std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect > Variant
uint32_t * target
#define FML_UNREACHABLE()
Definition logging.h:109
A 4x4 matrix using column-major storage.
Definition matrix.h:37