From c925d509ae058c6314024206ca928bf3fcba003b Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 17 May 2023 17:14:38 +0900 Subject: [PATCH] [Tizen] Let ModelCache use std::map instead of unordered_map If mModelCache become rehashed during some model-load-task lock the process, It might make some crash. To keep the validation of ModelCacheManager::ModelCache data, let we use the cache container as std::map, instead of std::unordered_map Change-Id: Ied52a7cd8fcf805eb18d5563df1da821f4d3c655 Signed-off-by: Eunki, Hong --- dali-scene3d/internal/common/model-cache-manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dali-scene3d/internal/common/model-cache-manager.cpp b/dali-scene3d/internal/common/model-cache-manager.cpp index 0a26bcc..46d80e9 100644 --- a/dali-scene3d/internal/common/model-cache-manager.cpp +++ b/dali-scene3d/internal/common/model-cache-manager.cpp @@ -19,9 +19,9 @@ #include // EXTERNAL INCLUDES +#include #include #include -#include // INTERNAL INCLUDES #include @@ -121,14 +121,14 @@ private: std::vector cameraParameters{}; ///< The camera parameters that were loaded from the scene. std::vector lights{}; ///< The light parameters that were loaded from the scene. - uint32_t refCount{0}; ///< The reference count of this model cache. - Dali::ConditionalWait loadSceneConditionalWait{}; ///< The conditionalWait instance used to synchronise the loading of the scene for the same model in different threads. + uint32_t refCount{0}; ///< The reference count of this model cache. + Dali::ConditionalWait loadSceneConditionalWait{}; ///< The conditionalWait instance used to synchronise the loading of the scene for the same model in different threads. bool isSceneLoaded{false}; ///< Whether the scene of the model has been loaded. bool isSceneLoading{false}; ///< Whether the scene loading of the model is in progress. }; - using ModelResourceCache = std::unordered_map; + using ModelResourceCache = std::map; ModelResourceCache mModelCache; }; -- 2.7.4