Summary: | More kcanvas improvements | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tobias Lidskog <tobiaslidskog> | ||||||
Component: | SVG | Assignee: | Tobias Lidskog <tobiaslidskog> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 420+ | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
Attachments: |
|
Description
Tobias Lidskog
2005-08-16 15:28:28 PDT
Created attachment 3429 [details]
kcanvas patch
Some comments about the changes (performance improvements measured with Shark
and window resize tests with complex svg files. All render tree test pass, with
the exception of metadata-example-01-b that has to be patched):
KCanvasContainer::bbox(bool includeStroke)
The if inside the loop is only used for the first item, no need to check the if
during each iteration. QRect::unite already disregards empty rects, so there
shouldn't be any functional change.
KCanvasContainer::collisions(const QPoint &p, KCanvasItemList &hits)
Don't return after checking last container (fix from kde TOT). Also check
against the correct bounding boxes for fill and stroke, and make the cheaper
rect compares before the fillContains and strokeContains.
KCanvasItemQuartz::draw(const QRect &rect)
Use bbox(true) instead of bboxPath(true, false) since bbox(true) calls
bboxPath(true, false), but also uses caching.
Check if the are any clip paths before calling applyClipPathsForStyle to avoid
calculating bboxPath(true) as part of the arguments. Most of the time there is
no clipping, and bboxPath(true) is an expensive call.
metadata-example-01-b-expected.txt
The changes in KCanvasContainer::bbox result in a container with nothing but
empty children will be positioned at the first child, not the last. Note that
these polygons should probably not be size 0x0, but that's another bug.
forgot to mention one change in KCanvasItemQuartz::hitsPath - fill hit testing takes transformation into account, stroke hit testing should too Created attachment 3430 [details]
fixed bug
remove one bad change (in KCanvasItemQuartz::draw) mentioned by Eric on irc
Comment on attachment 3430 [details]
fixed bug
Looks great.
|