RESOLVED FIXED 27711
SVG Filter need feColorMatrix implementation
https://bugs.webkit.org/show_bug.cgi?id=27711
Summary SVG Filter need feColorMatrix implementation
Dirk Schulze
Reported 2009-07-27 06:54:07 PDT
SVG Filter need feColorMatrix implementation
Attachments
SVG feColorMatrix-implementation (5.79 KB, patch)
2009-07-27 07:05 PDT, Dirk Schulze
oliver: review-
SVG feColorMatrix-implementation (6.58 KB, patch)
2009-08-04 00:37 PDT, Dirk Schulze
eric: review+
Dirk Schulze
Comment 1 2009-07-27 07:05:23 PDT
Created attachment 33543 [details] SVG feColorMatrix-implementation This is the implementation of feColorMatrix.
Oliver Hunt
Comment 2 2009-07-28 11:41:49 PDT
Comment on attachment 33543 [details] SVG feColorMatrix-implementation Woo! alas, the double casts here: double red = (double)r, green = (double)g, blue = (double)b, alpha = (double)a; are unnecessary And I don't like having that switch in the middle of the main processing loop -- i'm not entirely sure what can be done to improve it short of something involving templates ;)
Eric Seidel (no email)
Comment 3 2009-07-28 11:48:01 PDT
The switch could be pulled out into a wrapper and a const function pointer used instead. The compiler should be able to optimize the jump with a const function pointer, no?
Oliver Hunt
Comment 4 2009-07-28 11:52:30 PDT
I think not with gcc i don't think :D, i was thinking of templating on the operation type
Dirk Schulze
Comment 5 2009-08-04 00:37:42 PDT
Created attachment 34041 [details] SVG feColorMatrix-implementation SVG feColorMatrix-implementation with templates.
Eric Seidel (no email)
Comment 6 2009-08-06 19:54:56 PDT
Comment on attachment 34041 [details] SVG feColorMatrix-implementation Sigh. We totally need Color accessors to: 127 srcPixelArray->get(pixelByteOffset, r); 128 srcPixelArray->get(pixelByteOffset + 1, g); 129 srcPixelArray->get(pixelByteOffset + 2, b); 130 srcPixelArray->get(pixelByteOffset + 3, a); Sigh. I still think function pointers would be cleaner than templates. I'll r+ this, but I definitely would prefer function pointers for this sort of thing. Modern compilers should be able to handle the jump prediction.
Adam Barth
Comment 7 2009-08-07 17:49:58 PDT
Assigned to krit for landing.
Dirk Schulze
Comment 8 2009-08-08 13:40:29 PDT
landed in r46958.
Note You need to log in before you can comment on or make changes to this bug.