--- a/graphicscomposition/openwfcompositionengine/composition/src/wfcpipeline.c Fri Apr 23 15:29:19 2010 +0100
+++ b/graphicscomposition/openwfcompositionengine/composition/src/wfcpipeline.c Fri Apr 23 17:57:02 2010 +0100
@@ -103,10 +103,6 @@
state->blendInfo.mask = state->originalMaskImage ? state->maskImage : NULL;
state->blendInfo.globalAlpha = state->globalAlpha;
- /* composition does not use these values ever */
- state->blendInfo.tsColor = NULL;
- state->blendInfo.destinationFullyOpaque = OWF_FALSE;
-
DPRINT((" globalAplha = %f", state->globalAlpha));
/* no need to check with OWF_ALPHA_MIN_VALUE as it is zero */
OWF_ASSERT(state->blendInfo.globalAlpha <= OWF_ALPHA_MAX_VALUE);
@@ -352,6 +348,21 @@
state->globalAlpha = element->globalAlpha;
state->sourceScaleFilter = element->sourceScaleFilter;
state->transparencyTypes = element->transparencyTypes;
+
+ if (state->transparencyTypes & WFC_TRANSPARENCY_ELEMENT_GLOBAL_ALPHA)
+ {
+ if (state->globalAlpha == OWF_FULLY_TRANSPARENT)
+ {
+ /* Fully transparent element - no contribution. */
+ return NULL;
+ }
+ if (state->globalAlpha == OWF_FULLY_OPAQUE)
+ {
+ /* Fully opaque global alpha - global alpha can be ignored */
+ state->transparencyTypes &= ~WFC_TRANSPARENCY_ELEMENT_GLOBAL_ALPHA;
+ }
+ }
+
/* replicate the source viewport rectangle and target extent rectangle */
for (x = 0; x < 4; x++)
{