]> git.sesse.net Git - movit/commitdiff
Add an assert saying that if an input has premultiplied alpha, it must also have...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 16 Jan 2013 19:45:14 +0000 (20:45 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 16 Jan 2013 19:45:14 +0000 (20:45 +0100)
This holds true for nodes in general, but I'm not sure enough about all sorts of intermediate
states that could cause this to be temporarily untrue for other nodes.

effect_chain.cpp

index 68a60737878a76553b1e9f66b88cc692b0532a8a..a9b892725358039173725feea5306692f3432988 100644 (file)
@@ -727,6 +727,10 @@ void EffectChain::find_color_spaces_for_inputs()
                        default:
                                assert(false);
                        }
                        default:
                                assert(false);
                        }
+
+                       if (node->output_alpha_type == ALPHA_PREMULTIPLIED) {
+                               assert(node->output_gamma_curve == GAMMA_LINEAR);
+                       }
                }
        }
 }
                }
        }
 }