GLESGraphicSystem: Forcing calculation of TargetDestination
authorMichael Schuldt <michael.schuldt@bmw.de>
Wed, 3 Jul 2013 14:10:50 +0000 (16:10 +0200)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 5 Jul 2013 10:56:48 +0000 (12:56 +0200)
- calculate the target destination in each composition cyle
  to be safe that textur coordinates are fitting well.

Signed-off-by: Michael Schuldt <michael.schuldt@bmw.de>
LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp

index 936ee67..97ac0da 100644 (file)
@@ -796,9 +796,11 @@ void GLESGraphicsystem::renderSurface(Surface* surface)
         shader = layerShader;
     }
 
-    FloatRectangle targetSurfaceSource = surface->getTargetSourceRegion();
-    FloatRectangle targetSurfaceDestination = surface->getTargetDestinationRegion();
 
+    // calculate the target destination in each composition, safe step but increase cpu cycless
+    surface->calculateTargetDestination(m_currentLayer->getSourceRegion(),m_currentLayer->getDestinationRegion());
+    FloatRectangle targetSurfaceSource = surface->getTargetSourceRegion();
+    FloatRectangle targetSurfaceDestination = surface->getTargetDestinationRegion();    
     float textureCoordinates[4];
     ViewportTransform::transformRectangleToTextureCoordinates(targetSurfaceSource,
                                                                 surface->OriginalSourceWidth,