DescriptionUse 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 #
Depends on Patchset: Messages
Total messages: 7 (2 generated)
|
|||||||||||||||||||