[Webkit-unassigned] [Bug 140603] New: SVG lighting filter calculation is optimized to be executed in a loop

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 18 20:20:19 PST 2015


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

            Bug ID: 140603
           Summary: SVG lighting filter calculation is optimized to be
                    executed in a loop
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sabouhallawa at apple.com
                CC: zimmermann at kde.org

The function FELighting::inlineSetPixel() is called to apply the lighting on a single pixel one at a time. Things to be noticed here about this function

-- The same calculation is carried out for the same values when calling this function from a loop. As an example consider these lines from FELighting::inlineSetPixel():

        normalVector.setX(factorX * static_cast<float>(normal2DVector.x()) * data.surfaceScale);
        normalVector.setY(factorY * static_cast<float>(normal2DVector.y()) * data.surfaceScale);

and consider the case when it is called from any loop in FELighting::drawLighting(). All loops call FELighting::inlineSetPixel() with the same values for factorX, factorY, normal2DVector and data.surfaceScale. So the above multiplications should be carried out only once for every loop and reused for all pixels processed in this loop.

-- The calculation of FELighting::inlineSetPixel() is not reused for adjacent pixels if they should be the same. Caching the resulting color or the light strength of the last pixel should accelerate the lighting calculation for adjacent pixels.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150119/b501d277/attachment-0002.html>


More information about the webkit-unassigned mailing list