From: Ferran Sole Date: Tue, 9 Aug 2016 15:07:35 +0000 (+0100) Subject: Bug fix in Transform manager and performance improvement X-Git-Tag: dali_1.2.1~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9dbda73167c2f49215c38d3a818818b6be60c56;p=platform%2Fcore%2Fuifw%2Fdali-core.git 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 --- 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