Flutter Engine
The Flutter Engine
|
Classes | |
class | TessellationHelper |
Functions | |
void | ResolveAAType (GrAAType requestedAAType, GrQuadAAFlags requestedEdgeFlags, const GrQuad &quad, GrAAType *outAAType, GrQuadAAFlags *outEdgeFlags) |
int | ClipToW0 (DrawQuad *quad, DrawQuad *extraVertices) |
bool | CropToRect (const SkRect &cropRect, GrAA cropAA, DrawQuad *quad, bool computeLocal) |
bool | WillUseHairline (const GrQuad &quad, GrAAType aaType, GrQuadAAFlags edgeFlags) |
void | Outset (const skvx::float4 &edgeDistances, GrQuad *quad) |
Clip the device vertices of 'quad' to be in front of the W = 0 plane (w/in epsilon). The local coordinates will be updated to match the new clipped vertices. This returns the number of clipped quads that need to be drawn: 0 if 'quad' was entirely behind the plane, 1 if 'quad' did not need to be clipped or if 2 or 3 vertices were clipped, or 2 if 'quad' had one vertex clipped (producing a pentagonal shape spanned by 'quad' and 'extraVertices').
Definition at line 399 of file GrQuadUtils.cpp.
bool GrQuadUtils::CropToRect | ( | const SkRect & | cropRect, |
GrAA | cropAA, | ||
DrawQuad * | quad, | ||
bool | computeLocal = true |
||
) |
Crops quad to the provided device-space axis-aligned rectangle. If the intersection of this quad (projected) and cropRect results in a quadrilateral, this returns true. If not, this quad may be updated to be a smaller quad of the same type such that its intersection with cropRect is visually the same. This function assumes that the 'quad' coordinates are finite.
The provided edge flags are updated to reflect edges clipped by cropRect (toggling on or off based on cropAA policy). If provided, the local coordinates will be updated to reflect the updated device coordinates of this quad.
If 'computeLocal' is false, the local coordinates in 'quad' will not be modified.
Definition at line 548 of file GrQuadUtils.cpp.
|
inline |
Definition at line 222 of file GrQuadUtils.h.
void GrQuadUtils::ResolveAAType | ( | GrAAType | requestedAAType, |
GrQuadAAFlags | requestedEdgeFlags, | ||
const GrQuad & | quad, | ||
GrAAType * | outAAType, | ||
GrQuadAAFlags * | outEdgeFlags | ||
) |
Definition at line 366 of file GrQuadUtils.cpp.
bool GrQuadUtils::WillUseHairline | ( | const GrQuad & | quad, |
GrAAType | aaType, | ||
GrQuadAAFlags | edgeFlags | ||
) |
Definition at line 640 of file GrQuadUtils.cpp.