X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resize_effect.h;h=a921eb0f29aea02fc00e9f0bfe8c9ac9d2cc4a5e;hp=774f510de592aedc4e0ae1991916629d62c64842;hb=f0c77209245aa206996c7ef5395888e2859ff4bf;hpb=ac4fc36aa70ffefb6b9632dc0abea5cbbce5387b diff --git a/resize_effect.h b/resize_effect.h index 774f510..a921eb0 100644 --- a/resize_effect.h +++ b/resize_effect.h @@ -9,23 +9,28 @@ #include "effect.h" +namespace movit { + class ResizeEffect : public Effect { public: ResizeEffect(); - virtual std::string effect_type_id() const { return "ResizeEffect"; } - std::string output_fragment_shader(); + std::string effect_type_id() const override { return "ResizeEffect"; } + std::string output_fragment_shader() override; // We want processing done pre-filtering and mipmapped, // in case we need to scale down a lot. - virtual bool need_texture_bounce() const { return true; } - virtual bool needs_mipmaps() const { return true; } - virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; } + bool needs_texture_bounce() const override { return true; } + MipmapRequirements needs_mipmaps() const override { return NEEDS_MIPMAPS; } + AlphaHandling alpha_handling() const override { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; } - virtual bool changes_output_size() const { return true; } - virtual void get_output_size(unsigned *width, unsigned *height, unsigned *virtual_width, unsigned *virtual_height) const; + bool changes_output_size() const override { return true; } + bool sets_virtual_output_size() const override { return false; } + void get_output_size(unsigned *width, unsigned *height, unsigned *virtual_width, unsigned *virtual_height) const override; private: int width, height; }; +} // namespace movit + #endif // !defined(_MOVIT_RESIZE_EFFECT_H)