RESOLVED FIXED 104923
Canvas2DRenderingContext::setFont() does not need to be slow when repeatedly setting the same font
https://bugs.webkit.org/show_bug.cgi?id=104923
Summary Canvas2DRenderingContext::setFont() does not need to be slow when repeatedly ...
Stephen White
Reported 2012-12-13 09:17:30 PST
Canvas2DRenderingContext::setFont() is slow
Attachments
Patch (1.80 KB, patch)
2012-12-13 09:19 PST, Stephen White
no flags
Patch for landing (3.15 KB, patch)
2012-12-13 11:16 PST, Stephen White
no flags
Stephen White
Comment 1 2012-12-13 09:19:21 PST
James Robinson
Comment 2 2012-12-13 09:29:02 PST
Comment on attachment 179284 [details] Patch Seems sound, but do we have any way to validate + track changes like this? Maybe something under PerformanceTests/ ?
Eric Seidel (no email)
Comment 3 2012-12-13 10:05:06 PST
Comment on attachment 179284 [details] Patch Lgtm too
Stephen White
Comment 4 2012-12-13 11:15:28 PST
(In reply to comment #2) > (From update of attachment 179284 [details]) > Seems sound, but do we have any way to validate + track changes like this? Maybe something under PerformanceTests/ ? For now, I've added a ManualTest.
Stephen White
Comment 5 2012-12-13 11:16:12 PST
Created attachment 179304 [details] Patch for landing
WebKit Review Bot
Comment 6 2012-12-13 11:33:24 PST
Comment on attachment 179304 [details] Patch for landing Clearing flags on attachment: 179304 Committed r137630: <http://trac.webkit.org/changeset/137630>
WebKit Review Bot
Comment 7 2012-12-13 11:33:28 PST
All reviewed patches have been landed. Closing bug.
Stephen White
Comment 8 2012-12-13 12:41:28 PST
Good point about the bug rename. CanvasRenderingContext2D::setFont() is still slow when actually setting fonts. As a (somewhat more involved) followup, it would be nice to cache the mapping between unparsed strings and fonts, if possible. The CSS parser is really slow.
Note You need to log in before you can comment on or make changes to this bug.