[cairo] perf: long dashed lines
Vladimir Vukicevic
vladimir at pobox.com
Mon Feb 4 18:00:06 PST 2008
Ok, here's the two patches with updated changes:
Patch 1:
-- fixed the 0.0 check to happen before the sqrt(), and check for
explicit 0.0
-- changed behaviour in stroker_curve_to to behave the same as
previous code; start/end faces are not initialized correctly in the
case of 0-length segment. This is wrong I think, but it's what was
there before, so we can fix that in a followup (I'd fix it but I'm not
sure what the correct fix is).
Patch 2:
-- moved point/line tests to cairo-rectangle.c and renamed to
_cairo_box_*
-- fixed line-rectangle intersection to actually work correctly
-- fixed bounds expansion based on comments; can you guys double-check
this in stroker_init? I err on the side of caution and expand by the
full transformed width/height, or by width * miter_limit. MAX(width,
width * miter_limit) might be better, even?
The slight changes in dash-scale output are still there, caused by the
first patch. I'm pretty sure this is because the slope values given
to _compute_face before were converted to fixed-point first and then
converted back to doubles, whereas with these changes they stay as
doubles throughout.
How's this look?
- Vlad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-stroke-1.patch
Type: application/octet-stream
Size: 11086 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080204/2bf9e0fc/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-stroke-2.patch
Type: application/octet-stream
Size: 10639 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080204/2bf9e0fc/attachment-0003.obj
More information about the cairo
mailing list