Flutter Impeller
paint_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_AIKS_PAINT_PASS_DELEGATE_H_
6 #define FLUTTER_IMPELLER_AIKS_PAINT_PASS_DELEGATE_H_
7 
8 #include <optional>
9 
10 #include "impeller/aiks/paint.h"
12 
13 namespace impeller {
14 
15 class PaintPassDelegate final : public EntityPassDelegate {
16  public:
17  explicit PaintPassDelegate(Paint paint);
18 
19  // |EntityPassDelgate|
20  ~PaintPassDelegate() override;
21 
22  // |EntityPassDelgate|
23  bool CanElide() override;
24 
25  // |EntityPassDelgate|
26  bool CanCollapseIntoParentPass(EntityPass* entity_pass) override;
27 
28  // |EntityPassDelgate|
29  std::shared_ptr<Contents> CreateContentsForSubpassTarget(
30  std::shared_ptr<Texture> target,
31  const Matrix& effect_transform) override;
32 
33  // |EntityPassDelgate|
34  std::shared_ptr<FilterContents> WithImageFilter(
35  const FilterInput::Variant& input,
36  const Matrix& effect_transform) const override;
37 
38  private:
39  const Paint paint_;
40 
41  PaintPassDelegate(const PaintPassDelegate&) = delete;
42 
43  PaintPassDelegate& operator=(const PaintPassDelegate&) = delete;
44 };
45 
46 } // namespace impeller
47 
48 #endif // FLUTTER_IMPELLER_AIKS_PAINT_PASS_DELEGATE_H_
impeller::PaintPassDelegate::CreateContentsForSubpassTarget
std::shared_ptr< Contents > CreateContentsForSubpassTarget(std::shared_ptr< Texture > target, const Matrix &effect_transform) override
Definition: paint_pass_delegate.cc:34
entity_pass_delegate.h
impeller::Paint
Definition: paint.h:23
impeller::EntityPassDelegate
Definition: entity_pass_delegate.h:19
impeller::EntityPass
Definition: entity_pass.h:43
impeller::PaintPassDelegate::CanCollapseIntoParentPass
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...
Definition: paint_pass_delegate.cc:29
impeller::FilterInput::Variant
std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect > Variant
Definition: filter_input.h:37
impeller::PaintPassDelegate
Definition: paint_pass_delegate.h:15
impeller::PaintPassDelegate::PaintPassDelegate
PaintPassDelegate(Paint paint)
Definition: paint_pass_delegate.cc:18
impeller::PaintPassDelegate::WithImageFilter
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform) const override
Definition: paint_pass_delegate.cc:49
paint
const Paint & paint
Definition: color_source.cc:38
impeller::PaintPassDelegate::~PaintPassDelegate
~PaintPassDelegate() override
paint.h
impeller::PaintPassDelegate::CanElide
bool CanElide() override
Definition: paint_pass_delegate.cc:24
impeller
Definition: aiks_blend_unittests.cc:18
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37