|
InternalAAClip
How an antialiased clip is set up and used.
This documentation describes the state of an internal component as of r2680. IntroductionAntialiased clips are stored as run-length-encoded arrays of alpha values. DetailsAssuming the stereotypical simplest case: convex path, no inverse path fill, no overflow issues: When you call SkAAClip::setPath() to add a path to the clip, it creates SkAAClip::Builder and an SkAAClip::BuilderBlitter objects on the stack and passes them to SkScan::AntiFillPath(). (If we're in SkAAClip but doAA is false we'll call SkScan::FillPath() instead - when does that happen?) SkScan::AntiFillPath() creates a SuperBlitter (supersampling, not masked) on the stack, then calls sk_fill_path; that function uses an SkEdgeBuilder to build a list of clipped lines, quads, and cubics in the path, sorts them in order of increasing Y, then passes that list to walk_convex_edges(). TODO: grok walk_convex_edges walk_convex_edges() blits a series of rectangles using SuperBlitter::blitRect(). That currently makes several calls to SkAAClip::BuilderBlitter::blitAntiH(); we're in the process of replacing that loop with a single call to the new entry point blitAntiRect(). |