Disable paint invalidatin optimization about SVG transform change

The optimization prunes SVG subtree paint invalidation walking if
the container's transform changed. However, the transform changed
flag is only updated during layout causing:
- If multiple layouts before an invalidation, later layouts may
  clear the flag set by previous layout;
- For paint-only invalidation (after we use unified invalidation)
  the flag may remain uncleared if there is no layout causing
  incorrect pruning of tree walking.

SvgCubics doesn't show visible performance change with this patch.

BUG=394619

Review URL: https://codereview.chromium.org/412083003

git-svn-id: svn://svn.chromium.org/blink/trunk@179076 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 91c241e5
...@@ -883,7 +883,8 @@ crbug.com/392640 [ Linux Release ] svg/as-object/sizing/svg-in-object-placeholde ...@@ -883,7 +883,8 @@ crbug.com/392640 [ Linux Release ] svg/as-object/sizing/svg-in-object-placeholde
crbug.com/392640 [ Linux Debug ] svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html [ Pass Failure Timeout ] crbug.com/392640 [ Linux Debug ] svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html [ Pass Failure Timeout ]
crbug.com/392640 svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html [ Pass Timeout ] crbug.com/392640 svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html [ Pass Timeout ]
crbug.com/393087 [ Win ] svg/custom/resource-client-removal.svg [ Pass Failure ] # Temporary disabled for rebaeline of crbug.com/394619
# crbug.com/393087 [ Win ] svg/custom/resource-client-removal.svg [ Pass Failure ]
crbug.com/368531 virtual/gpu/fast/canvas/canvas-path-addpath.html [ Failure Pass ] crbug.com/368531 virtual/gpu/fast/canvas/canvas-path-addpath.html [ Failure Pass ]
...@@ -1140,6 +1141,24 @@ crbug.com/361729 [ MountainLion ] printing/return-from-printing-mode.html [ Imag ...@@ -1140,6 +1141,24 @@ crbug.com/361729 [ MountainLion ] printing/return-from-printing-mode.html [ Imag
crbug.com/373430 [ Win7 ] fast/dom/Geolocation/error-clear-watch.html [ Pass Timeout ] crbug.com/373430 [ Win7 ] fast/dom/Geolocation/error-clear-watch.html [ Pass Timeout ]
crbug.com/394619 svg/carto.net/window.svg [ NeedsRebaseline ]
crbug.com/394619 svg/custom/use-setAttribute-crash.svg [ NeedsRebaseline ]
crbug.com/394619 svg/repaint/image-with-clip-path.svg [ NeedsRebaseline ]
crbug.com/394619 svg/custom/use-detach.svg [ NeedsRebaseline ]
crbug.com/394619 svg/repaint/inner-svg-change-viewBox-contract.svg [ NeedsRebaseline ]
crbug.com/394619 svg/repaint/container-repaint.svg [ NeedsRebaseline ]
crbug.com/394619 svg/carto.net/tabgroup.svg [ NeedsRebaseline ]
crbug.com/394619 svg/custom/relative-sized-shadow-tree-content.xhtml [ NeedsRebaseline ]
crbug.com/394619 svg/repaint/inner-svg-change-viewBox.svg [ NeedsRebaseline ]
crbug.com/394619 svg/custom/relative-sized-deep-shadow-tree-content.xhtml [ NeedsRebaseline ]
crbug.com/394619 svg/text/text-rescale.html [ NeedsRebaseline ]
crbug.com/394619 svg/repaint/inner-svg-change-viewPort-relative.svg [ NeedsRebaseline ]
crbug.com/394619 svg/filters/feImage-target-attribute-change-with-use-indirection-2.svg [ NeedsRebaseline ]
crbug.com/394619 svg/custom/relative-sized-inner-svg.xhtml [ NeedsRebaseline ]
crbug.com/394619 svg/custom/relative-sized-shadow-tree-content-with-symbol.xhtml [ NeedsRebaseline ]
crbug.com/394619 svg/custom/js-update-container.svg [ NeedsRebaseline ]
crbug.com/394619 svg/custom/resource-client-removal.svg [ NeedsRebaseline ]
crbug.com/374936 [ Win Debug ] svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr.html [ ImageOnlyFailure ] crbug.com/374936 [ Win Debug ] svg/dynamic-updates/SVGImageElement-dom-preserveAspectRatio-attr.html [ ImageOnlyFailure ]
crbug.com/374936 [ Win Debug ] svg/dynamic-updates/SVGImageElement-dom-height-attr.html [ ImageOnlyFailure ] crbug.com/374936 [ Win Debug ] svg/dynamic-updates/SVGImageElement-dom-height-attr.html [ ImageOnlyFailure ]
crbug.com/374936 [ Win Debug ] svg/dynamic-updates/SVGImageElement-dom-width-attr.html [ ImageOnlyFailure ] crbug.com/374936 [ Win Debug ] svg/dynamic-updates/SVGImageElement-dom-width-attr.html [ ImageOnlyFailure ]
......
...@@ -262,15 +262,8 @@ public: ...@@ -262,15 +262,8 @@ public:
void assertSubtreeClearedPaintInvalidationState() const void assertSubtreeClearedPaintInvalidationState() const
{ {
for (const RenderObject* renderer = this; renderer; renderer = renderer->nextInPreOrder()) { for (const RenderObject* renderer = this; renderer; renderer = renderer->nextInPreOrder())
renderer->assertRendererClearedPaintInvalidationState(); renderer->assertRendererClearedPaintInvalidationState();
// Currently we skip some SVG containers for performance (see RenderSVGModelObject::invalidateTreeAfterLayout)
// so we just skip the underlying subtree. This is not strictly the condition in the previous function but
// it makes little sense to cover SVG subtrees if we know they are skipped anyway.
if (renderer->isSVGContainer())
return;
}
} }
#endif #endif
......
...@@ -149,14 +149,6 @@ void RenderSVGModelObject::invalidatePaintIfNeeded(const PaintInvalidationState& ...@@ -149,14 +149,6 @@ void RenderSVGModelObject::invalidatePaintIfNeeded(const PaintInvalidationState&
setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&paintInvalidationState.paintInvalidationContainer(), &paintInvalidationState)); setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&paintInvalidationState.paintInvalidationContainer(), &paintInvalidationState));
setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &paintInvalidationState.paintInvalidationContainer(), &paintInvalidationState)); setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromPaintInvalidationContainer(this, &paintInvalidationState.paintInvalidationContainer(), &paintInvalidationState));
// If an ancestor container had its transform changed, then we just
// need to update the RenderSVGModelObject's repaint rect above. The invalidation
// will be handled by the container where the transform changed. This essentially
// means that we prune the entire branch for performance.
RenderObject* parent = this->parent();
if (parent && parent->isSVGContainer() && toRenderSVGContainer(parent)->didTransformToRootUpdate())
return;
// If we are set to do a full paint invalidation that means the RenderView will be // If we are set to do a full paint invalidation that means the RenderView will be
// issue paint invalidations. We can then skip issuing of paint invalidations for the child // issue paint invalidations. We can then skip issuing of paint invalidations for the child
// renderers as they'll be covered by the RenderView. // renderers as they'll be covered by the RenderView.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment