This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch feature/layout-optimization
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 24debea5e61dfc601b3e473285bda1fbe9502741
Author: Harbs <[email protected]>
AuthorDate: Mon Mar 26 18:51:11 2018 +0300

    More ignore coercions
    
    This seems to make a measureable difference in performance. This is likely 
mostly from the changes to SimpleCSSValuesImpl.
---
 .../royale/org/apache/royale/core/Application.as   |  1 +
 .../royale/core/ContainerBaseStrandChildren.as     |  1 +
 .../org/apache/royale/core/DataContainerBase.as    |  3 +++
 .../royale/org/apache/royale/core/GroupBase.as     |  1 +
 .../org/apache/royale/core/HTMLElementWrapper.as   | 12 ++++++++++-
 .../royale/org/apache/royale/core/ImageBase.as     |  3 +++
 .../royale/org/apache/royale/core/LayoutBase.as    |  4 +++-
 .../royale/org/apache/royale/core/BeadViewBase.as  |  1 +
 .../org/apache/royale/core/ElementWrapper.as       |  4 +++-
 .../royale/org/apache/royale/core/ImageViewBase.as | 11 +++++++++-
 .../apache/royale/core/ItemRendererClassFactory.as |  2 ++
 .../org/apache/royale/core/ParentDocumentBead.as   |  1 +
 .../org/apache/royale/core/SimpleCSSValuesImpl.as  |  2 ++
 .../main/royale/org/apache/royale/core/Strand.as   |  7 +++++--
 .../royale/core/StatesWithTransitionsImpl.as       | 22 ++++++++++++++++++++
 .../org/apache/royale/utils/MockLayoutChild.as     | 21 +++++++++++++++++++
 .../org/apache/royale/utils/MockLayoutParent.as    | 24 ++++++++++++++++++++++
 17 files changed, 114 insertions(+), 6 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/Application.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/Application.as
index 39fbee9..fa1323d 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/Application.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/Application.as
@@ -644,6 +644,7 @@ package org.apache.royale.core
                
                /**
                 * @royaleignorecoercion org.apache.royale.core.IBead
+         * @royaleignorecoercion org.apache.royale.core.UIBase
                 */
                COMPILE::JS
                protected function initialize():void
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
index dc7cd8c..ef4f8bf 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ContainerBaseStrandChildren.as
@@ -40,6 +40,7 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
+                *      @royaleignorecoercion 
org.apache.royale.core.IStrandPrivate
          */
                public function ContainerBaseStrandChildren(owner:IParent)
                {
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
index f421e0a..af014c1 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/DataContainerBase.as
@@ -102,6 +102,7 @@ package org.apache.royale.core
                 *  @playerversion Flash 10.2
                 *  @playerversion AIR 2.6
                 *  @productversion Royale 0.0
+                *      @royaleignorecoercion 
org.apache.royale.html.beads.IListView
                 */
                public function get dataGroup():IItemRendererParent
                {
@@ -243,6 +244,7 @@ package org.apache.royale.core
                 *  @playerversion Flash 10.2
                 *  @playerversion AIR 2.6
                 *  @productversion Royale 0.8
+                *      @royaleignorecoercion 
org.apache.royale.core.IItemRenderer
                 */
                public function getItemRendererForIndex(index:int):IItemRenderer
                {
@@ -258,6 +260,7 @@ package org.apache.royale.core
                 *  @playerversion Flash 10.2
                 *  @playerversion AIR 2.6
                 *  @productversion Royale 0.8
+                *      @royaleignorecoercion 
org.apache.royale.html.supportClasses.DataItemRenderer
                 */
                public function updateAllItemRenderers():void
                {
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/GroupBase.as 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/GroupBase.as
index 71874de..241afc5 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/GroupBase.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/GroupBase.as
@@ -151,6 +151,7 @@ package org.apache.royale.core
                 *  @playerversion Flash 10.2
                 *  @playerversion AIR 2.6
                 *  @productversion Royale 0.8
+         *  @royaleignorecoercion org.apache.royale.core.ILayoutHost
                 */
                public function getLayoutHost():ILayoutHost
                {
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
index 7228fbc..a4d084f 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as
@@ -142,7 +142,7 @@ package org.apache.royale.core
         
         /**
          * @royaleignorecoercion Class 
-         * @royaleignorecoercion org.apache.royale.core.IBeadModel 
+         * @royaleignorecoercion org.apache.royale.core.IBeadModel
          */
         public function get model():Object
         {
@@ -157,6 +157,9 @@ package org.apache.royale.core
             return _model;
         }
         
+        /**
+         * @royaleignorecoercion org.apache.royale.core.IBead
+         */
         [Bindable("modelChanged")]
         public function set model(value:Object):void
         {
@@ -178,6 +181,7 @@ package org.apache.royale.core
 
         /**
          * @param bead The new bead.
+         * @royaleignorecoercion org.apache.royale.core.IBeadModel 
          */
                public function addBead(bead:IBead):void
                {
@@ -275,6 +279,9 @@ package org.apache.royale.core
             return goog.events.hasListener(source, type);
         }
 
+        /**
+         * @royaleignorecoercion String
+         */
         override public function dispatchEvent(e:Object):Boolean
         {
             var eventType:String = "";
@@ -306,6 +313,9 @@ package org.apache.royale.core
             return source.dispatchEvent(e);
         }
                
+        /**
+         * @royaleignorecoercion org.apache.royale.events.IEventDispatcher
+         */
                public function dispatchBubblingEvent(source:Object, 
e:Object):Boolean
                {
                        // build the ancestors tree without setting the actual 
parentEventTarget
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ImageBase.as 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ImageBase.as
index ad278d5..c9dd75b 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ImageBase.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/ImageBase.as
@@ -62,6 +62,9 @@ package org.apache.royale.core
                {
                        return (model as IImageModel).url;
                }
+               /**
+                * @royaleignorecoercion org.apache.royale.core.IImageModel
+                */
                public function set src(value:String):void
                {
                        (model as IImageModel).url = value;
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
index 5a175e7..d48c414 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/LayoutBase.as
@@ -152,6 +152,7 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.8
+                *  @royaleignorecoercion org.apache.royale.core.ILayoutParent
                 */
                protected function childResizeHandler(event:Event):void
                {
@@ -303,6 +304,7 @@ package org.apache.royale.core
          *  @productversion Royale 0.8
                 * @royaleignorecoercion org.apache.royale.core.ILayoutParent
                 * @royaleignorecoercion org.apache.royale.core.UIBase
+                * @royaleignorecoercion 
org.apache.royale.events.IEventDispatcher
                 */
                public function performLayout():void
                {
@@ -324,7 +326,7 @@ package org.apache.royale.core
                                        
                                        isLayoutRunning = false;
                                        
-                                       
IEventDispatcher(host).dispatchEvent(new Event("layoutComplete"));
+                                       host.dispatchEvent(new 
Event("layoutComplete"));
                                        
                                        // check sizes to see if layout changed 
the size or not
                                        // and send an event to re-layout 
parent of host
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BeadViewBase.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BeadViewBase.as
index 4f7107c..9d42a0c 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BeadViewBase.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/BeadViewBase.as
@@ -88,6 +88,7 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.IUIBase
          */
         public function get host():IUIBase
         {
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ElementWrapper.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ElementWrapper.as
index 3a75c59..60a352c 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ElementWrapper.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ElementWrapper.as
@@ -335,7 +335,9 @@ package org.apache.royale.core
             
             return goog.events.hasListener(source, type);
         }
-
+        /**
+         * @royaleignorecoercion String
+         */
         override public function dispatchEvent(e:Object):Boolean
         {
             var eventType:String = "";
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ImageViewBase.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ImageViewBase.as
index 32e9a8a..49ab77f 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ImageViewBase.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ImageViewBase.as
@@ -84,7 +84,8 @@ package org.apache.royale.core
                 *  @langversion 3.0
                 *  @playerversion Flash 10.2
                 *  @playerversion AIR 2.6
-                *  @productversion Royale 0.0
+                *  @productversion Royale 0.9
+         *  @royaleignorecoercion org.apache.royale.core.IImageModel
                 */
                override public function set strand(value:IStrand):void
                {
@@ -145,6 +146,10 @@ package org.apache.royale.core
                
         COMPILE::JS
         private var _sizeHandlerSet:Boolean;
+
+        /**
+         * @royaleignorecoercion org.apache.royale.core.IUIBase
+         */
         COMPILE::JS
                public function setupLoader():void
         {
@@ -211,6 +216,9 @@ package org.apache.royale.core
                        }
                }
         
+        /**
+         * @royaleignorecoercion org.apache.royale.core.IUIBase
+         */
         COMPILE::JS
         protected function loadHandler(event:Object):void
         {
@@ -221,6 +229,7 @@ package org.apache.royale.core
         
         /**
          * @royaleignorecoercion HTMLElement
+         * @royaleignorecoercion org.apache.royale.core.IUIBase
          */
         COMPILE::JS
         protected function sizeChangedHandler(event:Object):void
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
index ebaf78a..1d44130 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ItemRendererClassFactory.as
@@ -65,6 +65,7 @@ package org.apache.royale.core
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
          *  @royaleignorecoercion Class
+         *  @royaleignorecoercion org.apache.royale.core.IItemRendererProvider
          */
         public function set strand(value:IStrand):void
         {
@@ -150,6 +151,7 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.IParent
          */
         protected function 
createFromMXMLContent(parent:IItemRendererParent):IItemRenderer
         {
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ParentDocumentBead.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ParentDocumentBead.as
index 843f726..76ffda1 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ParentDocumentBead.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/ParentDocumentBead.as
@@ -105,6 +105,7 @@ package org.apache.royale.core
         /**
          *  @private
          *  @royaleignorecoercion org.apache.royale.core.IChild
+         * @royaleignorecoercion org.apache.royale.core.IMXMLDocument
          */
         public function get parentDocument():Object
         {
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
index fc62fbe..4f0e479 100644
--- 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
+++ 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/SimpleCSSValuesImpl.as
@@ -340,6 +340,8 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.core.IStyleableObject
+         *  @royaleignorecoercion org.apache.royale.core.IChild
          */
                public function getValue(thisObject:Object, valueName:String, 
state:String = null, attrs:Object = null):*
                {
diff --git 
a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/Strand.as 
b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/Strand.as
index 25f8260..a608762 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/Strand.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/Strand.as
@@ -56,7 +56,8 @@ package org.apache.royale.core
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
+         *  @productversion Royale 0.9
+         *  @royaleignorecoercion org.apache.royale.core.IBead
          */
                public function get model():IBeadModel
                {
@@ -70,6 +71,7 @@ package org.apache.royale.core
         
         /**
          *  @private
+         *  @royaleignorecoercion org.apache.royale.core.IBead
          */
                public function set model(value:IBeadModel):void
                {
@@ -127,7 +129,8 @@ package org.apache.royale.core
          *  @langversion 3.0
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
-         *  @productversion Royale 0.0
+         *  @productversion Royale 0.9
+         *  @royaleignorecoercion org.apache.royale.core.IBeadModel
          */
                public function addBead(bead:IBead):void
                {
diff --git 
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
 
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
index 3346ca5..fb09826 100644
--- 
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
+++ 
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
@@ -73,6 +73,7 @@ package org.apache.royale.core
          *  @playerversion Flash 10.2
          *  @playerversion AIR 2.6
          *  @productversion Royale 0.0
+         *  @royaleignorecoercion org.apache.royale.events.IEventDispatcher
          */
         public function set strand(value:IStrand):void
         {
@@ -192,6 +193,10 @@ package org.apache.royale.core
             }
         }
         
+        /**
+         * @royaleignorecoercion Array
+         * @royaleignorecoercion org.apache.royale.states.AddItems
+         */
         private function isItemInState(child:IChild, s:State):Boolean
         {
             if (s == null) return false;
@@ -223,6 +228,14 @@ package org.apache.royale.core
             return false;
         }
         
+        /**
+         * @royaleignorecoercion Array
+         * @royaleignorecoercion org.apache.royale.states.AddItems
+         * @royaleignorecoercion org.apache.royale.core.IParent
+         * @royaleignorecoercion org.apache.royale.core.IContainer
+         * @royaleignorecoercion org.apache.royale.states.SetProperty
+         * @royaleignorecoercion org.apache.royale.states.SetEventHandler
+         */
         private function revert(s:State, newState:State):void
         {
             var arr:Array = s.overrides;
@@ -267,6 +280,15 @@ package org.apache.royale.core
             }
         }
         
+        /**
+         * @royaleignorecoercion Array
+         * @royaleignorecoercion org.apache.royale.states.AddItems
+         * @royaleignorecoercion org.apache.royale.core.IChild
+         * @royaleignorecoercion org.apache.royale.core.IParent
+         * @royaleignorecoercion org.apache.royale.core.IContainer
+         * @royaleignorecoercion org.apache.royale.states.SetProperty
+         * @royaleignorecoercion org.apache.royale.states.SetEventHandler
+         */
         private function apply(oldState:State, s:State):void
         {
             var arr:Array = s.overrides;
diff --git 
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutChild.as
 
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutChild.as
index 7004fe1..2402763 100644
--- 
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutChild.as
+++ 
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutChild.as
@@ -138,6 +138,27 @@ package org.apache.royale.utils
                {
                        _explicitWidth = value;
                }
+               private var _measuredWidth:Number;
+               public function get measuredWidth():Number
+               {
+                       return _measuredWidth;
+               }
+
+               public function set measuredWidth(value:Number):void
+               {
+                       _measuredWidth = value;
+
+               }
+               private var _measuredHeight:Number;
+               public function get measuredHeight():Number
+               {
+                       return _measuredHeight;
+               }
+
+               public function set measuredHeight(value:Number):void
+               {
+                       _measuredHeight = value;
+               }
 
                public function isWidthSizedToContent():Boolean
                {
diff --git 
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutParent.as
 
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutParent.as
index bb4a5a9..8c26ed2 100644
--- 
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutParent.as
+++ 
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/utils/MockLayoutParent.as
@@ -130,6 +130,30 @@ package org.apache.royale.utils
 
                }
 
+               public function get measuredWidth():Number
+               {
+                       // TODO Auto Generated method stub
+                       return 0;
+               }
+
+               public function set measuredWidth(value:Number):void
+               {
+                       // TODO Auto Generated method stub
+
+               }
+
+               public function get measuredHeight():Number
+               {
+                       // TODO Auto Generated method stub
+                       return 0;
+               }
+
+               public function set measuredHeight(value:Number):void
+               {
+                       // TODO Auto Generated method stub
+
+               }
+
                public function get x():Number
                {
                        // TODO Auto Generated method stub

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to