Flutter Engine
The Flutter Engine
|
#include <GrClip.h>
Public Member Functions | |
virtual Effect | apply (GrAppliedHardClip *out, SkIRect *bounds) const =0 |
Public Member Functions inherited from GrClip | |
virtual | ~GrClip () |
virtual SkIRect | getConservativeBounds () const =0 |
virtual Effect | apply (GrRecordingContext *, skgpu::ganesh::SurfaceDrawContext *, GrDrawOp *, GrAAType, GrAppliedClip *, SkRect *bounds) const =0 |
virtual PreClipResult | preApply (const SkRect &drawBounds, GrAA aa) const |
Additional Inherited Members | |
Public Types inherited from GrClip | |
enum class | Effect { kClipped , kUnclipped , kClippedOut } |
enum class | BoundsType { kExterior , kInterior } |
Static Public Member Functions inherited from GrClip | |
static bool | IsInsideClip (const SkIRect &innerClipBounds, const SkRect &drawBounds, GrAA aa) |
static bool | IsOutsideClip (const SkIRect &outerClipBounds, const SkRect &drawBounds, GrAA aa) |
static SkIRect | GetPixelIBounds (const SkRect &bounds, GrAA aa, BoundsType mode=BoundsType::kExterior) |
static bool | IsPixelAligned (const SkRect &rect) |
Static Public Attributes inherited from GrClip | |
static constexpr SkScalar | kBoundsTolerance = 1e-3f |
static constexpr SkScalar | kHalfPixelRoundingTolerance = 5e-2f |
GrHardClip never uses coverage FPs. It can only enforce the clip using the already-existing stencil buffer contents and/or fixed-function state like scissor. Always aliased if MSAA is off.
|
pure virtual |
Sets the appropriate hardware state modifications on GrAppliedHardClip that will implement the clip. On input 'bounds' is a conservative bounds of the draw that is to be clipped. After return 'bounds' has been intersected with a conservative bounds of the clip.
Implemented in GrFixedClip, and skgpu::ganesh::StencilClip.