Flutter Engine
The Flutter Engine
|
#include <GrFixedClip.h>
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 |
Implements GrHardClip with scissor and window rectangles.
Definition at line 18 of file GrFixedClip.h.
|
inlineexplicit |
Definition at line 20 of file GrFixedClip.h.
Definition at line 21 of file GrFixedClip.h.
|
finalvirtual |
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.
Implements GrHardClip.
Definition at line 34 of file GrFixedClip.cpp.
|
inline |
Definition at line 31 of file GrFixedClip.h.
|
inline |
Definition at line 43 of file GrFixedClip.h.
|
finalvirtual |
Compute a conservative pixel bounds restricted to the given render target dimensions. The returned bounds represent the limits of pixels that can be drawn; anything outside of the bounds will be entirely clipped out.
Implements GrClip.
Definition at line 12 of file GrFixedClip.cpp.
|
inline |
Definition at line 41 of file GrFixedClip.h.
|
inline |
Definition at line 36 of file GrFixedClip.h.
|
finalvirtual |
Perform preliminary, conservative analysis on the draw bounds as if it were provided to apply(). The results of this are returned the PreClipResults struct, where 'result.fEffect' corresponds to what 'apply' would return. If this value is kUnclipped or kNoDraw, then it can be assumed that apply() would also always result in the same Effect.
If kClipped is returned, apply() may further refine the effect to kUnclipped or kNoDraw, with one exception. When 'result.fIsRRect' is true, preApply() reports the single round rect and anti-aliased state that would act as an intersection on the draw geometry. If no further action is taken to modify the draw, apply() will represent this round rect in the applied clip.
When set, 'result.fRRect' will intersect with the render target bounds but may extend beyond it. If the render target bounds are the only clip effect on the draw, this is reported as kUnclipped and not as a degenerate rrect that matches the bounds.
Reimplemented from GrClip.
Definition at line 16 of file GrFixedClip.cpp.
|
inline |
Definition at line 27 of file GrFixedClip.h.
|
inline |
Definition at line 29 of file GrFixedClip.h.
|
inline |
Definition at line 26 of file GrFixedClip.h.
|
inline |
Definition at line 33 of file GrFixedClip.h.
|
inline |
Definition at line 45 of file GrFixedClip.h.
|
inline |
Definition at line 40 of file GrFixedClip.h.