// Unit tests for FlatInput.
-#include "test_util.h"
-#include "gtest/gtest.h"
+#include <stddef.h>
+
+#include "effect_chain.h"
#include "flat_input.h"
+#include "gtest/gtest.h"
+#include "test_util.h"
TEST(FlatInput, SimpleGrayscale) {
const int size = 4;
};
float out_data[4 * size];
- EffectChainTester tester(data, 1, size, FORMAT_RGBA, COLORSPACE_sRGB, GAMMA_LINEAR);
+ EffectChainTester tester(data, 1, size, FORMAT_RGBA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_LINEAR);
tester.run(out_data, GL_RGBA, COLORSPACE_sRGB, GAMMA_LINEAR);
expect_equal(expected_data, out_data, 4, size);
float out_data[4 * size];
EffectChainTester tester(NULL, 1, size);
- tester.add_input(data, FORMAT_RGBA, COLORSPACE_sRGB, GAMMA_sRGB);
+ tester.add_input(data, FORMAT_RGBA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_sRGB);
tester.run(out_data, GL_RGBA, COLORSPACE_sRGB, GAMMA_LINEAR);
expect_equal(expected_data, out_data, 4, size);
};
float out_data[4 * size];
- EffectChainTester tester(data, 1, size, FORMAT_BGRA, COLORSPACE_sRGB, GAMMA_LINEAR);
+ EffectChainTester tester(data, 1, size, FORMAT_BGRA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_LINEAR);
tester.run(out_data, GL_RGBA, COLORSPACE_sRGB, GAMMA_LINEAR);
expect_equal(expected_data, out_data, 4, size);