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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 24 04:14:34 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 71675: Patch
https://bugs.webkit.org/attachment.cgi?id=71675&action=review

------- Additional Comments from Nikolas Zimmermann <zimmermann at kde.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=71675&action=review

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

Discussed on IRC. This is the not right approach, CanvasPixelArray has to be
stored in a RefPtr<> somewhere.
The performance increase that Dirk sees, is not calling
canvasPixelArray->get(). It forward to call to the ByteArray, but
CanvasPixelArray stores a RefPtr<ByteArray>. The slowness is because of calling
operator-> on the RefPtr.

The best way to fix this now, is to leave RefPtr<CanvasPixelArray> as is, and
store "ByteArray* srcByteArrayA = srcPixelArrayA->data()" in a local variable.
That gives the same benefit.


More information about the webkit-reviews mailing list