]> git.sesse.net Git - movit/commitdiff
Hard-assert on something that has bitten me too many times now.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Feb 2016 00:46:15 +0000 (01:46 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Feb 2016 00:46:15 +0000 (01:46 +0100)
effect_chain.cpp

index fa7340d7a456839f7ef2563d76c5a872182491ff..1d9aea82429c9e62deff8b4d1176d08f91854455 100644 (file)
@@ -1176,6 +1176,12 @@ void EffectChain::propagate_alpha()
 
                if (alpha_handling == Effect::INPUT_AND_OUTPUT_PREMULTIPLIED_ALPHA ||
                    alpha_handling == Effect::INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK) {
 
                if (alpha_handling == Effect::INPUT_AND_OUTPUT_PREMULTIPLIED_ALPHA ||
                    alpha_handling == Effect::INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK) {
+                       // This combination (requiring premultiplied alpha, but _not_ requiring
+                       // linear light) is illegal, // since the combination
+                       // of premultiplied alpha and nonlinear inputs is
+                       // meaningless.
+                       assert(node->effect->needs_linear_light());
+                       
                        // If the effect has asked for premultiplied alpha, check that it has got it.
                        if (any_postmultiplied) {
                                node->output_alpha_type = ALPHA_INVALID;
                        // If the effect has asked for premultiplied alpha, check that it has got it.
                        if (any_postmultiplied) {
                                node->output_alpha_type = ALPHA_INVALID;