.: Added manual test for canvas setFont speed.
authorsenorblanco@chromium.org <senorblanco@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2012 19:32:23 +0000 (19:32 +0000)
committersenorblanco@chromium.org <senorblanco@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2012 19:32:23 +0000 (19:32 +0000)
commit79de686bf6784c1d64b181c07045c1608b5e2c5f
tree424b04aedf097f03ff72978e563bc4d08c90d176
parent155e0f24054bf66c574081ec060676b57d94f0aa
.: Added manual test for canvas setFont speed.
https://bugs.webkit.org/show_bug.cgi?id=104923

Reviewed by James Robinson.

* ManualTests/canvas-font-speed.html: Added.

Source/WebCore: CanvasRenderingContext2D::setFont() is slow.
https://bugs.webkit.org/show_bug.cgi?id=104923

Reviewed by James Robinson.

This spends most of its time in the CSS parser.  As a first step,
early-out if the new value is the same as unparsed string for the current font.
See also http://code.google.com/p/chromium/issues/detail?id=164016.

Covered by existing tests in canvas/ and fast/canvas, and ManualTests/canvas-font-speed.html.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/canvas-font-speed.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp