[test-premult] Adds a unit test for texture upload premultiplication semantics
authorRobert Bragg <robert@linux.intel.com>
Sun, 7 Jun 2009 15:31:12 +0000 (16:31 +0100)
committerRobert Bragg <robert@linux.intel.com>
Thu, 11 Jun 2009 13:17:53 +0000 (14:17 +0100)
commit41579eb3c9d7243d41754e38d30f1d8ad20958fd
tree3f362f1feb260a00fac4665f2fe7773f8868635e
parent70636b4815283136ca5d878b6e39e12337c4f9ed
[test-premult] Adds a unit test for texture upload premultiplication semantics

cogl_texture_new_from_data lets you specify a source format for the users given
data, and an internal format which the user wants the GPU to see. This unit
test verifies that the users data is premultiplied, un-premultiplied or
left alone for a number of (source format, internal format) pairs.

cogl_texture_set_region allows specifying a source format, and the internal
format is determined from the texture being updated. As above we test
a number of format pairs and check Cogl is converting data correctly.

The test verifies that if the user allows COGL_FORMAT_ANY for the
internal_format then by default Cogl will choose a premultipled format for
RGBA textures.

Note: Currently this only tests cogl_texture_new_from_data and
cogl_texture_set_region, we should also test cogl_texture_new_from_file,
cogl_texture_new_from_bitmap and cogl_texture_new_from_foreign.
tests/conform/Makefile.am
tests/conform/test-conform-main.c
tests/conform/test-premult.c [new file with mode: 0644]