From 1e4b47fa98946b2cf7efa62a30523be19555c827 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Mon, 10 Apr 2017 19:01:20 +0900 Subject: [PATCH] not use Dynamic due to slow performance Change-Id: Ib3150616e2ac80a7e9ee35765697f67a8cbb8c5b Signed-off-by: dongsug.song --- .../NUISamples/NUISamples.TizenTV/examples/Main.cs | 4 ++-- .../examples/visual-animation-test.cs | 4 ++-- src/Tizen.NUI/Tizen.NUI.csproj | 1 - src/Tizen.NUI/src/public/Animation.cs | 28 ++++++++++++---------- src/Tizen.NUI/src/public/VisualMaps.cs | 14 ++++++----- 5 files changed, 28 insertions(+), 23 deletions(-) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs index f3182cc..2dc91af 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/Main.cs @@ -29,9 +29,9 @@ namespace NUISamples.TizenTV.examples //new DatePickerUsingJson.Example().Run(args); //o //new DaliTest.Example().Run(args); //o //new MyCSharpExample.Example().Run(args); //o - //new FirstScreen.FirstScreenApp().Run(args); //o + new FirstScreen.FirstScreenApp().Run(args); //o //new MyCSharpExample.Example().Run(args); //o - new VisaulAnimationExample.Example().Run(args); + //new VisaulAnimationExample.Example().Run(args); //new VisualViewTest.Example().Run(args); //o } } diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs index e6bdcd9..f3e9115 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/visual-animation-test.cs @@ -171,7 +171,7 @@ namespace VisaulAnimationExample contentLayout.AddChild(VisualView2, new TableView.CellPosition(2, 0)); gifVisual = new AnimatedImageVisual(); - gifVisual.URL = _resPath + "/images/echo.gif"; + gifVisual.URL = _resPath + "/images/dog-anim.gif"; gifVisual.Size = new Size2D(200, 200); gifVisual.SizePolicy = new Vector2(1, 1); gifVisual.Position = new Position2D(0, 0); @@ -196,7 +196,7 @@ namespace VisaulAnimationExample } else { - gifVisual.URL = _resPath + "/images/dog-anim.gif"; + gifVisual.URL = _resPath + "/images/echo.gif"; } return true; }; diff --git a/src/Tizen.NUI/Tizen.NUI.csproj b/src/Tizen.NUI/Tizen.NUI.csproj index b9f10b4..67910c0 100755 --- a/src/Tizen.NUI/Tizen.NUI.csproj +++ b/src/Tizen.NUI/Tizen.NUI.csproj @@ -222,7 +222,6 @@ - diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index 5ecaf1e..1a70bdf 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -388,15 +388,16 @@ namespace Tizen.NUI throw new System.Exception("second argument string property is invalid parameter!"); } - dynamic obj = (object)relativeValue; + //dynamic obj = (object)relativeValue; + PropertyValue val = PropertyValue.CreateFromObject(relativeValue); if (alphaFunction != null) { - AnimateBy(_prop, new PropertyValue(obj), alphaFunction); + AnimateBy(_prop, new PropertyValue(val), alphaFunction); } else { - AnimateBy(_prop, new PropertyValue(obj)); + AnimateBy(_prop, new PropertyValue(val)); } } @@ -423,17 +424,18 @@ namespace Tizen.NUI throw new System.Exception("second argument string property is invalid parameter!"); } - dynamic obj = (object)relativeValue; + //dynamic obj = (object)relativeValue; + PropertyValue val = PropertyValue.CreateFromObject(relativeValue); if (alphaFunction != null) { Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime)); - AnimateBy(_prop, new PropertyValue(obj), alphaFunction, time); + AnimateBy(_prop, new PropertyValue(val), alphaFunction, time); } else { Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime)); - AnimateBy(_prop, new PropertyValue(obj), time); + AnimateBy(_prop, new PropertyValue(val), time); } } @@ -458,15 +460,16 @@ namespace Tizen.NUI throw new System.Exception("second argument string property is invalid parameter!"); } - dynamic obj = (object)destinationValue; + //dynamic obj = (object)destinationValue; + PropertyValue val = PropertyValue.CreateFromObject(destinationValue); if (alphaFunction != null) { - AnimateTo(_prop, new PropertyValue(obj), alphaFunction); + AnimateTo(_prop, new PropertyValue(val), alphaFunction); } else { - AnimateTo(_prop, new PropertyValue(obj)); + AnimateTo(_prop, new PropertyValue(val)); } } @@ -494,17 +497,18 @@ namespace Tizen.NUI throw new System.Exception("second argument string property is invalid parameter!"); } - dynamic obj = (object)destinationValue; + //dynamic obj = (object)destinationValue; + PropertyValue val = PropertyValue.CreateFromObject(destinationValue); if (alphaFunction != null) { Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime)); - AnimateTo(_prop, new PropertyValue(obj), alphaFunction, time); + AnimateTo(_prop, new PropertyValue(val), alphaFunction, time); } else { Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime)); - AnimateTo(_prop, new PropertyValue(obj), time); + AnimateTo(_prop, new PropertyValue(val), time); } } diff --git a/src/Tizen.NUI/src/public/VisualMaps.cs b/src/Tizen.NUI/src/public/VisualMaps.cs index fdacb8c..143c889 100755 --- a/src/Tizen.NUI/src/public/VisualMaps.cs +++ b/src/Tizen.NUI/src/public/VisualMaps.cs @@ -35,17 +35,17 @@ namespace Tizen.NUI private float _depthIndex = 0.0f; protected PropertyMap _outputVisualMap = null; - public string Name + internal string Name { set; get; } - public int VisualIndex + internal int VisualIndex { set; get; } - public VisualView Parent + internal VisualView Parent { set; get; @@ -216,7 +216,7 @@ namespace Tizen.NUI } } - public void UpdateVisual() + internal void UpdateVisual() { if (VisualIndex > 0) { @@ -1865,12 +1865,14 @@ namespace Tizen.NUI string _str1 = _propertyIndex.Substring(0, 1); string _str2 = _propertyIndex.Substring(1); string _str = _str1.ToLower() + _str2; - dynamic _obj = (object)_destinationValue; + + //dynamic _obj = (object)_destinationValue; + PropertyValue val = PropertyValue.CreateFromObject(_destinationValue); PropertyMap _transition = new PropertyMap(); _transition.Add("target", new PropertyValue(_target)); _transition.Add("property", new PropertyValue(_str)); - _transition.Add("targetValue", new PropertyValue(_obj)); + _transition.Add("targetValue", new PropertyValue(val)); _transition.Add("animator", new PropertyValue(_animator)); _outputVisualMap = _transition; -- 2.7.4