A class that tracks all clips that have been recorded in the current entity pass stencil. More...
#include <entity_pass_clip_stack.h>
Classes | |
| struct | ClipStateResult |
| struct | ReplayResult |
Public Member Functions | |
| EntityPassClipStack (const Rect &initial_coverage_rect) | |
| Create a new [EntityPassClipStack] with an initialized coverage rect. More... | |
| ~EntityPassClipStack ()=default | |
| std::optional< Rect > | CurrentClipCoverage () const |
| void | PushSubpass (std::optional< Rect > subpass_coverage, size_t clip_height) |
| void | PopSubpass () |
| bool | HasCoverage () const |
| ClipStateResult | ApplyClipState (Contents::ClipCoverage global_clip_coverage, Entity &entity, size_t clip_height_floor, Point global_pass_position) |
| Applies the current clip state to an Entity. If the given Entity is a clip operation, then the clip state is updated accordingly. More... | |
| void | RecordEntity (const Entity &entity, Contents::ClipCoverage::Type type, std::optional< Rect > clip_coverage) |
| const std::vector< ReplayResult > & | GetReplayEntities () const |
| const std::vector< ClipCoverageLayer > | GetClipCoverageLayers () const |
A class that tracks all clips that have been recorded in the current entity pass stencil.
These clips are replayed when restoring the backdrop so that the stencil buffer is left in an identical state.
Definition at line 24 of file entity_pass_clip_stack.h.
|
explicit |
Create a new [EntityPassClipStack] with an initialized coverage rect.
Definition at line 11 of file entity_pass_clip_stack.cc.
References impeller::ClipCoverageLayer::coverage.
|
default |
| EntityPassClipStack::ClipStateResult impeller::EntityPassClipStack::ApplyClipState | ( | Contents::ClipCoverage | global_clip_coverage, |
| Entity & | entity, | ||
| size_t | clip_height_floor, | ||
| Point | global_pass_position | ||
| ) |
Applies the current clip state to an Entity. If the given Entity is a clip operation, then the clip state is updated accordingly.
Definition at line 51 of file entity_pass_clip_stack.cc.
References impeller::EntityPassClipStack::ClipStateResult::clip_did_change, impeller::ClipCoverageLayer::coverage, impeller::Contents::ClipCoverage::coverage, CurrentClipCoverage(), impeller::Entity::GetContents(), impeller::ClipRestoreContents::GetRestoreHeight(), impeller::Contents::ClipCoverage::kAppend, impeller::Contents::ClipCoverage::kNoChange, impeller::Contents::ClipCoverage::kRestore, RecordEntity(), impeller::EntityPassClipStack::ClipStateResult::should_render, and impeller::Contents::ClipCoverage::type.
Referenced by impeller::ExperimentalCanvas::Restore(), and impeller::testing::TEST().
| std::optional< Rect > impeller::EntityPassClipStack::CurrentClipCoverage | ( | ) | const |
Definition at line 23 of file entity_pass_clip_stack.cc.
Referenced by ApplyClipState(), impeller::ExperimentalCanvas::Restore(), and impeller::ExperimentalCanvas::SaveLayer().
| const std::vector< ClipCoverageLayer > impeller::EntityPassClipStack::GetClipCoverageLayers | ( | ) | const |
Definition at line 47 of file entity_pass_clip_stack.cc.
Referenced by impeller::testing::TEST().
| const std::vector< EntityPassClipStack::ReplayResult > & impeller::EntityPassClipStack::GetReplayEntities | ( | ) | const |
Definition at line 158 of file entity_pass_clip_stack.cc.
Referenced by impeller::ExperimentalCanvas::SaveLayer(), and impeller::testing::TEST().
| bool impeller::EntityPassClipStack::HasCoverage | ( | ) | const |
Definition at line 27 of file entity_pass_clip_stack.cc.
Referenced by impeller::ExperimentalCanvas::SaveLayer().
| void impeller::EntityPassClipStack::PopSubpass | ( | ) |
Definition at line 42 of file entity_pass_clip_stack.cc.
Referenced by impeller::ExperimentalCanvas::Restore(), and impeller::testing::TEST().
| void impeller::EntityPassClipStack::PushSubpass | ( | std::optional< Rect > | subpass_coverage, |
| size_t | clip_height | ||
| ) |
Definition at line 31 of file entity_pass_clip_stack.cc.
References impeller::ClipCoverageLayer::coverage.
Referenced by impeller::ExperimentalCanvas::SaveLayer(), and impeller::testing::TEST().
| void impeller::EntityPassClipStack::RecordEntity | ( | const Entity & | entity, |
| Contents::ClipCoverage::Type | type, | ||
| std::optional< Rect > | clip_coverage | ||
| ) |
Definition at line 133 of file entity_pass_clip_stack.cc.
References impeller::Entity::Clone(), impeller::Contents::ClipCoverage::kAppend, impeller::Contents::ClipCoverage::kNoChange, impeller::Contents::ClipCoverage::kRestore, and type.
Referenced by ApplyClipState(), and impeller::testing::TEST().