Flutter Impeller
entity_pass_delegate.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_ENTITY_PASS_DELEGATE_H_
6 #define FLUTTER_IMPELLER_ENTITY_ENTITY_PASS_DELEGATE_H_
7 
8 #include <memory>
9 
10 #include "impeller/core/texture.h"
14 
15 namespace impeller {
16 
17 class EntityPass;
18 
20  public:
21  static std::unique_ptr<EntityPassDelegate> MakeDefault();
22 
24 
25  virtual ~EntityPassDelegate();
26 
27  virtual bool CanElide() = 0;
28 
29  /// @brief Whether or not this entity pass can be collapsed into the parent.
30  /// If true, this method may modify the entities for the current pass.
31  virtual bool CanCollapseIntoParentPass(EntityPass* entity_pass) = 0;
32 
33  virtual std::shared_ptr<Contents> CreateContentsForSubpassTarget(
34  std::shared_ptr<Texture> target,
35  const Matrix& effect_transform) = 0;
36 
37  virtual std::shared_ptr<FilterContents> WithImageFilter(
38  const FilterInput::Variant& input,
39  const Matrix& effect_transform) const = 0;
40 
41  private:
42  EntityPassDelegate(const EntityPassDelegate&) = delete;
43 
44  EntityPassDelegate& operator=(const EntityPassDelegate&) = delete;
45 };
46 
47 } // namespace impeller
48 
49 #endif // FLUTTER_IMPELLER_ENTITY_ENTITY_PASS_DELEGATE_H_
contents.h
impeller::EntityPassDelegate::WithImageFilter
virtual std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform) const =0
impeller::EntityPassDelegate::~EntityPassDelegate
virtual ~EntityPassDelegate()
impeller::EntityPassDelegate::MakeDefault
static std::unique_ptr< EntityPassDelegate > MakeDefault()
Definition: entity_pass_delegate.cc:51
impeller::EntityPassDelegate
Definition: entity_pass_delegate.h:19
filter_contents.h
impeller::EntityPassDelegate::CreateContentsForSubpassTarget
virtual std::shared_ptr< Contents > CreateContentsForSubpassTarget(std::shared_ptr< Texture > target, const Matrix &effect_transform)=0
impeller::EntityPass
Definition: entity_pass.h:43
impeller::EntityPassDelegate::CanElide
virtual bool CanElide()=0
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::EntityPassDelegate::EntityPassDelegate
EntityPassDelegate()
texture.h
impeller
Definition: aiks_blur_unittests.cc:20
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
impeller::EntityPassDelegate::CanCollapseIntoParentPass
virtual bool CanCollapseIntoParentPass(EntityPass *entity_pass)=0
Whether or not this entity pass can be collapsed into the parent. If true, this method may modify the...