Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::PaintPassDelegate Class Referencefinal

#include <paint_pass_delegate.h>

Inheritance diagram for impeller::PaintPassDelegate:
impeller::EntityPassDelegate

Public Member Functions

 PaintPassDelegate (Paint paint)
 
 ~PaintPassDelegate () override
 
bool CanElide () override
 
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 entities for the current pass.
 
std::shared_ptr< ContentsCreateContentsForSubpassTarget (std::shared_ptr< Texture > target, const Matrix &effect_transform) override
 
std::shared_ptr< FilterContentsWithImageFilter (const FilterInput::Variant &input, const Matrix &effect_transform) const override
 
- Public Member Functions inherited from impeller::EntityPassDelegate
 EntityPassDelegate ()
 
virtual ~EntityPassDelegate ()
 

Additional Inherited Members

- Static Public Member Functions inherited from impeller::EntityPassDelegate
static std::unique_ptr< EntityPassDelegateMakeDefault ()
 

Detailed Description

Definition at line 16 of file paint_pass_delegate.h.

Constructor & Destructor Documentation

◆ PaintPassDelegate()

impeller::PaintPassDelegate::PaintPassDelegate ( Paint  paint)
explicit

PaintPassDelegate

Definition at line 19 of file paint_pass_delegate.cc.

19: paint_(std::move(paint)) {}
const Paint & paint

◆ ~PaintPassDelegate()

impeller::PaintPassDelegate::~PaintPassDelegate ( )
overridedefault

Member Function Documentation

◆ CanCollapseIntoParentPass()

bool impeller::PaintPassDelegate::CanCollapseIntoParentPass ( EntityPass entity_pass)
overridevirtual

Whether or not this entity pass can be collapsed into the parent. If true, this method may modify the entities for the current pass.

Implements impeller::EntityPassDelegate.

Definition at line 30 of file paint_pass_delegate.cc.

30 {
31 return false;
32}

◆ CanElide()

bool impeller::PaintPassDelegate::CanElide ( )
overridevirtual

Implements impeller::EntityPassDelegate.

Definition at line 25 of file paint_pass_delegate.cc.

25 {
26 return paint_.blend_mode == BlendMode::kDestination;
27}
BlendMode blend_mode
Definition paint.h:64

◆ CreateContentsForSubpassTarget()

std::shared_ptr< Contents > impeller::PaintPassDelegate::CreateContentsForSubpassTarget ( std::shared_ptr< Texture target,
const Matrix effect_transform 
)
overridevirtual

Implements impeller::EntityPassDelegate.

Definition at line 35 of file paint_pass_delegate.cc.

37 {
38 auto contents = TextureContents::MakeRect(Rect::MakeSize(target->GetSize()));
39 contents->SetTexture(target);
40 contents->SetLabel("Subpass");
41 contents->SetSourceRect(Rect::MakeSize(target->GetSize()));
42 contents->SetOpacity(paint_.color.alpha);
43 contents->SetDeferApplyingOpacity(true);
44
45 return paint_.WithFiltersForSubpassTarget(std::move(contents),
46 effect_transform);
47}
static std::shared_ptr< TextureContents > MakeRect(Rect destination)
A common case factory that marks the texture contents as having a destination rectangle....
uint32_t * target
Scalar alpha
Definition color.h:143
Color color
Definition paint.h:55
std::shared_ptr< Contents > WithFiltersForSubpassTarget(std::shared_ptr< Contents > input, const Matrix &effect_transform=Matrix()) const
Wrap this paint's configured filters to the given contents of subpass target.
Definition paint.cc:67
static constexpr TRect MakeSize(const TSize< U > &size)
Definition rect.h:146

◆ WithImageFilter()

std::shared_ptr< FilterContents > impeller::PaintPassDelegate::WithImageFilter ( const FilterInput::Variant input,
const Matrix effect_transform 
) const
overridevirtual

Implements impeller::EntityPassDelegate.

Definition at line 50 of file paint_pass_delegate.cc.

52 {
53 return paint_.WithImageFilter(input, effect_transform,
55}
std::shared_ptr< FilterContents > WithImageFilter(const FilterInput::Variant &input, const Matrix &effect_transform, Entity::RenderingMode rendering_mode) const
Definition paint.cc:88

The documentation for this class was generated from the following files: