WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
4459
More kcanvas improvements
https://bugs.webkit.org/show_bug.cgi?id=4459
Summary
More kcanvas improvements
Tobias Lidskog
Reported
2005-08-16 15:28:28 PDT
A few minor improvements to kcanvas that can improve performance quite a bit on complex svg and also fixes a bug or two in the hit testing code.
Attachments
kcanvas patch
(6.05 KB, patch)
2005-08-16 15:29 PDT
,
Tobias Lidskog
no flags
Details
Formatted Diff
Diff
fixed bug
(5.72 KB, patch)
2005-08-16 17:41 PDT
,
Tobias Lidskog
eric
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tobias Lidskog
Comment 1
2005-08-16 15:29:11 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.
Tobias Lidskog
Comment 2
2005-08-16 15:32:28 PDT
forgot to mention one change in KCanvasItemQuartz::hitsPath - fill hit testing takes transformation into account, stroke hit testing should too
Tobias Lidskog
Comment 3
2005-08-16 17:41:32 PDT
Created
attachment 3430
[details]
fixed bug remove one bad change (in KCanvasItemQuartz::draw) mentioned by Eric on irc
Eric Seidel (no email)
Comment 4
2005-08-17 01:05:35 PDT
Comment on
attachment 3430
[details]
fixed bug Looks great.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug