cogl-journal: Avoid enabling blending if possible
authorNeil Roberts <neil@linux.intel.com>
Tue, 14 Dec 2010 14:44:45 +0000 (14:44 +0000)
committerNeil Roberts <neil@linux.intel.com>
Mon, 10 Jan 2011 17:11:42 +0000 (17:11 +0000)
commitd648de7d1492b9ae69aac6702a99fccb8f92b165
tree51badf5a0015bba5d6073d149d1f78acf814a720
parent159cd6ddc02b4a9a37fe7e0a61a104d3abab91a6
cogl-journal: Avoid enabling blending if possible

The vertex attribute API assumes that if there is a color array
enabled then we can't determine if the colors are opaque so we have to
enable blending. The journal always uses a color array to avoid
switching color state between rectangles. Since the journal switched
to using vertex attributes this means we effectively always enable
blending from the journal. To fix this there is now a new flag for
_cogl_draw_vertex_attributes to specify that the color array is known
to only contain opaque colors which causes the draw function not to
copy the pipeline. If the pipeline has blending disabled then the
journal passes this flag.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2481
clutter/cogl/cogl/cogl-journal.c
clutter/cogl/cogl/cogl-vertex-attribute-private.h
clutter/cogl/cogl/cogl-vertex-attribute.c