Bug 104923 - Canvas2DRenderingContext::setFont() does not need to be slow when repeatedly setting the same font
Summary: Canvas2DRenderingContext::setFont() does not need to be slow when repeatedly ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Stephen White
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-13 09:17 PST by Stephen White
Modified: 2012-12-13 12:41 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.80 KB, patch)
2012-12-13 09:19 PST, Stephen White
no flags Details | Formatted Diff | Diff
Patch for landing (3.15 KB, patch)
2012-12-13 11:16 PST, Stephen White
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen White 2012-12-13 09:17:30 PST
Canvas2DRenderingContext::setFont() is slow
Comment 1 Stephen White 2012-12-13 09:19:21 PST
Created attachment 179284 [details]
Patch
Comment 2 James Robinson 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/ ?
Comment 3 Eric Seidel (no email) 2012-12-13 10:05:06 PST
Comment on attachment 179284 [details]
Patch

Lgtm too
Comment 4 Stephen White 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.
Comment 5 Stephen White 2012-12-13 11:16:12 PST
Created attachment 179304 [details]
Patch for landing
Comment 6 WebKit Review Bot 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>
Comment 7 WebKit Review Bot 2012-12-13 11:33:28 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Stephen White 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.