From: sunghyun kim Date: Mon, 26 Feb 2024 09:47:15 +0000 (+0900) Subject: Call widget_instance_resize() only when the size is changed X-Git-Tag: accepted/tizen/7.0/unified/20240227.085059^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F306701%2F1;p=platform%2Fcore%2Fuifw%2Fwidget-viewer-dali.git Call widget_instance_resize() only when the size is changed After applying corner radius, WidgetView create widget visual per frame. this point makes call relayout() every frame. To avoid this problem, WidgetView check its size and call widget_instance_resize only when the size is changed. Change-Id: Icff97b88cbf6b70a508fe0cf2b10493dce60b081 --- diff --git a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp index 1947f34..15c9f3b 100644 --- a/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp +++ b/widget_viewer_dali/internal/widget_view/widget_view_impl.cpp @@ -1986,7 +1986,12 @@ void WidgetView::OnRelayout( const Vector2& size, RelayoutContainer& container ) // in this case, we just save the size and do resize when instance is created. if( mCreated ) { - widget_instance_resize(mInstanceId.c_str(), size.x, size.y); + if( (mWidth != size.x) || (mHeight != size.y)) + { + widget_instance_resize(mInstanceId.c_str(), size.x, size.y); + mWidth = size.x; + mHeight = size.y; + } } else {