5#ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_CLIP_CONTENTS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_CLIP_CONTENTS_H_
24 void SetGeometry(
const std::shared_ptr<Geometry>& geometry);
34 const std::optional<Rect>& current_clip_coverage)
const override;
38 const std::optional<Rect> clip_coverage)
const override;
51 std::shared_ptr<Geometry> geometry_;
81 const std::optional<Rect>& current_clip_coverage)
const override;
85 const std::optional<Rect> clip_coverage)
const override;
99 std::optional<Rect> restore_coverage_;
100 size_t restore_height_ = 0;
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
ClipCoverage GetClipCoverage(const Entity &entity, const std::optional< Rect > ¤t_clip_coverage) const override
Given the current pass space bounding rectangle of the clip buffer, return the expected clip coverage...
void SetInheritedOpacity(Scalar opacity) override
Inherit the provided opacity.
void SetClipOperation(Entity::ClipOperation clip_op)
bool ShouldRender(const Entity &entity, const std::optional< Rect > clip_coverage) const override
bool CanInheritOpacity(const Entity &entity) const override
Whether or not this contents can accept the opacity peephole optimization.
void SetGeometry(const std::shared_ptr< Geometry > &geometry)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool CanInheritOpacity(const Entity &entity) const override
Whether or not this contents can accept the opacity peephole optimization.
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
void SetInheritedOpacity(Scalar opacity) override
Inherit the provided opacity.
void SetRestoreCoverage(std::optional< Rect > coverage)
The area on the pass texture where this clip restore will be applied. If unset, the entire pass textu...
ClipCoverage GetClipCoverage(const Entity &entity, const std::optional< Rect > ¤t_clip_coverage) const override
Given the current pass space bounding rectangle of the clip buffer, return the expected clip coverage...
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
bool ShouldRender(const Entity &entity, const std::optional< Rect > clip_coverage) const override
void SetRestoreHeight(size_t clip_height)
size_t GetRestoreHeight() const
Render passes encode render commands directed as one specific render target into an underlying comman...