From: Eunki Hong Date: Wed, 3 Jan 2024 16:44:02 +0000 (+0900) Subject: [NUI] Do not recreate visual when we change ImageColor only X-Git-Tag: submit/tizen/20240109.095302~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e64d277b378c0d8db41272958df78f528f85a8da;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Do not recreate visual when we change ImageColor only Since we don't need to re-create the visual if we only chage the ImageColor property, let we use UpdateProperty Action. 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 0611ba1c2..6d469a851 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -1634,7 +1634,7 @@ namespace Tizen.NUI.BaseComponents } } } - imagePropertyUpdatedFlag = true; + imagePropertyUpdatedFlag |= requiredVisualCreation; cachedImagePropertyMap[key] = value; // Lazy update only if visual creation required, and _resourceUrl is not empty, and ProcessAttachedFlag is false. diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageViewBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageViewBindableProperty.cs index ab6e689f4..05b6a5951 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageViewBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageViewBindableProperty.cs @@ -581,7 +581,10 @@ namespace Tizen.NUI.BaseComponents if (newValue != null) { imageView.UpdateImage(Visual.Property.Opacity, new PropertyValue(((Color)newValue).A), false); - imageView.UpdateImage(Visual.Property.MixColor, new PropertyValue((Color)newValue)); + imageView.UpdateImage(Visual.Property.MixColor, new PropertyValue((Color)newValue), false); + + // Update property + Interop.View.InternalUpdateVisualPropertyVector4(imageView.SwigCPtr, ImageView.Property.IMAGE, Visual.Property.MixColor, Vector4.getCPtr((Color)newValue)); } }, defaultValueCreator: (bindable) =>