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 | RecordClip (const ClipContents &clip_contents, Matrix transform, Point global_pass_position, uint32_t clip_depth, size_t clip_height_floor, bool is_aa) |
ReplayResult & | GetLastReplayResult () |
ClipStateResult | RecordRestore (Point global_pass_position, size_t restore_height) |
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 23 of file entity_pass_clip_stack.h.
|
explicit |
Create a new [EntityPassClipStack] with an initialized coverage rect.
Definition at line 12 of file entity_pass_clip_stack.cc.
References impeller::ClipCoverageLayer::coverage.
|
default |
std::optional< Rect > impeller::EntityPassClipStack::CurrentClipCoverage | ( | ) | const |
Definition at line 24 of file entity_pass_clip_stack.cc.
Referenced by impeller::Canvas::ClipGeometry(), impeller::Canvas::GetLocalCoverageLimit(), RecordClip(), impeller::Canvas::Restore(), and impeller::testing::TEST().
const std::vector< ClipCoverageLayer > impeller::EntityPassClipStack::GetClipCoverageLayers | ( | ) | const |
Definition at line 50 of file entity_pass_clip_stack.cc.
Referenced by impeller::testing::TEST().
|
inline |
Definition at line 61 of file entity_pass_clip_stack.h.
Referenced by impeller::Canvas::ClipGeometry().
const std::vector< EntityPassClipStack::ReplayResult > & impeller::EntityPassClipStack::GetReplayEntities | ( | ) | const |
Definition at line 209 of file entity_pass_clip_stack.cc.
Referenced by impeller::testing::TEST().
bool impeller::EntityPassClipStack::HasCoverage | ( | ) | const |
Definition at line 28 of file entity_pass_clip_stack.cc.
Referenced by impeller::Canvas::GetLocalCoverageLimit().
void impeller::EntityPassClipStack::PopSubpass | ( | ) |
Definition at line 44 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 32 of file entity_pass_clip_stack.cc.
References impeller::ClipCoverageLayer::coverage.
Referenced by impeller::Canvas::SaveLayer(), and impeller::testing::TEST().
EntityPassClipStack::ClipStateResult impeller::EntityPassClipStack::RecordClip | ( | const ClipContents & | clip_contents, |
Matrix | transform, | ||
Point | global_pass_position, | ||
uint32_t | clip_depth, | ||
size_t | clip_height_floor, | ||
bool | is_aa | ||
) |
Definition at line 100 of file entity_pass_clip_stack.cc.
References impeller::EntityPassClipStack::ReplayResult::clip_contents, impeller::EntityPassClipStack::ClipStateResult::clip_did_change, impeller::ClipCoverage::coverage, impeller::ClipCoverageLayer::coverage, CurrentClipCoverage(), impeller::TRect< T >::GetBottom(), impeller::ClipContents::GetClipCoverage(), impeller::TRect< T >::GetLeft(), impeller::TRect< T >::GetRight(), impeller::TRect< T >::GetTop(), impeller::ClipCoverage::is_difference_or_non_square, impeller::TRect< Scalar >::Round(), impeller::EntityPassClipStack::ClipStateResult::should_render, and transform.
Referenced by impeller::Canvas::ClipGeometry(), and impeller::testing::TEST().
EntityPassClipStack::ClipStateResult impeller::EntityPassClipStack::RecordRestore | ( | Point | global_pass_position, |
size_t | restore_height | ||
) |
Definition at line 54 of file entity_pass_clip_stack.cc.
References impeller::EntityPassClipStack::ClipStateResult::clip_did_change, and impeller::EntityPassClipStack::ClipStateResult::should_render.
Referenced by impeller::Canvas::Restore(), and impeller::testing::TEST().