[Webkit-unassigned] [Bug 28133] SVG Filter feBlend implementation missing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 10 10:15:36 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28133
--- Comment #9 from Dirk Schulze <krit at webkit.org> 2009-08-10 10:15:34 PDT ---
(In reply to comment #8)
> (From update of attachment 34478 [details])
> Sorry, didn't mean for it to sound like something you'd need to "surrender" to.
> :)
>
> We tend to avoid using PassRefPtr on the stack, as it's error prone. Instead
> we use a RefPtr and just call .release() when we need the PassRefPtr out of it.
>
> I'm not sure why grabbing the CanvasPixelArray out of in1/in2 wouldn't be a
> function:
> 102 // Get PixelArray of m_in2
> 103 filterContext->drawImage(m_in2->resultImage()->image(),
> calculateDrawingRect(m_in2->subRegion()));
> 104 imageData = resultImage()->getImageData(imageRect);
> 105 PassRefPtr<CanvasPixelArray> srcPixelArrayB(imageData->data());
>
> imageDataAsPixelArray(m_in2);
>
> I'm also not sure if you're intending to re-use the ImageData pointer from
> m_in2 during your calculations or not. Is that intended? I assume you're
> trying to avoid allocating a new buffer just to hold the result data?
> 125 imageData->data()->set(pixelByteOffset + channel, result);
Yes, I try to avoid creating a new temporary ImageBuffer. Thats why I clear the
context before creating the second PixelArray with the same context of
resultImage.
> Why don't you need to clear the filterContext before drawing m_in?
It's not needed to clear the context a second time, because we just need the
context to get the Pixelarrays according to our current
filterEffect-ImageBuffer (size, startingpoint etc.) and ovewrite everything
with imageData->data()->set(...). A second clear will coast more time, since
most graphic librarys make use of composite operators to do it and this is
slow, at least for cairo (and, like I explained before, it's not sensible).
> Can you just write directly to resultImage()?
As far as I know, pixel manipulation of ImageBuffers is just possible with the
indirection of ImageData.
--
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