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 #pragma once
6 
7 #include <memory>
8 
9 #include "flutter/fml/macros.h"
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  FML_DISALLOW_COPY_AND_ASSIGN(EntityPassDelegate);
43 };
44 
45 } // namespace impeller
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:48
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:26
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:36
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:36
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...