[Webkit-unassigned] [Bug 48174] Filter example Chiseled from SVG Wow! is slow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 24 05:08:16 PDT 2010


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


Nikolas Zimmermann <zimmermann at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #71679|review?                     |review-
               Flag|                            |




--- Comment #7 from Nikolas Zimmermann <zimmermann at kde.org>  2010-10-24 05:08:15 PST ---
(From update of attachment 71679)
View in context: https://bugs.webkit.org/attachment.cgi?id=71679&action=review

> WebCore/platform/graphics/filters/FEBlend.cpp:38
>  
> +using WTF::ByteArray;

This is wrong, it belongs on the bottom of wtf/ByteArray.h.

> WebCore/platform/graphics/filters/FEBlend.cpp:108
> +    RefPtr<CanvasPixelArray> srcCanvasPixelArrayA(in->resultImage()->getPremultipliedImageData(effectADrawingRect)->data());
> +    ByteArray* srcPixelArrayA(srcCanvasPixelArrayA->data());

This is dangerous.
RefPtr<ImageData> srcImageDataA = in->resultImage()->getPremultipliedImageData(effectADrawingRect);
ByteArray* srcPixelArrayA(srcImageDataA->data()->data());

That would be a safe pattern. The ImageData is refcounted, it's contained CanvasPixelArray too, and it's contained ByteArray as well.
You only need to hold the ImageData in a RefPtr, then you can safely access the ByteArray pointer.

This affects multiple places, please look through them first.

-- 
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