X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=mix_effect.h;h=850baae6c333f5b2c3a09a61ebe6635fc5495598;hp=4ef62fe9a2454c4754635fd62566e93bbb63a96b;hb=eff011224abc5dc81f801f3ea44572287a55bcac;hpb=37f56fcbe571b2322243f6de59494bf9e0cbb37a diff --git a/mix_effect.h b/mix_effect.h index 4ef62fe..850baae 100644 --- a/mix_effect.h +++ b/mix_effect.h @@ -1,5 +1,5 @@ -#ifndef _MIX_EFFECT_H -#define _MIX_EFFECT_H 1 +#ifndef _MOVIT_MIX_EFFECT_H +#define _MOVIT_MIX_EFFECT_H 1 // Combine two images: a*x + b*y. If you set a within [0,1] and b=1-a, // you will get a fade; if not, you may get surprising results (consider alpha). @@ -8,14 +8,17 @@ #include "effect.h" +namespace movit { + class MixEffect : public Effect { public: MixEffect(); - virtual std::string effect_type_id() const { return "MixEffect"; } - std::string output_fragment_shader(); + std::string effect_type_id() const override { return "MixEffect"; } + std::string output_fragment_shader() override; - virtual bool needs_srgb_primaries() const { return false; } - virtual unsigned num_inputs() const { return 2; } + bool needs_srgb_primaries() const override { return false; } + unsigned num_inputs() const override { return 2; } + bool strong_one_to_one_sampling() const override { return true; } // TODO: In the common case where a+b=1, it would be useful to be able to set // alpha_handling() to INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK. However, right now @@ -25,4 +28,6 @@ private: float strength_first, strength_second; }; -#endif // !defined(_MIX_EFFECT_H) +} // namespace movit + +#endif // !defined(_MOVIT_MIX_EFFECT_H)