|Summary:||SVG Filter need feColorMatrix implementation|
|Product:||WebKit||Reporter:||Dirk Schulze <krit>|
|Component:||SVG||Assignee:||Dirk Schulze <krit>|
|Severity:||Normal||CC:||abarth, eric, jeffschiller, oliver|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
|Bug Depends on:|
|Bug Blocks:||68469, 26389|
Description Dirk Schulze 2009-07-27 06:54:07 PDT
SVG Filter need feColorMatrix implementation
Comment 1 Dirk Schulze 2009-07-27 07:05:23 PDT
Created attachment 33543 [details] SVG feColorMatrix-implementation This is the implementation of feColorMatrix.
Comment 2 Oliver Hunt 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 ;)
Comment 3 Eric Seidel (no email) 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?
Comment 4 Oliver Hunt 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
Comment 5 Dirk Schulze 2009-08-04 00:37:42 PDT
Created attachment 34041 [details] SVG feColorMatrix-implementation SVG feColorMatrix-implementation with templates.
Comment 6 Eric Seidel (no email) 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.
Comment 7 Adam Barth 2009-08-07 17:49:58 PDT
Assigned to krit for landing.