summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp b/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp
index 936ee67..97ac0da 100644
--- a/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp
+++ b/LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp
@@ -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,