[NUI] Remove Debug.WritelineIf
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 17 Mar 2021 04:26:29 +0000 (13:26 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 18 Mar 2021 10:16:51 +0000 (19:16 +0900)
Rmove to improve performance

Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/internal/Layouting/LayoutController.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index 81343a0..9d70611 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
     /// </summary>
     internal class LayoutController : Disposable
     {
-        static bool LayoutDebugController = false; // Debug flag
-
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         internal delegate void Callback(int id);
 
@@ -167,7 +165,7 @@ namespace Tizen.NUI
         {
             if (rootNode.Layout != null)
             {
-                Debug.WriteLineIf(LayoutDebugController, "LayoutController Root found:" + rootNode.Name);
+                NUILog.Debug("LayoutController Root found:" + rootNode.Name);
                 // rootNode has a layout, start measuring and layouting from here.
                 MeasureAndLayout(rootNode);
             }
@@ -294,7 +292,7 @@ namespace Tizen.NUI
         /// </summary>
         private void PlayAnimation()
         {
-            Debug.WriteLineIf(LayoutDebugController, "LayoutController Playing, Core Duration:" + coreAnimation.Duration);
+            NUILog.Debug("LayoutController Playing, Core Duration:" + coreAnimation.Duration);
             coreAnimation.Play();
         }
 
@@ -328,7 +326,7 @@ namespace Tizen.NUI
                 // of the other stack.  Then the main removal stack iterated when AnimationFinished
                 // occurs again.
             }
-            Debug.WriteLineIf(LayoutDebugController, "LayoutController AnimationFinished");
+            NUILog.Debug("LayoutController AnimationFinished");
             coreAnimation?.Clear();
         }
 
@@ -341,8 +339,7 @@ namespace Tizen.NUI
             // Initialize animation for this layout run.
             bool animationPending = false;
 
-            Debug.WriteLineIf(LayoutDebugController,
-                               "LayoutController SetupCoreAnimation for:" + layoutTransitionDataQueue.Count);
+            NUILog.Debug("LayoutController SetupCoreAnimation for:" + layoutTransitionDataQueue.Count);
 
             if (layoutTransitionDataQueue.Count > 0) // Something to animate
             {
@@ -381,8 +378,7 @@ namespace Tizen.NUI
                             positionTransitionComponents.Duration,
                             positionTransitionComponents.AlphaFunction);
 
-                Debug.WriteLineIf(LayoutDebugController,
-                                   "LayoutController SetupAnimationForPosition View:" + layoutPositionData.Item.Owner.Name +
+                NUILog.Debug("LayoutController SetupAnimationForPosition View:" + layoutPositionData.Item.Owner.Name +
                                    " left:" + layoutPositionData.Left +
                                    " top:" + layoutPositionData.Top +
                                    " delay:" + positionTransitionComponents.Delay +
@@ -411,8 +407,7 @@ namespace Tizen.NUI
                                          sizeTransitionComponents.Duration,
                                          sizeTransitionComponents.AlphaFunction);
 
-                Debug.WriteLineIf(LayoutDebugController,
-                                  "LayoutController SetupAnimationForSize View:" + layoutPositionData.Item.Owner.Name +
+                NUILog.Debug("LayoutController SetupAnimationForSize View:" + layoutPositionData.Item.Owner.Name +
                                    " width:" + (layoutPositionData.Right - layoutPositionData.Left) +
                                    " height:" + (layoutPositionData.Bottom - layoutPositionData.Top) +
                                    " delay:" + sizeTransitionComponents.Delay +
@@ -436,8 +431,7 @@ namespace Tizen.NUI
                                                  transition.Animator.Duration,
                                                  transition.Animator.AlphaFunction);
 
-                        Debug.WriteLineIf(LayoutDebugController,
-                                           "LayoutController SetupAnimationForCustomTransitions View:" + view.Name +
+                        NUILog.Debug("LayoutController SetupAnimationForCustomTransitions View:" + view.Name +
                                            " Property:" + transition.AnimatableProperty.ToString() +
                                            " delay:" + transition.Animator.Delay +
                                            " duration:" + transition.Animator.Duration);
index 5eb1a50..a0bddf6 100755 (executable)
@@ -89,8 +89,6 @@ namespace Tizen.NUI
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static readonly BindableProperty FlexGrowProperty = BindableProperty.CreateAttached("FlexGrow", typeof(float), typeof(FlexLayout), FlexUndefined, validateValue: (bindable, value) => (float)value >= 0, propertyChanged: OnChildPropertyChanged);
 
-        private static bool LayoutDebugFlex = false; // Debug flag
-
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         private bool swigCMemOwn;
         private bool disposed;
@@ -780,8 +778,7 @@ namespace Tizen.NUI
             LayoutLength flexLayoutWidth = new LayoutLength(Interop.FlexLayout.GetWidth(swigCPtr));
             LayoutLength flexLayoutHeight = new LayoutLength(Interop.FlexLayout.GetHeight(swigCPtr));
 
-            Debug.WriteLineIf(LayoutDebugFlex, "FlexLayout OnMeasure width:" + flexLayoutWidth.AsRoundedValue()
-                                                + " height:" + flexLayoutHeight.AsRoundedValue());
+            NUILog.Debug("FlexLayout OnMeasure width:" + flexLayoutWidth.AsRoundedValue() + " height:" + flexLayoutHeight.AsRoundedValue());
 
             SetMeasuredDimensions(GetDefaultSize(flexLayoutWidth, widthMeasureSpec),
                                    GetDefaultSize(flexLayoutHeight, heightMeasureSpec));
index d091116..1ed275b 100755 (executable)
@@ -39,8 +39,6 @@ namespace Tizen.NUI
     /// </summary>
     public class LayoutItem : IDisposable
     {
-        static bool LayoutDebugFrameData = false; // Debug flag
-
         private bool disposed = false;
         private MeasureSpecification oldWidthMeasureSpec; // Store measure specification to compare against later
         private MeasureSpecification oldHeightMeasureSpec; // Store measure specification to compare against later
@@ -562,7 +560,7 @@ namespace Tizen.NUI
                 // Store new layout position data
                 layoutPositionData = new LayoutData(this, ConditionForAnimation, left, top, right, bottom);
 
-                Debug.WriteLineIf(LayoutDebugFrameData, "LayoutItem FramePositionData View:" + layoutPositionData.Item.Owner.Name +
+                NUILog.Debug("LayoutItem FramePositionData View:" + layoutPositionData.Item.Owner.Name +
                                                          " left:" + layoutPositionData.Left +
                                                          " top:" + layoutPositionData.Top +
                                                          " right:" + layoutPositionData.Right +