DescriptionThis patch implements two point radial gradients with a a center point, a focal point, and two radii. These are required for SVG and HTML5 canvas support. The algorithm was implemented in fixed-point, like the regular radial gradient. All tiling modes (clamp, mirror, repeat) have been implemented.
The 32-bit path is fully exercised by WebKit/Chrome layout tests, but the 16-bit path is not. There are also no unit tests in this patch yet, since I wasn't sure how to go about that.
There is probably still some room for optimization. In particular, the SkFixedSqrt could be inlined and/or unrolled. I don't think it's possible to use the sqrt cache, since the discriminant exceeds the range provided (it gave me artifacts when I tried it).
Patch Set 1 #
Total comments: 3
Patch Set 2 : responded to comments, more optimization #
Total comments: 14
Patch Set 3 : responded to comments #Patch Set 4 : Removed shadeSpan16 #
MessagesTotal messages: 9
|