#include <filter_contents_filter_input.h>
Public Member Functions | |
~FilterContentsFilterInput () override | |
std::optional< Snapshot > | GetSnapshot (std::string_view label, const ContentContext &renderer, const Entity &entity, std::optional< Rect > coverage_limit, int32_t mip_count) const override |
std::optional< Rect > | GetCoverage (const Entity &entity) const override |
std::optional< Rect > | GetSourceCoverage (const Matrix &effect_transform, const Rect &output_limit) const override |
Matrix | GetLocalTransform (const Entity &entity) const override |
Get the local transform of this filter input. This transform is relative to the Entity transform space. More... | |
Matrix | GetTransform (const Entity &entity) const override |
Get the transform of this FilterInput . This is equivalent to calling entity.GetTransform() * GetLocalTransform() . More... | |
virtual void | SetEffectTransform (const Matrix &matrix) override |
Sets the effect transform of filter inputs. More... | |
virtual void | SetRenderingMode (Entity::RenderingMode rendering_mode) override |
Turns on subpass mode for filter inputs. More... | |
![]() | |
virtual | ~FilterInput () |
std::optional< Rect > | GetLocalCoverage (const Entity &entity) const |
Additional Inherited Members | |
![]() | |
using | Ref = std::shared_ptr< FilterInput > |
using | Vector = std::vector< FilterInput::Ref > |
using | Variant = std::variant< std::shared_ptr< FilterContents >, std::shared_ptr< Contents >, std::shared_ptr< Texture >, Rect > |
![]() | |
static FilterInput::Ref | Make (Variant input, bool msaa_enabled=true) |
static FilterInput::Ref | Make (std::shared_ptr< Texture > input, Matrix local_transform) |
static FilterInput::Vector | Make (std::initializer_list< Variant > inputs) |
Definition at line 12 of file filter_contents_filter_input.h.
|
overridedefault |
|
overridevirtual |
Implements impeller::FilterInput.
Definition at line 38 of file filter_contents_filter_input.cc.
|
overridevirtual |
Get the local transform of this filter input. This transform is relative to the Entity
transform space.
Reimplemented from impeller::FilterInput.
Definition at line 49 of file filter_contents_filter_input.cc.
References impeller::Entity::GetTransform().
|
overridevirtual |
Evaluates the filter input and returns a snapshot of the result.
This method renders the input (which could be another filter, contents, or a texture) into a Snapshot
object, which contains the resulting texture and its transform relative to the current render target.
Implementations are typically lazy and may cache the result, ensuring that the input is only rendered once even if GetSnapshot
is called multiple times.
[in] | label | A debug label for the rendering operation and the resulting snapshot texture. |
[in] | renderer | The content context providing rendering resources. |
[in] | entity | The entity associated with this filter input, providing transform and other contextual information. |
[in] | coverage_limit | An optional rectangle to limit the area of the input that needs to be rendered. This can be used as an optimization. |
[in] | mip_count | The number of mip levels to generate for the snapshot texture. Defaults to 1 (no mips). |
Snapshot
containing the rendered texture and its transform, or std::nullopt
if the input cannot be rendered or results in an empty output. Implements impeller::FilterInput.
Definition at line 20 of file filter_contents_filter_input.cc.
|
overridevirtual |
Reimplemented from impeller::FilterInput.
Definition at line 43 of file filter_contents_filter_input.cc.
|
overridevirtual |
Get the transform of this FilterInput
. This is equivalent to calling entity.GetTransform() * GetLocalTransform()
.
Reimplemented from impeller::FilterInput.
Definition at line 54 of file filter_contents_filter_input.cc.
References impeller::Entity::GetTransform().
|
overridevirtual |
Sets the effect transform of filter inputs.
Reimplemented from impeller::FilterInput.
Definition at line 58 of file filter_contents_filter_input.cc.
|
overridevirtual |
Turns on subpass mode for filter inputs.
Reimplemented from impeller::FilterInput.
Definition at line 62 of file filter_contents_filter_input.cc.