You need to
before you can comment on or make changes to this bug.
feSpecularLighting is not implemented
It seems to me it is still an unimplemented feature, and I think of pick up this task for myself. I am new on svg part of WebKit, and I want to make sure my approach is reasonable:
- from an <feSpecularLighting ...> tag a FESpecularLighting object is created
it contains one light source (It is unclear for me that multiple light
sources are allowed or not)
- I have to implement its "void apply(Filter*)" function
- SVGFESpecularLightingElement is used only for visiting the nodes
Besides, why the filters are spread across multiple directories in WebKit?
platform/graphics/filters, svg/graphics/filters ?
Ok the task itself (based on GaussianBlur):
IntRect effectDrawingRect = calculateDrawingIntRect(m_in->scaledSubRegion());
// Do the effect here
resultImage()->putPremultipliedImageData(srcImageData.get(), imageRect, IntPoint());
Is this ok?
At first, there are two lighting filter effects, feSpecularLighting and feDiffuseLighting. Both can be combined with one of three light sources: feDistantLight, fePointLight, feSpotLight. To combine the lighting effect with a light source, just add the light source as a child to the lighting effect. There should be just one light source per lighting effect. For more detailed information, look at:
For the implementation, you 'just' need to write the apply function, thats correct. Some, not _that_ svg specific, effects are in platform/graphics/filters. The may or may not be used by CSS in the feature to implement CSS filter effects.
One more question: FESpecularLighting has a virtual function called "uniteEffectRect", which looks renamed to "uniteChildEffectSubregions", isn't it?
Dirk, can you comment on Zoltans question?
(In reply to comment #3)
> One more question: FESpecularLighting has a virtual function called
> "uniteEffectRect", which looks renamed to "uniteChildEffectSubregions", isn't
FESpecularLighting should look simiular to FEDiffuseLighting. It's a mistake, if it doesn't look the same.
Patch for #32197 (https://bugs.webkit.org/show_bug.cgi?id=32197) also resolved this bug.