[webkit-reviews] review denied: [Bug 48174] Filter example Chiseled from SVG Wow! is slow : [Attachment 71679] Patch

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


Nikolas Zimmermann <zimmermann at kde.org> has denied Dirk Schulze
<krit at webkit.org>'s request for review:
Bug 48174: Filter example Chiseled from SVG Wow! is slow
https://bugs.webkit.org/show_bug.cgi?id=48174

Attachment 71679: Patch
https://bugs.webkit.org/attachment.cgi?id=71679&action=review

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
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(effectADrawin
gRect)->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.


More information about the webkit-reviews mailing list