Ensure Y->X ordering when building a region from a path

Our region-builder-blitter insists on being called in a Y->X sorted order,
which means (for example) if it is given a rect, then next blit call must
be below that rect.

However, we have helpers that blit rects "through" a region, and they iterate
through the region using Cliperator, which returns the minimum (mostly) number
of rects inside the region -- but these are not in strict Y->X order. Hence
the problem.

This CL avoids this by fixing it at the source. When we are asked to build a region
by drawing a path clipped to another region, we check if that clip is complex.
If it is, we first regionize the path against the clip's bounds (easy), and then
call a region-op to intersect that with the complex clip.

Bug: skia:7491
Change-Id: Ibf0a99e5bb38e369c4b263b0b07bfc04a572de63
Reviewed-on: https://skia-review.googlesource.com/113424
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
1 file changed