-#ifndef _DIFFUSION_EFFECT_H
-#define _DIFFUSION_EFFECT_H 1
+#ifndef _MOVIT_DIFFUSION_EFFECT_H
+#define _MOVIT_DIFFUSION_EFFECT_H 1
// There are many different effects that go under the name of "diffusion",
// seemingly all of the inspired by the effect you get when you put a
// where we first blur the picture, and then overlay it on the original
// using the original as a matte.
-#include <GL/glew.h>
+#include <epoxy/gl.h>
#include <assert.h>
#include <string>
#include "effect.h"
+namespace movit {
+
class BlurEffect;
class EffectChain;
class Node;
class DiffusionEffect : public Effect {
public:
DiffusionEffect();
+ ~DiffusionEffect();
virtual std::string effect_type_id() const { return "DiffusionEffect"; }
virtual void rewrite_graph(EffectChain *graph, Node *self);
private:
BlurEffect *blur;
OverlayMatteEffect *overlay_matte;
+ bool owns_overlay_matte;
};
// Used internally by DiffusionEffect; combines the blurred and the original
virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; }
unsigned num_inputs() const { return 2; }
+ virtual bool one_to_one_sampling() const { return true; }
private:
float blurred_mix_amount;
};
+} // namespace movit
-#endif // !defined(_DIFFUSION_EFFECT_H)
+#endif // !defined(_MOVIT_DIFFUSION_EFFECT_H)