From: Eunki, Hong Date: Tue, 20 Sep 2022 11:13:27 +0000 (+0900) Subject: Fix transform sceneId order issue X-Git-Tag: dali_2.1.41~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1030a6bcc90496a888ae6b662decf2e41ff25571;p=platform%2Fcore%2Fuifw%2Fdali-core.git Fix transform sceneId order issue When mIds[mPanret[i]] is bigger then i, mOrderedCOmponents[~~].sceneId become garbage. To fix this issue, let we store sceneId first, and propargate sceneId later. Note : sceneId become the lastest parent's sceneId. So, it always valid. Change-Id: I27c6e51cda0ae696bf1ff5179ddb735f3e24aa65 Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/update/manager/transform-manager.cpp b/dali/internal/update/manager/transform-manager.cpp index db4f042f7..8f7680e9e 100644 --- a/dali/internal/update/manager/transform-manager.cpp +++ b/dali/internal/update/manager/transform-manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -354,9 +354,10 @@ void TransformManager::ReorderComponents() { mOrderedComponents.Resize(mComponentCount); - unsigned int sceneId = 0; - + uint16_t sceneId = 0u; TransformId parentId; + + // Create sceneId first for(TransformId i = 0; i < mComponentCount; ++i) { mOrderedComponents[i].id = mComponentId[i]; @@ -367,12 +368,17 @@ void TransformManager::ReorderComponents() { mOrderedComponents[i].sceneId = sceneId++; } + } + // Propagate sceneId + for(TransformId i = 0; i < mComponentCount; ++i) + { + parentId = mParent[i]; while(parentId != INVALID_TRANSFORM_ID) { mOrderedComponents[i].level++; + mOrderedComponents[i].sceneId = mOrderedComponents[mIds[parentId]].sceneId; parentId = mParent[mIds[parentId]]; - mOrderedComponents[i].sceneId = mOrderedComponents[mIds[mParent[i]]].sceneId; } }