Changeset 53057 in webkit
- Timestamp:
- Jan 10, 2010 6:59:02 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53056 r53057 1 2010-01-10 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Nikolas Zimmerman. 4 5 Bad DOM performance in large SVG files 6 https://bugs.webkit.org/show_bug.cgi?id=30055 7 8 Cull RenderPaths before passing on to the underlying graphics system. 9 10 * rendering/RenderPath.cpp: 11 (WebCore::RenderPath::paint): 12 (WebCore::RenderPath::nodeAtFloatPoint): 13 1 14 2010-01-10 Adam Barth <abarth@webkit.org> 2 15 -
trunk/WebCore/rendering/RenderPath.cpp
r52930 r53057 215 215 if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || m_path.isEmpty()) 216 216 return; 217 218 paintInfo.context->save(); 219 paintInfo.context->concatCTM(localToParentTransform()); 217 PaintInfo childPaintInfo(paintInfo); 218 childPaintInfo.context->save(); 219 applyTransformToPaintInfo(childPaintInfo, m_localTransform); 220 FloatRect boundingBox = repaintRectInLocalCoordinates(); 221 if (!boundingBox.intersects(childPaintInfo.rect)) { 222 childPaintInfo.context->restore(); 223 return; 224 } 220 225 221 226 SVGResourceFilter* filter = 0; 222 227 223 FloatRect boundingBox = repaintRectInLocalCoordinates(); 224 if (paintInfo.phase == PaintPhaseForeground) { 225 PaintInfo savedInfo(paintInfo); 226 227 if (prepareToRenderSVGContent(this, paintInfo, boundingBox, filter)) { 228 if (childPaintInfo.phase == PaintPhaseForeground) { 229 PaintInfo savedInfo(childPaintInfo); 230 231 if (prepareToRenderSVGContent(this, childPaintInfo, boundingBox, filter)) { 228 232 if (style()->svgStyle()->shapeRendering() == SR_CRISPEDGES) 229 paintInfo.context->setShouldAntialias(false);230 fillAndStrokePath(m_path, paintInfo.context, style(), this);233 childPaintInfo.context->setShouldAntialias(false); 234 fillAndStrokePath(m_path, childPaintInfo.context, style(), this); 231 235 232 236 if (static_cast<SVGStyledElement*>(node())->supportsMarkers()) 233 m_markerLayoutInfo.drawMarkers( paintInfo);237 m_markerLayoutInfo.drawMarkers(childPaintInfo); 234 238 } 235 finishRenderSVGContent(this, paintInfo, filter, savedInfo.context);236 } 237 238 if (( paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth())239 paintOutline( paintInfo.context, static_cast<int>(boundingBox.x()), static_cast<int>(boundingBox.y()),239 finishRenderSVGContent(this, childPaintInfo, filter, savedInfo.context); 240 } 241 242 if ((childPaintInfo.phase == PaintPhaseOutline || childPaintInfo.phase == PaintPhaseSelfOutline) && style()->outlineWidth()) 243 paintOutline(childPaintInfo.context, static_cast<int>(boundingBox.x()), static_cast<int>(boundingBox.y()), 240 244 static_cast<int>(boundingBox.width()), static_cast<int>(boundingBox.height()), style()); 241 245 242 paintInfo.context->restore();246 childPaintInfo.context->restore(); 243 247 } 244 248 … … 258 262 return false; 259 263 260 FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);264 FloatPoint localPoint = m_localTransform.inverse().mapPoint(pointInParent); 261 265 262 266 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_PATH_HITTESTING, style()->pointerEvents());
Note: See TracChangeset
for help on using the changeset viewer.