Temporary core API updates 52/36452/1
authorDavid Steele <david.steele@partner.samsung.com>
Mon, 2 Mar 2015 12:17:46 +0000 (12:17 +0000)
committerFrancisco Santos <f1.santos@samsung.com>
Fri, 6 Mar 2015 11:34:17 +0000 (11:34 +0000)
RendarableActor API has moved to ImageActor temporarily.
Updated toolkit to match.

Change-Id: I739a03d4e1f53a3290cd8f674110cf99c3669c24
Signed-off-by: David Steele <david.steele@partner.samsung.com>
dali-toolkit/internal/builder/builder-animations.cpp
dali-toolkit/internal/builder/builder-impl.cpp
dali-toolkit/internal/controls/text-view/relayout-utilities.cpp
dali-toolkit/internal/controls/text-view/text-view-impl.cpp
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp
dali-toolkit/public-api/shader-effects/motion-stretch-effect.cpp

index c1c8921..794b62a 100644 (file)
@@ -241,13 +241,13 @@ Animation CreateAnimation( const TreeNode& child, const Replacement& constant, D
         // to allow animating shader uniforms
         if( propIndex == Property::INVALID_INDEX )
         {
-          RenderableActor renderable = RenderableActor::DownCast( targetHandle );
-          if( renderable )
+          ImageActor imageActor = ImageActor::DownCast( targetHandle );
+          if( imageActor )
           {
             // A limitation here is that its possible that between creation of animation
             // and running it the ShaderEffect of the actor has been changed.
             // However this is a unlikely use case especially when using scripts.
-            if( ShaderEffect effect = renderable.GetShaderEffect() )
+            if( ShaderEffect effect = imageActor.GetShaderEffect() )
             {
               propIndex = effect.GetPropertyIndex( *property );
               if(propIndex != Property::INVALID_INDEX)
@@ -438,4 +438,3 @@ Animation CreateAnimation( const TreeNode& child, Builder* const builder )
 } // namespace Toolkit
 
 } // namespace Dali
-
index 1bd65a8..8a0e1dd 100644 (file)
@@ -273,7 +273,7 @@ void Builder::SetProperties( const TreeNode& node, Handle& handle, const Replace
       // special field 'effect' references the shader effect instances
       if(key == "effect")
       {
-        RenderableActor actor = RenderableActor::DownCast(handle);
+        ImageActor actor = ImageActor::DownCast(handle);
         if( actor )
         {
           OptionalString str = constant.IsString( keyChild.second );
@@ -297,7 +297,7 @@ void Builder::SetProperties( const TreeNode& node, Handle& handle, const Replace
 
       if( Property::INVALID_INDEX == index )
       {
-        RenderableActor actor = RenderableActor::DownCast(handle);
+        ImageActor actor = ImageActor::DownCast(handle);
         if( actor )
         {
           if( ShaderEffect effect = actor.GetShaderEffect() )
index 5cd83a0..f8ca367 100644 (file)
@@ -242,10 +242,10 @@ void SetVisualParameters( CurrentTextActorInfo& currentTextActorInfo,
   relayoutData.mTextLayoutInfo.mMaxItalicsOffset = std::max( relayoutData.mTextLayoutInfo.mMaxItalicsOffset, italicsOffset );
 
   // Sets the sort modifier value.
-  currentTextActorInfo.textActor.SetSortModifier( visualParameters.mSortModifier );
// currentTextActorInfo.textActor.SetSortModifier( visualParameters.mSortModifier );
 
   // Enables or disables the blending.
-  currentTextActorInfo.textActor.SetBlendMode( !visualParameters.mSnapshotModeEnabled ? BlendingMode::ON : BlendingMode::OFF );
// currentTextActorInfo.textActor.SetBlendMode( !visualParameters.mSnapshotModeEnabled ? BlendingMode::ON : BlendingMode::OFF );
 }
 
 void CalculateLineLayout( float parentWidth,
@@ -1895,7 +1895,7 @@ void CreateEmoticon( const TextView::VisualParameters& visualParameters,
   imageActor.SetSize( characterLayout.mSize );
 
   // Sets the sort modifier value.
-  imageActor.SetSortModifier( visualParameters.mSortModifier );
// imageActor.SetSortModifier( visualParameters.mSortModifier );
 
   characterLayout.mGlyphActor = imageActor;
 }
@@ -2248,10 +2248,10 @@ void UpdateTextActorInfo( const TextView::VisualParameters& visualParameters,
     glyphActor.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
 
     // Sets the sort modifier value.
-    glyphActor.SetSortModifier( visualParameters.mSortModifier );
+   // glyphActor.SetSortModifier( visualParameters.mSortModifier );
 
     // Enables or disables the blending.
-    glyphActor.SetBlendMode( !visualParameters.mSnapshotModeEnabled ? BlendingMode::ON : BlendingMode::OFF );
+   // glyphActor.SetBlendMode( !visualParameters.mSnapshotModeEnabled ? BlendingMode::ON : BlendingMode::OFF );
   }
 }
 
index 76d4539..5b3e460 100644 (file)
@@ -736,12 +736,12 @@ void TextView::SetSortModifier( float depthOffset )
        it != endIt;
        ++it )
   {
-    ( *it ).SetSortModifier( depthOffset );
+   // ( *it ).SetSortModifier( depthOffset );
   }
 
   if( mOffscreenImageActor )
   {
-    mOffscreenImageActor.SetSortModifier( depthOffset );
+   // mOffscreenImageActor.SetSortModifier( depthOffset );
   }
 }
 
index 207ffe6..b6554d1 100644 (file)
@@ -19,7 +19,7 @@
 #include "tool-bar-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/renderable-actor.h>
+#include <dali/public-api/actors/image-actor.h>
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/object/type-registry.h>
 
@@ -75,10 +75,10 @@ void ToolBar::SetBackground( Actor background )
   background.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER );
   background.SetSize( mToolBarSize );
 
-  RenderableActor renderableActor = RenderableActor::DownCast( background );
-  if ( renderableActor )
+  ImageActor imageActor = ImageActor::DownCast( background );
+  if ( imageActor )
   {
-    renderableActor.SetSortModifier( 1.f );
+    imageActor.SetSortModifier( 1.f );
   }
 
   Self().Add( background );
index 837fe15..11b4c30 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/animation/active-constraint.h>
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
+#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
@@ -84,7 +85,11 @@ MotionBlurEffect::~MotionBlurEffect()
 MotionBlurEffect MotionBlurEffect::Apply( RenderableActor renderable )
 {
   MotionBlurEffect newEffect = New( MOTION_BLUR_NUM_SAMPLES );
-  renderable.SetShaderEffect( newEffect );
+  ImageActor imageActor = ImageActor::DownCast(renderable);
+  if( imageActor )
+  {
+    imageActor.SetShaderEffect( newEffect );
+  }
 
   Dali::Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_BLUR_MODEL_LASTFRAME );
 
index de70fb5..bc69f72 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/animation/active-constraint.h>
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
+#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
@@ -98,7 +99,12 @@ MotionStretchEffect::~MotionStretchEffect()
 MotionStretchEffect MotionStretchEffect::Apply( RenderableActor renderable )
 {
   MotionStretchEffect newEffect = New();
-  renderable.SetShaderEffect( newEffect );
+
+  ImageActor imageActor = ImageActor::DownCast(renderable);
+  if( imageActor )
+  {
+    imageActor.SetShaderEffect( newEffect );
+  }
 
   Dali::Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_STRETCH_MODELVIEW_LASTFRAME );