]> git.sesse.net Git - movit/blobdiff - effect_chain.cpp
Make a new system for meta-effects, and convert the blur to use it. Hides the two...
[movit] / effect_chain.cpp
index 85c8be374a0702118c74ce2faa3c9c5e6d175674..6f53008c72eb43c0df26079d1ba8c1f95d9d57b0 100644 (file)
@@ -64,7 +64,7 @@ void EffectChain::normalize_to_linear_gamma()
        } else {
                GammaExpansionEffect *gamma_conversion = new GammaExpansionEffect();
                gamma_conversion->set_int("source_curve", current_gamma_curve);
-               effects.push_back(gamma_conversion);
+               gamma_conversion->add_self_to_effect_chain(&effects);
        }
        current_gamma_curve = GAMMA_LINEAR;
 }
@@ -75,7 +75,7 @@ void EffectChain::normalize_to_srgb()
        ColorSpaceConversionEffect *colorspace_conversion = new ColorSpaceConversionEffect();
        colorspace_conversion->set_int("source_space", current_color_space);
        colorspace_conversion->set_int("destination_space", COLORSPACE_sRGB);
-       effects.push_back(colorspace_conversion);
+       colorspace_conversion->add_self_to_effect_chain(&effects);
        current_color_space = COLORSPACE_sRGB;
 }
 
@@ -91,7 +91,7 @@ Effect *EffectChain::add_effect(EffectId effect_id)
                normalize_to_srgb();
        }
 
-       effects.push_back(effect);
+       effect->add_self_to_effect_chain(&effects);
        return effect;
 }