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