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 "flutter/fml/macros.h"
11 #include "impeller/core/texture.h"
15 
16 namespace impeller {
17 
18 class EntityPass;
19 
21  public:
22  static std::unique_ptr<EntityPassDelegate> MakeDefault();
23 
25 
26  virtual ~EntityPassDelegate();
27 
28  virtual bool CanElide() = 0;
29 
30  /// @brief Whether or not this entity pass can be collapsed into the parent.
31  /// If true, this method may modify the entities for the current pass.
32  virtual bool CanCollapseIntoParentPass(EntityPass* entity_pass) = 0;
33 
34  virtual std::shared_ptr<Contents> CreateContentsForSubpassTarget(
35  std::shared_ptr<Texture> target,
36  const Matrix& effect_transform) = 0;
37 
38  virtual std::shared_ptr<FilterContents> WithImageFilter(
39  const FilterInput::Variant& input,
40  const Matrix& effect_transform) const = 0;
41 
42  private:
43  EntityPassDelegate(const EntityPassDelegate&) = delete;
44 
45  EntityPassDelegate& operator=(const EntityPassDelegate&) = delete;
46 };
47 
48 } // namespace impeller
49 
50 #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:20
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:25
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_context.cc:10
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...