[Webkit-unassigned] [Bug 45812] Filter builder should be able to follow the filter object dependencies

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 16 01:31:29 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=45812





--- Comment #4 from Dirk Schulze <krit at webkit.org>  2010-09-16 01:31:29 PST ---
(From update of attachment 67671)
View in context: https://bugs.webkit.org/attachment.cgi?id=67671&action=prettypatch

> WebCore/svg/graphics/filters/SVGFilterBuilder.cpp:102
> +void SVGFilterBuilder::appendEffectToEffectReferences(RefPtr<FilterEffect> effect)
> +{
> +    // The effect must be a newly created filter effect.
> +    ASSERT(!m_effectReferences.contains(effect));
> +    m_effectReferences.add(effect, EffectReferences());
> +
> +    int size = m_recordedEffects.size();
> +    for (int i = 0; i < size; ++i) {
> +        // Since targetEffect is a newly created object, it cannot already be added to the list.
> +        ASSERT(m_effectReferences.contains(m_recordedEffects[i]));
> +        m_effectReferences.find(m_recordedEffects[i])->second.append(effect);
> +    }
> +    m_recordedEffects.clear();
> +}
> +

I won't review the code like Niko right now. I'm more thinking about the process itself.

At the moment you record every request of filter effects in m_recordedEffects. Create the new effect and add the new created effect to the requester list of the requested effects afterwards (compilcated phrasing, I know ;-)).

I wounder if it won't be easier and more understandable, if we skip the recording of the requested effects and ask the new created effect directly for its requested effects.
This may cause us to let effects store their input effects in a Vector. Not sure if this is a noticeable performance or memory waste. But it could help to make the layout of primitives much easier. When you look at the current FilterEffect code, we have a lot of functions to determine the subregion, just because filter effects have different counts of input effects. We could simplify the code a lot if we allways use a vector for input effects. This would also mean that we can get rid of a lot of code in the FE* objects. IIRC Firefox is going the same way.

What do you think?

-- 
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