#include <clip_contents.h>
Public Member Functions | |
ClipContents (Rect coverage_rect, bool is_axis_aligned_rect) | |
~ClipContents () | |
void | SetGeometry (GeometryResult geometry) |
Set the pre-tessellated clip geometry. More... | |
void | SetClipOperation (Entity::ClipOperation clip_op) |
ClipCoverage | GetClipCoverage (const std::optional< Rect > ¤t_clip_coverage) const |
Given the current pass space bounding rectangle of the clip buffer, return the expected clip coverage after this draw call. This should only be implemented for contents that may write to the clip buffer. More... | |
bool | Render (const ContentContext &renderer, RenderPass &pass, uint32_t clip_depth) const |
Definition at line 29 of file clip_contents.h.
impeller::ClipContents::ClipContents | ( | Rect | coverage_rect, |
bool | is_axis_aligned_rect | ||
) |
Definition at line 31 of file clip_contents.cc.
|
default |
ClipCoverage impeller::ClipContents::GetClipCoverage | ( | const std::optional< Rect > & | current_clip_coverage | ) | const |
Given the current pass space bounding rectangle of the clip buffer, return the expected clip coverage after this draw call. This should only be implemented for contents that may write to the clip buffer.
During rendering, coverage coordinates count pixels from the top left corner of the framebuffer.
Definition at line 45 of file clip_contents.cc.
References impeller::ClipCoverage::coverage, impeller::TRect< T >::IsEmpty(), impeller::Entity::kDifference, and impeller::Entity::kIntersect.
Referenced by impeller::EntityPassClipStack::RecordClip().
bool impeller::ClipContents::Render | ( | const ContentContext & | renderer, |
RenderPass & | pass, | ||
uint32_t | clip_depth | ||
) | const |
Stencil preparation draw.
Write depth.
Definition at line 70 of file clip_contents.cc.
References impeller::CreateVertexBuffer(), impeller::RenderPass::Draw(), impeller::HostBuffer::EmplaceUniform(), impeller::ContentContext::GetClipPipeline(), impeller::RenderPass::GetOrthographicTransform(), impeller::TRect< T >::GetPoints(), impeller::RenderPass::GetRenderTargetSize(), impeller::GetShaderClipDepth(), impeller::ContentContext::GetTransientsBuffer(), impeller::ContentContextOptions::kCoverCompare, impeller::ContentContextOptions::kCoverCompareInverted, impeller::Entity::kDifference, impeller::kDst, impeller::GeometryResult::kEvenOdd, impeller::Entity::kIntersect, impeller::GeometryResult::kNonZero, impeller::GeometryResult::kNormal, impeller::ContentContextOptions::kOverdrawPreventionIncrement, impeller::GeometryResult::kPreventOverdraw, impeller::ContentContextOptions::kStencilEvenOddFill, impeller::ContentContextOptions::kStencilNonZeroFill, impeller::kTriangleStrip, impeller::TRect< Scalar >::MakeSize(), impeller::GeometryResult::mode, impeller::OptionsFromPass(), points, impeller::RenderPass::SetCommandLabel(), impeller::RenderPass::SetPipeline(), impeller::RenderPass::SetStencilReference(), impeller::RenderPass::SetVertexBuffer(), impeller::GeometryResult::transform, impeller::GeometryResult::type, and impeller::GeometryResult::vertex_buffer.
Referenced by impeller::Canvas::ClipGeometry().
void impeller::ClipContents::SetClipOperation | ( | Entity::ClipOperation | clip_op | ) |
Definition at line 41 of file clip_contents.cc.
Referenced by impeller::Canvas::ClipGeometry().
void impeller::ClipContents::SetGeometry | ( | GeometryResult | geometry | ) |
Set the pre-tessellated clip geometry.
Definition at line 37 of file clip_contents.cc.
Referenced by impeller::Canvas::ClipGeometry().