Commit 7c3de531 authored by krit@webkit.org's avatar krit@webkit.org

2010-05-05 Dirk Schulze <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        SVG hit testing is *way* too slow
        https://bugs.webkit.org/show_bug.cgi?id=19312

        Use the cached stroke and fill boundaries in RenderPath as a heuristik to
        speed up SVG's hit testing.

        No new tests added.

        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::fillContains):
        (WebCore::RenderPath::strokeContains):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e9a72aee
2010-05-05 Dirk Schulze <krit@webkit.org>
Reviewed by Nikolas Zimmermann.
SVG hit testing is *way* too slow
https://bugs.webkit.org/show_bug.cgi?id=19312
Use the cached stroke and fill boundaries in RenderPath as a heuristik to
speed up SVG's hit testing.
No new tests added.
* rendering/RenderPath.cpp:
(WebCore::RenderPath::fillContains):
(WebCore::RenderPath::strokeContains):
2010-05-04 Dumitru Daniliuc <dumi@chromium.org>
Reviewed by Adam Barth.
......@@ -73,7 +73,7 @@ RenderPath::RenderPath(SVGStyledTransformableElement* node)
bool RenderPath::fillContains(const FloatPoint& point, bool requiresFill) const
{
if (m_path.isEmpty())
if (!m_fillBoundingBox.contains(point))
return false;
if (requiresFill && !RenderSVGResource::fillPaintingResource(this, style()))
......@@ -84,7 +84,7 @@ bool RenderPath::fillContains(const FloatPoint& point, bool requiresFill) const
bool RenderPath::strokeContains(const FloatPoint& point, bool requiresStroke) const
{
if (m_path.isEmpty())
if (!m_strokeAndMarkerBoundingBox.contains(point))
return false;
if (requiresStroke && !RenderSVGResource::strokePaintingResource(this, style()))
......
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