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 |
| void | ActivateClipReplay () |
| const ReplayResult * | GetNextReplayResult (size_t current_clip_depth) |
| Returns the next Entity that should be replayed. If there are no enities to replay, then nullptr is returned. More... | |
| 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 13 of file entity_pass_clip_stack.cc.
References impeller::ClipCoverageLayer::coverage.
|
default |
| void impeller::EntityPassClipStack::ActivateClipReplay | ( | ) |
Definition at line 189 of file entity_pass_clip_stack.cc.
| 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 55 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::is_difference_or_non_square, 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::Canvas::Restore(), and impeller::testing::TEST().
| std::optional< Rect > impeller::EntityPassClipStack::CurrentClipCoverage | ( | ) | const |
Definition at line 25 of file entity_pass_clip_stack.cc.
Referenced by ApplyClipState(), impeller::Canvas::GetLocalCoverageLimit(), impeller::Canvas::Restore(), and impeller::testing::TEST().
| const std::vector< ClipCoverageLayer > impeller::EntityPassClipStack::GetClipCoverageLayers | ( | ) | const |
Definition at line 51 of file entity_pass_clip_stack.cc.
Referenced by impeller::testing::TEST().
| const EntityPassClipStack::ReplayResult * impeller::EntityPassClipStack::GetNextReplayResult | ( | size_t | current_clip_depth | ) |
Returns the next Entity that should be replayed. If there are no enities to replay, then nullptr is returned.
Definition at line 194 of file entity_pass_clip_stack.cc.
References impeller::EntityPassClipStack::ReplayResult::entity, and impeller::Entity::GetClipDepth().
| const std::vector< EntityPassClipStack::ReplayResult > & impeller::EntityPassClipStack::GetReplayEntities | ( | ) | const |
Definition at line 185 of file entity_pass_clip_stack.cc.
Referenced by impeller::testing::TEST().
| bool impeller::EntityPassClipStack::HasCoverage | ( | ) | const |
Definition at line 29 of file entity_pass_clip_stack.cc.
Referenced by impeller::Canvas::GetLocalCoverageLimit().
| void impeller::EntityPassClipStack::PopSubpass | ( | ) |
Definition at line 45 of file entity_pass_clip_stack.cc.
Referenced by impeller::Canvas::Restore(), and impeller::testing::TEST().
| void impeller::EntityPassClipStack::PushSubpass | ( | std::optional< Rect > | subpass_coverage, |
| size_t | clip_height | ||
| ) |
Definition at line 33 of file entity_pass_clip_stack.cc.
References impeller::ClipCoverageLayer::coverage.
Referenced by impeller::Canvas::SaveLayer(), and impeller::testing::TEST().
| void impeller::EntityPassClipStack::RecordEntity | ( | const Entity & | entity, |
| Contents::ClipCoverage::Type | type, | ||
| std::optional< Rect > | clip_coverage | ||
| ) |
Definition at line 150 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().