Changeset 133786 in webkit
- Timestamp:
- Nov 7, 2012, 11:26:57 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r133784 r133786 1 2012-11-07 Philip Rogers <pdr@google.com> 2 3 Skip SVG repaint tracking when parent container transforms 4 https://bugs.webkit.org/show_bug.cgi?id=101177 5 6 Reviewed by Eric Seidel. 7 8 The repaint area in svg/repaint/inner-svg-change-viewBox.svg has 9 been tightened as a result of this patch. 10 11 * platform/chromium/TestExpectations: 12 * platform/mac/TestExpectations: 13 1 14 2012-11-07 Balazs Kelemen <kbalazs@webkit.org> 2 15 -
trunk/LayoutTests/platform/chromium/TestExpectations
r133767 r133786 3991 3991 webkit.org/b/11645 fast/table/025.html [ Failure ] 3992 3992 3993 # Rebaseline required after https://bugs.webkit.org/show_bug.cgi?id=101177 3994 webkit.org/b/101177 svg/dynamic-updates/SVGUseElement-dom-requiredFeatures.html [ ImageOnlyFailure Pass ] 3995 webkit.org/b/101177 svg/repaint/inner-svg-change-viewBox.svg [ ImageOnlyFailure Pass ] 3996 3993 3997 # These are real failues due to 95121. 3994 3998 # This is spilling caused by LANCZOS3 scaling algorithm that samples outside the source rect. -
trunk/LayoutTests/platform/mac/TestExpectations
r133695 r133786 1100 1100 webkit.org/b/90951 fast/text/shaping 1101 1101 1102 # Rebaseline required after https://bugs.webkit.org/show_bug.cgi?id=101177 1103 webkit.org/b/101177 svg/dynamic-updates/SVGUseElement-dom-requiredFeatures.html [ ImageOnlyFailure Pass ] 1104 webkit.org/b/101177 svg/repaint/inner-svg-change-viewBox.svg [ ImageOnlyFailure Pass ] 1105 1102 1106 webkit.org/b/93247 [ Debug ] fast/lists/list-marker-remove-crash.html [ Crash ] 1103 1107 -
trunk/Source/WebCore/ChangeLog
r133785 r133786 1 2012-11-07 Philip Rogers <pdr@google.com> 2 3 Skip SVG repaint tracking when parent container transforms 4 https://bugs.webkit.org/show_bug.cgi?id=101177 5 6 Reviewed by Eric Seidel. 7 8 This patch skips child repaint rect checks when a parent container is transformed, leading 9 to a 75% increase on the RoboHornet SVG benchmark: 10 http://www.robohornet.org/#et=svg (average of 2 runs) 11 Before patch: 161.6ms 12 After patch: 38.5ms 13 14 SVG transforms are relative to the local container which makes calculating an absolute 15 repaint rect expensive because it requires multiplying the local repaint rect by each 16 parent container's local transform. See SVGRenderSupport::computeFloatRectForRepaint 17 as an example of this calculation. 18 19 This patch takes advantage of SVG's container rules: when a parent container's transform 20 changes, all children must be repainted (there is no absolute positioning in SVG). 21 SVGRenderSupport::checkForSVGRepaintDuringLayout has been added which checks for whether 22 the parent transform changed before doing child repaint checks. A similar optimization is 23 used in HTML (see RenderObject::checkForRepaintDuringLayout) where no repaint checking 24 is done when the view is fully repainted. 25 26 This code is tested in existing tests. 27 28 * rendering/svg/RenderSVGContainer.cpp: 29 (WebCore::RenderSVGContainer::layout): 30 * rendering/svg/RenderSVGForeignObject.cpp: 31 (WebCore::RenderSVGForeignObject::layout): 32 * rendering/svg/RenderSVGImage.cpp: 33 (WebCore::RenderSVGImage::layout): 34 * rendering/svg/RenderSVGShape.cpp: 35 (WebCore::RenderSVGShape::layout): 36 * rendering/svg/RenderSVGText.cpp: 37 (WebCore::RenderSVGText::layout): 38 * rendering/svg/SVGRenderSupport.cpp: 39 (WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout): 40 (WebCore): 41 * rendering/svg/SVGRenderSupport.h: 42 (SVGRenderSupport): 43 1 44 2012-11-07 Chris Fleizach <cfleizach@apple.com> 2 45 -
trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp
r131938 r133786 58 58 ASSERT(!view()->layoutStateEnabled()); 59 59 60 LayoutRepainter repainter(*this, checkForRepaintDuringLayout() || selfWillPaint());60 LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this) || selfWillPaint()); 61 61 62 62 // Allow RenderSVGViewportContainer to update its viewport. -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r131938 r133786 128 128 ASSERT(!view()->layoutStateEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree. 129 129 130 LayoutRepainter repainter(*this, checkForRepaintDuringLayout());130 LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this)); 131 131 SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node()); 132 132 -
trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp
r132069 r133786 83 83 ASSERT(needsLayout()); 84 84 85 LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && selfNeedsLayout());85 LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this) && selfNeedsLayout()); 86 86 updateImageViewport(); 87 87 -
trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp
r131938 r133786 146 146 { 147 147 StackStats::LayoutCheckPoint layoutCheckPoint; 148 LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && selfNeedsLayout());148 LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this) && selfNeedsLayout()); 149 149 SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(node()); 150 150 -
trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp
r131938 r133786 350 350 StackStats::LayoutCheckPoint layoutCheckPoint; 351 351 ASSERT(needsLayout()); 352 LayoutRepainter repainter(*this, checkForRepaintDuringLayout());352 LayoutRepainter repainter(*this, SVGRenderSupport::checkForSVGRepaintDuringLayout(this)); 353 353 354 354 bool updateCachedBoundariesInParents = false; -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp
r131111 r133786 107 107 } 108 108 109 bool SVGRenderSupport::checkForSVGRepaintDuringLayout(RenderObject* object) 110 { 111 if (!object->checkForRepaintDuringLayout()) 112 return false; 113 // When a parent container is transformed in SVG, all children will be painted automatically 114 // so we are able to skip redundant repaint checks. 115 RenderObject* parent = object->parent(); 116 return !(parent && parent->isSVGContainer() && toRenderSVGContainer(parent)->didTransformToRootUpdate()); 117 } 118 109 119 // Update a bounding box taking into account the validity of the other bounding box. 110 120 static inline void updateObjectBoundingBox(FloatRect& objectBoundingBox, bool& objectBoundingBoxValid, RenderObject* other, FloatRect otherBoundingBox) -
trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h
r133779 r133786 68 68 static void mapLocalToContainer(const RenderObject*, RenderLayerModelObject* repaintContainer, TransformState&, bool snapOffsetForTransforms = true, bool* wasFixed = 0); 69 69 static const RenderObject* pushMappingToContainer(const RenderObject*, const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&); 70 static bool checkForSVGRepaintDuringLayout(RenderObject*); 70 71 71 72 // Shared between SVG renderers and resources.
Note:
See TracChangeset
for help on using the changeset viewer.