Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(13)

Issue 1210273002: Use CSS value instead of serialized string in CanvasRenderingContext2D::setFont (Closed)

Created:
4 years, 10 months ago by Justin Novosad
Modified:
4 years, 10 months ago
Reviewers:
Stephen White
CC:
blink-reviews, dshwang, blink-reviews-html_chromium.org, dglazkov+blink, Rik
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Use CSS value instead of serialized string in CanvasRenderingContext2D::setFont This change improves the performance of setting a font to a value that is not in the font string cache by optimizing the code that determines whether the new value is 'inherit' or 'initial'. The current code is serializing the font meta-property, and then doing a string comparison. It is a lot cheaper to bypass the serialization and just check the class of the font-size property. BUG=497864 TEST=canvas/philip/tests/2d.text.font.parse.invalid.html + telemetry tough_canvas_cases/canvas-font-cycler.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197878

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 2 chunks +2 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 7 (2 generated)
Justin Novosad
PTAL
4 years, 10 months ago (2015-06-25 20:52:16 UTC) #2
Stephen White
LGTM (I'm trusting you that checking font-size is semantically equivalent to checking the whole font ...
4 years, 10 months ago (2015-06-25 21:54:39 UTC) #3
Justin Novosad
On 2015/06/25 21:54:39, Stephen White wrote: > LGTM > > (I'm trusting you that checking ...
4 years, 10 months ago (2015-06-26 02:45:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1210273002/1
4 years, 10 months ago (2015-06-26 02:46:25 UTC) #6
commit-bot: I haz the power
4 years, 10 months ago (2015-06-26 02:50:11 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197878

Powered by Google App Engine
This is Rietveld 408576698