[DALi][DOC-213] Update Thread Architecture
authorYoonsang Lee <ysang114.lee@samsung.com>
Fri, 17 Jul 2015 07:15:50 +0000 (16:15 +0900)
committerYoonsang Lee <ysang114.lee@samsung.com>
Fri, 17 Jul 2015 08:04:46 +0000 (17:04 +0900)
Signed-off-by: Yoonsang Lee <ysang114.lee@samsung.com>
Change-Id: I80b3f896e92a8c515e9538c5d1a28f193e08afe5

org.tizen.ui.guides/html/images/dali_threads.png [new file with mode: 0644]
org.tizen.ui.guides/html/native/dali/threads_n.htm

diff --git a/org.tizen.ui.guides/html/images/dali_threads.png b/org.tizen.ui.guides/html/images/dali_threads.png
new file mode 100644 (file)
index 0000000..997d238
Binary files /dev/null and b/org.tizen.ui.guides/html/images/dali_threads.png differ
index e90ea6d..c78457a 100755 (executable)
@@ -11,7 +11,7 @@
        <script type="text/javascript" src="../../scripts/core.js" charset="utf-8"></script>\r
        <script type="text/javascript" src="../../scripts/search.js" charset="utf-8"></script>\r
 \r
-       <title>Properties: Accessing to Properties of DALi Objects</title>  \r
+       <title>Thread Architecture: High-Performance Multi-Threaded Architecture of DALi</title>  \r
 </head>\r
 \r
 <body onload="prettyPrint()" style="overflow: auto;">\r
 </div> \r
 \r
 <div id="container"><div id="contents"><div class="content">\r
-<h1>Properties: Accessing to Properties of DALi Objects</h1>\r
+<h1>Thread Architecture: High-Performance Multi-Threaded Architecture of DALi</h1>\r
 \r
-<h1>GetCurrentPosition()</h1>\r
-\r
-<p>A property is a value used by an object that can be modified or read via <span style="font-family: Courier New,Courier,monospace;">Dali::Handle::GetProperty()</span> / <span style="font-family: Courier New,Courier,monospace;">SetProperty()</span> API.</p>\r
-\r
-<p>The difference between properties and ordinary C++ member variables is that a property can be dynamically added to or removed from an existing object in runtime, which enables more flexible, script-like programming with DALi.</p>\r
-\r
-<p><span style="font-family: Courier New,Courier,monospace;">Dali::Handle</span> (in <a href="../../../../org.tizen.native.mobile.apireference/classDali_1_1Layer.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/classDali_1_1Layer.html">wearable</a>) provides methods to manage properties, thus the DALi classes that inherit from <span style="font-family: Courier New,Courier,monospace;">Dali::Handle</span> (most of classes that users would use) have a number of predefined properties and can have any number of user-defined custom properties.\r
-</p>\r
-\r
-<h2 id="access" name="access">Accessing to Properties</h2>\r
-\r
-       <p>Properties of an object usually can be accessed via two ways: by its class member functions or by property getters/setters (<span style="font-family: Courier New,Courier,monospace;">Dali::Handle::GetProperty()</span> / <span style="font-family: Courier New,Courier,monospace;">SetProperty()</span>).</p>\r
-       <p>For example, <span style="font-family: Courier New,Courier,monospace;">Dali::Actor</span> has following predefined properties:</p>\r
-\r
-       <table>\r
-               <caption>\r
-                       Table: Properties of Dali::Actor\r
-               </caption>\r
-               <tbody>\r
-               <tr>\r
-                       <th>Property Index (enumeration)</th>\r
-                       <th>Member Functions</th>\r
-               </tr>\r
-               <tr>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::POSITION</span></td>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::GetCurrentPosition()</span> / <span style="font-family: Courier New,Courier,monospace;">SetPosition()</span></td>\r
-               </tr>\r
-               <tr>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::ORIENTATION</span></td>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::GetCurrentOrientation()</span> / <span style="font-family: Courier New,Courier,monospace;">SetOrientation()</span></td>\r
-               </tr>\r
-               <tr>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::SIZE</span></td>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::GetCurrentSize()</span> / <span style="font-family: Courier New,Courier,monospace;">SetSize()</span></td>\r
-               </tr>\r
-               <tr>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::COLOR</span></td>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::GetCurrentColor()</span> / <span style="font-family: Courier New,Courier,monospace;">SetColor()</span></td>\r
-               </tr>\r
-               <tr>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::NAME</span></td>\r
-                       <td><span style="font-family: Courier New,Courier,monospace;">Dali::Actor::GetName()</span> / <span style="font-family: Courier New,Courier,monospace;">SetName()</span></td>\r
-               </tr>\r
-               <tr>\r
-                       <td>...</td>\r
-                       <td>...</td>\r
-               </tr>\r
-               </tbody>\r
-       </table>\r
-\r
-       You can access them in both ways:\r
-\r
-       <pre class="prettyprint">\r
-Actor actor = Actor::New();\r
-actor.SetName("test actor");\r
-std::cout &lt;&lt; actor.GetName() &lt;&lt; std::endl;  // "test actor"\r
-</pre>\r
-\r
-       <pre class="prettyprint">\r
-Actor actor = Actor::New();\r
-actor.SetProperty( Actor::Property::NAME, "test actor" );\r
-std::cout &lt;&lt; actor.GetProperty( Actor::Property::NAME ) &lt;&lt; std::endl;  // "test actor"\r
-std::cout &lt;&lt; actor.GetProperty&lt;std::string&gt;( Actor::Property::NAME ) &lt;&lt; std::endl;  // "test actor"\r
-std::cout &lt;&lt; actor.GetProperty( Actor::Property::NAME ).Get&lt;std::string&gt;() &lt;&lt; std::endl;  // "test actor"\r
-</pre>\r
-\r
-<h2 id="usage" name="usage">Usages of Properties</h2>\r
-\r
-<h3>Registering User-Defined Custom Properties to an Object</h3>\r
-\r
-<p>Properties can be registered / unregistered in runtime, which enables script-like programming of DALi application, for example, adding custom member data to an instance of a DALi class without subclassing the class or maintaining another pool of custom data.</p>\r
-<p>For example, you can set your own custom data to PushButton objects and use them later when the buttons are clicked like:</p>\r
-<pre class="prettyprint">\r
-  void Create( Application&amp; application )\r
-  {\r
-    for( int i=0; i&lt;5; ++i )\r
-    {\r
-      Toolkit::PushButton button = Toolkit::PushButton::New();\r
-      button.SetSize( 100, 100 );\r
-      button.SetPosition( 100*i+50, 50 );\r
-      button.ClickedSignal().Connect( this, OnButtonClicked );\r
-\r
-      // Register a custom property having button index.\r
-      // Store the property index so you can look it up later.\r
-      // Note: This is much faster than looking the property up by property name and should always be used if possible.\r
-      // As all control types are the same (PushButtons) the indices to the unique custom property are all same.\r
-      Property::Value data( i );\r
-      mCustomDataIndex = button.RegisterProperty( "custom-data", data );\r
-\r
-      Stage::GetCurrent().Add(button);\r
-    }\r
-  }\r
-\r
-  bool OnButtonClicked(Toolkit::Button button)\r
-  {\r
-    // Look up the custom property by the stored property index.\r
-    // Note: If the property belongs to a control in another library, or we do not know the index, we can look the index up first with:\r
-    // Property::Index index = button.GetPropertyIndex( "custom-data" );\r
-    cout &lt;&lt; button.GetProperty( mCustomDataIndex ) &lt;&lt; endl;\r
-    return true;\r
-  }\r
-</pre>\r
-\r
-<h3>Animation</h3>\r
-\r
-<h3>Constraint</h3>\r
-\r
-\r
-\r
-types\r
-\r
-set/get add/remove\r
-\r
-constraint animation\r
+<p>DALi uses a multithreaded architecture in order to provide the best performance and scalability.</p>\r
+<ul>\r
+       <li><strong>Event Thread:</strong> The main thread in which application code and event handling runs.</li>\r
+       <li><strong>Update Thread:</strong> Updates the nodes on the scene as well as running animations and constraints.</li>\r
+       <li><strong>Render Thread:</strong> OpenGL drawing, texture and geometry uploading etc.</li>\r
+       <li><strong>Resource Thread:</strong> Loads images and decodes into bitmaps etc.</li>\r
+</ul>\r
 \r
+<p class="figure">Figure: DALi Thread Architecture</p>  \r
+       <p align="center"><img alt="Thread Architecture" src="../../images/dali_threads.png"/></p> \r
 \r
 \r
+       <!-- dali todo GetCurrentPosition() -->\r
 \r
     \r
 <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>\r