]> git.sesse.net Git - movit/blobdiff - resample_effect.h
Fix alpha handling for blur; it needs to be on the working (rewritten-to) effect.
[movit] / resample_effect.h
index 1424bbfd5b43de6e1da710d182516025d0de5553..b38728f05fa423061bb9002ce2bfb261ff73c4ff 100644 (file)
@@ -29,6 +29,7 @@ public:
        // down quite a lot.
        virtual bool needs_texture_bounce() const { return true; }
        virtual bool needs_srgb_primaries() const { return false; }
+       virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; }
 
        virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height);
 
@@ -70,9 +71,9 @@ public:
        }
        virtual bool changes_output_size() const { return true; }
 
-       virtual void get_output_size(unsigned *width, unsigned *height) const {
-               *width = this->output_width;
-               *height = this->output_height;
+       virtual void get_output_size(unsigned *width, unsigned *height, unsigned *virtual_width, unsigned *virtual_height) const {
+               *virtual_width = *width = this->output_width;
+               *virtual_height = *height = this->output_height;
        }
 
        void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
@@ -87,7 +88,7 @@ private:
        GLuint texnum;
        int input_width, input_height, output_width, output_height;
        int last_input_width, last_input_height, last_output_width, last_output_height;
-       int src_samples, num_loops;
+       int src_bilinear_samples, num_loops;
        float slice_height;
 };