5#ifndef FLUTTER_IMPELLER_ENTITY_ENTITY_H_
6#define FLUTTER_IMPELLER_ENTITY_ENTITY_H_
35 kSubpassAppendSnapshotTransform,
36 kSubpassPrependSnapshotTransform,
94 const std::optional<Rect>& current_clip_coverage)
const;
96 bool ShouldRender(
const std::optional<Rect>& clip_coverage)
const;
98 void SetContents(std::shared_ptr<Contents> contents);
100 const std::shared_ptr<Contents>&
GetContents()
const;
132 std::shared_ptr<Contents> contents_;
134 uint32_t clip_depth_ = 1u;
bool CanInheritOpacity() const
void SetTransform(const Matrix &transform)
Set the global transform matrix for this Entity.
static Entity FromSnapshot(const Snapshot &snapshot, BlendMode blend_mode=BlendMode::kSourceOver)
Create an entity that can be used to render a given snapshot.
std::optional< Rect > GetCoverage() const
bool SetInheritedOpacity(Scalar alpha)
const std::shared_ptr< Contents > & GetContents() const
Matrix GetShaderTransform(const RenderPass &pass) const
Get the vertex shader transform used for drawing this Entity.
void SetClipDepth(uint32_t clip_depth)
BlendMode GetBlendMode() const
void SetContents(std::shared_ptr< Contents > contents)
void SetBlendMode(BlendMode blend_mode)
static constexpr BlendMode kLastAdvancedBlendMode
static constexpr Scalar kDepthEpsilon
bool Render(const ContentContext &renderer, RenderPass &parent_pass) const
Scalar DeriveTextScale() const
std::optional< Color > AsBackgroundColor(ISize target_size) const
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
static constexpr BlendMode kLastPipelineBlendMode
uint32_t GetClipDepth() const
bool ShouldRender(const std::optional< Rect > &clip_coverage) const
static bool IsBlendModeDestructive(BlendMode blend_mode)
Returns true if the blend mode is "destructive", meaning that even fully transparent source colors wo...
Contents::ClipCoverage GetClipCoverage(const std::optional< Rect > ¤t_clip_coverage) const
float GetShaderClipDepth() const
Render passes encode render commands directed as one specific render target into an underlying comman...
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
A 4x4 matrix using column-major storage.
Represents a texture and its intended draw transform/sampler configuration.