From f9dbda73167c2f49215c38d3a818818b6be60c56 Mon Sep 17 00:00:00 2001 From: Ferran Sole Date: Tue, 9 Aug 2016 16:07:35 +0100 Subject: [PATCH] Bug fix in Transform manager and performance improvement * World matrices where not reordered in the sorting pass causing the application to get the wrong value if the world matrix was queried during component sorting. This bug was causing slider handle and value to jump to an erroneous position when panning * Minor performance improvement to reduce the number of swaps when reordering transform components Change-Id: Ifde6ef4aaa2052c70042ef46c8909c85c407588a --- dali/internal/update/manager/transform-manager.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dali/internal/update/manager/transform-manager.cpp b/dali/internal/update/manager/transform-manager.cpp index 5415778..b289bf4 100644 --- a/dali/internal/update/manager/transform-manager.cpp +++ b/dali/internal/update/manager/transform-manager.cpp @@ -312,6 +312,7 @@ void TransformManager::SwapComponents( unsigned int i, unsigned int j ) std::swap( mLocal[i], mLocal[j] ); std::swap( mComponentDirty[i], mComponentDirty[j] ); std::swap( mBoundingSpheres[i], mBoundingSpheres[j] ); + std::swap( mWorld[i], mWorld[j] ); mIds[ mComponentId[i] ] = i; mIds[ mComponentId[j] ] = j; @@ -335,10 +336,15 @@ void TransformManager::ReorderComponents() } } - std::sort( mOrderedComponents.Begin(), mOrderedComponents.End()); - for( size_t i(0); i