2 Commits

Author SHA1 Message Date
Tom Hudson
e30b53cec5 Enter RectangleMode when the clip region is a rectangle
ClipArea's region mode implementation store the region's boundary in
a rectangle, and if the region is that rectangle, set its region to
empty.  This is a bug, since as long as the ClipArea is in region
mode it treats its region as determinitive. When the next clipping
operation comes in, it is tested against the empty region instead of
against the valid rect.

Discovered via Skia GM testing.

Change-Id: I3bbc4e81c8d68636061f830156e017e9b5c7e587
2015-03-30 16:57:43 -04:00
Rob Tsuk
487a92caef Clipping performance improvements
Create a ClipArea class to handle tracking clip regions. This class can
select the most efficient implementation depending on the types of
clipping presented.

ClipArea re-used the rectangle and region-based clipping
implementations as well as adding a "list of rotated rectangles"
approach that is more efficient for rotated views with children.

Change-Id: I2133761a2462ebc0852b394220e265974b3086f0
2015-01-14 17:24:58 -08:00