From: Eunki, Hong Date: Thu, 14 Jul 2022 06:17:41 +0000 (+0900) Subject: [NUI] Ignore ImageView's equal value update X-Git-Tag: accepted/tizen/unified/20231205.024657~843 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48caad25328e0bd62904ecbdac1a60724cd9b9bb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Ignore ImageView's equal value update Let we check if inputed value is equal with cached value. If it is same, then we don't need to re-generate resource. Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs index 38b50b0..a5703df 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -1330,6 +1330,19 @@ namespace Tizen.NUI.BaseComponents { cachedImagePropertyMap = new PropertyMap(); } + + // To optimization, we don't check URL duplicate case. We already checked before. + if (key != ImageVisualProperty.URL) + { + using (PropertyValue oldValue = GetCachedImageVisualProperty(key)) + { + if (oldValue != null && oldValue.EqualTo(value)) + { + // Ignore UpdateImage query when we try to update equality value. + return; + } + } + } imagePropertyUpdatedFlag = true; cachedImagePropertyMap[key] = value;