X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=6f53008c72eb43c0df26079d1ba8c1f95d9d57b0;hp=85c8be374a0702118c74ce2faa3c9c5e6d175674;hb=b618b34070d23b6da35c77f004678d8a9e55575b;hpb=3dbe1e7c09766c2437d92a8c2cbbaeea7de3f610 diff --git a/effect_chain.cpp b/effect_chain.cpp index 85c8be3..6f53008 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -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; }