graphicscomposition/openwfcompositionengine/composition/src/wfcpipeline.c
branchRCL_3
changeset 20 25ffed67c7ef
parent 19 bbf46f59e123
--- a/graphicscomposition/openwfcompositionengine/composition/src/wfcpipeline.c	Tue Aug 31 16:31:06 2010 +0300
+++ b/graphicscomposition/openwfcompositionengine/composition/src/wfcpipeline.c	Wed Sep 01 12:39:21 2010 +0100
@@ -1,5 +1,4 @@
-/* Copyright (c) 2009-2010 The Khronos Group Inc.
- * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
+/* Copyright (c) 2009 The Khronos Group Inc.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and/or associated documentation files (the
@@ -104,6 +103,10 @@
     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);    
@@ -334,6 +337,7 @@
         return NULL;
     }
 
+    
     /* setup temporary images used in composition. since the original
        source data must not be altered, we must copy it to scratch buffer
        and work it there. another scratch buffer is needed for scaling
@@ -348,22 +352,7 @@
     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 */
+    /* replicate the source viewport rectangle and target extent rectangle */
     for (x = 0; x < 4; x++)
     {
         state->sourceRect[x] = element->srcRect[x];
@@ -602,6 +591,7 @@
     }
     else
     {
+
         /* Source rectangle */
         OWF_Rect_Set(&sourceRect,
                      state->oversizedCropRect.x, state->oversizedCropRect.y,
@@ -627,7 +617,7 @@
 WFC_Pipeline_ExecuteFlipStage(WFC_CONTEXT* context, WFC_ELEMENT_STATE* state)
 {
     OWF_FLIP_DIRECTION      flipping;
-	
+    
     if (NULL == context || NULL == state)
     {
         DPRINT(("WFC_Context_ExecuteFlipStage: context = %p, state = %p",
@@ -635,6 +625,7 @@
     }
     else
     {
+        OWF_ASSERT(state);
         flipping = state->sourceFlip > 0.0f ? OWF_FLIP_VERTICALLY
                                           : OWF_FLIP_NONE;
         
@@ -655,12 +646,14 @@
     OWF_RECTANGLE           rect;    
     WFCRotation             rotation;
 
+
     if (NULL == context || NULL == state)
     {
         DPRINT(("WFC_Context_ExecuteRotationStage: context = %p, state = %p",
                context, state));
         return;
     }
+    OWF_ASSERT(state);
 
     rotation = state->rotation;
     DPRINT(("  Element rotation = %d", rotation));
@@ -730,7 +723,7 @@
                             cropRect;
     OWF_FILTERING           filteringMode = OWF_FILTER_POINT_SAMPLING;
     WFCScaleFilter          filter;
-	
+
     DPRINT(("WFC_Context_ExecuteScalingStage(%p,%p)", context, state));
 
     if (NULL == context || NULL == state)
@@ -740,6 +733,8 @@
         return;
     }
 
+    OWF_ASSERT(state);
+
     filter = state->sourceScaleFilter;
 
     switch (filter)
@@ -805,7 +800,7 @@
 {
     OWF_TRANSPARENCY        blendMode = OWF_TRANSPARENCY_NONE;
     WFCbitfield             transparency = 0;
-	
+
     DPRINT(("WFC_Pipeline_ExecuteBlendingStage"));
 
     if (NULL == context || NULL == state)
@@ -816,6 +811,8 @@
     DPRINT(("  context = %d, state = %d",
            context->handle, state));
 
+    OWF_ASSERT(state);
+
     transparency = state->transparencyTypes;
     blendMode = OWF_TRANSPARENCY_NONE;