[Webkit-unassigned] [Bug 73029] SVG Gaussian blur in 1-dimension is incorrect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 23 10:27:33 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73029





--- Comment #1 from Stephen White <senorblanco at chromium.org>  2011-11-23 10:27:33 PST ---
>From FEGaussianBlur::platformApplyGeneric():

    for (int i = 0; i < 3; ++i) {
        if (kernelSizeX) {
            kernelPosition(i, kernelSizeX, dxLeft, dxRight);
            boxBlur(srcPixelArray, tmpPixelArray, kernelSizeX, dxLeft, dxRight, 4, stride, paintSize.width(), paintSize.height(), isAlphaImage());
        } else {
            ByteArray* auxPixelArray = tmpPixelArray;
            tmpPixelArray = srcPixelArray;
            srcPixelArray = auxPixelArray;
        }

        if (kernelSizeY) {
            kernelPosition(i, kernelSizeY, dyLeft, dyRight);
            boxBlur(tmpPixelArray, srcPixelArray, kernelSizeY, dyLeft, dyRight, stride, 4, paintSize.height(), paintSize.width(), isAlphaImage());
        } else {
            ByteArray* auxPixelArray = tmpPixelArray;
            tmpPixelArray = srcPixelArray;
            srcPixelArray = auxPixelArray;
        }
    }

For both kernelSizeX and kernelSizeY non-zero, this will do:

src -> tmp
tmp -> src
src -> tmp
tmp -> src
src -> tmp
tmp -> src

Leaving the result (as expected) in src.

For kernelSizeX nonzero, kernelSizeY zero:

this will blur src -> tmp, (swap)
               tmp -> src, (swap)
               src -> tmp

The passed-in src buffer contains the result of the second pass.  The third pass (in passed-in tmp) is ignored.

This is exercised by the 2nd and 3rd samples of the svg/filters/feGaussianBlur layout test.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list