DescriptionReduce how often LayoutSVGShape::updateShapeFromElement is called
LayoutSVGShape::updateShapeFromElement is used by path elements to
create a Path from the 'd' attribute which is relatively expensive.
For non-path subclasses of LayoutSVGShape, updateShapeFromElement
is used to update non-path alternatives (e.g., bounds of an ellipse).
This patch factors out the shape update code (updateShapeFromElement)
from updating the bounding boxes which is now handled in
updateStrokeAndFillBoundingBoxes.
With shape updating and bounding box updating separated, it is possible
to skip the expensive path calculation in updateShapeFromElement when
only the bounding boxes need updating [1].
A small change was needed in LayoutSVG{Rect,Ellipse}::styleDidChange
where a shape update is forced for shape-dependent properties.
[1] http://pr.gg/spinners.html, http://crbug.com/491422
BUG=491422
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197267
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address reviewer comments #Patch Set 3 : Fix marker regression #
Total comments: 13
Patch Set 4 : Address reviewer comments #Patch Set 5 : Cleanup for reviewability #Patch Set 6 : Put selfHasRelativeLengths back #
Messages
Total messages: 20 (7 generated)
|