WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
44402
Path should be RefCounted
https://bugs.webkit.org/show_bug.cgi?id=44402
Summary
Path should be RefCounted
Eric Seidel (no email)
Reported
2010-08-22 18:39:01 PDT
Path should be RefCounted I've been investigating why
http://themaninblue.com/experiment/AnimationBenchmark/svg/
is so slow in WebKit. We spend at least 8% of our time generating or copying paths (see
bug 44374
and
bug 44375
). Because we generate a new path (and copy it!) every time one of those circles changes, WebCore makes it impossible for the platform layer to cache any information off of the platform path object (for example a triangle mesh on the gpu). I believe the best solution around this is to make Path RefCounted, and start making our current code careful to not copy (and possibly share) paths when possible. Having a RefCounted Path object would also allow us to use unit-shapes for all of the basic SVG shapes and share path objects between shapes, hopefully resulting in faster platform drawing. I'm very interested in commentary from those of you who know more about graphics than I do. :) But it seems to me that sharing paths could make platform drawing faster. (I would suspect for example that CG would be faster at drawing the same circle 100 times, than 100 different CGPath objects all representing the same circle shape.
Attachments
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2010-08-23 05:50:10 PDT
(In reply to
comment #0
)
> Path should be RefCounted
Hi Eric, I've discussed this with Dirk some weeks ago and I think this is the way to go. This would also avoid having to pass Path references to toPathData() in the SVG code. I'd like to hear Olivers opinion as well. Cheers, Niko
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