Skip to content
  • zimmermann@webkit.org's avatar
    2010-08-12 Nikolas Zimmermann <nzimmermann@rim.com> · a4f1233c
    zimmermann@webkit.org authored
            Reviewed by Dirk Schulze.
    
            SVG masking performance very slow
            https://bugs.webkit.org/show_bug.cgi?id=43622
    
            Create ImageBuffers only as large as the final rendered size on screen. Only gradient on text on CG handled this correctly so far.
            Refactored the code into a new SVGImageBufferTools class, and use the code from RenderSVGResourceMasker -> makes the IE9 demo SVG dice usable.
            Clippers, Patterns and Filters remain to be converted.
    
            Test: svg/zoom/page/zoom-mask-with-percentages.svg
    
            * Android.mk: Add SVGImageBufferTools.* to build.
            * CMakeLists.txt: Ditto.
            * GNUmakefile.am: Ditto.
            * WebCore.gypi: Ditto.
            * WebCore.pro: Ditto.
            * WebCore.xcodeproj/project.pbxproj: Ditto.
            * rendering/RenderSVGAllInOne.cpp: Ditto.
            * rendering/RenderSVGResourceGradient.cpp: Refactored CG gradient specific "create image buffer in absolute coordinates" code into SVGImageBufferTools class.
            (WebCore::createMaskAndSwapContextForTextGradient):
            (WebCore::clipToTextMask):
            (WebCore::RenderSVGResourceGradient::applyResource):
            * rendering/RenderSVGResourceMasker.cpp: Use new SVGImageBufferTools class, to avoid pixelation when zooming and to create image buffers as big as the final rendered size on screen, not more.
            (WebCore::RenderSVGResourceMasker::invalidateClients):
            (WebCore::RenderSVGResourceMasker::applyResource):
            (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
            (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
            (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
            * rendering/RenderSVGResourceMasker.h:
            * rendering/SVGImageBufferTools.cpp: Added.
            (WebCore::SVGImageBufferTools::absoluteTransformFromContext):
            (WebCore::SVGImageBufferTools::createImageBuffer):
            (WebCore::SVGImageBufferTools::clipToImageBuffer):
            * rendering/SVGImageBufferTools.h: Added.
            (WebCore::SVGImageBufferTools::SVGImageBufferTools):
            (WebCore::SVGImageBufferTools::~SVGImageBufferTools):
    
    2010-08-12  Nikolas Zimmermann  <nzimmermann@rim.com>
    
            Reviewed by Dirk Schulze.
    
            SVG masking performance very slow
            https://bugs.webkit.org/show_bug.cgi?id=43622
    
            Update mask results, now that mask image buffers are as big as the finaled rendered size on screen.
            Add new test covering zooming into masks, to show that it doesn't pixelate anymore.
    
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.checksum:
            * platform/mac/svg/W3C-SVG-1.1/masking-intro-01-f-expected.png:
            * platform/mac/svg/batik/masking/maskRegions-expected.checksum:
            * platform/mac/svg/batik/masking/maskRegions-expected.png:
            * platform/mac/svg/custom/grayscale-gradient-mask-expected.checksum:
            * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
            * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.checksum: Added.
            * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png: Added.
            * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt: Added.
            * svg/zoom/page/zoom-mask-with-percentages.svg: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a4f1233c