[premultiplication] Be more conservative with what data gets premultiplied
authorRobert Bragg <robert@linux.intel.com>
Sat, 6 Jun 2009 20:45:05 +0000 (21:45 +0100)
committerRobert Bragg <robert@linux.intel.com>
Thu, 11 Jun 2009 13:17:53 +0000 (14:17 +0100)
commita9b011f3edc9730f60280e38bf2164f1c2dd95a9
treed7082b49d787344592667fb96fcfa65738326764
parent9d3aa576045ce0aea51ef767b74596bb4582570f
[premultiplication] Be more conservative with what data gets premultiplied

We don't want to force texture data to be premultipled if the user
explicitly specifies a non premultiplied internal_format such as
COGL_PIXEL_FORMAT_RGBA_8888.  So now Cogl will only automatically
premultiply data when COGL_PIXEL_FORMAT_ANY is given for the
internal_format, or a premultiplied internal format such as
COGL_PIXEL_FORMAT_RGBA_8888_PRE is requested but non-premultiplied source
data is given.

This approach is consistent with OpenVG image formats which have already
influenced Cogl's pixel format semantics.
clutter/cogl/gl/cogl-texture.c
clutter/cogl/gles/cogl-texture.c