Update following the changes of Blending&Culling options
[platform/core/uifw/dali-demo.git] / examples / benchmark / benchmark.cpp
index f673c49..687f84b 100644 (file)
@@ -29,115 +29,115 @@ using namespace Dali::Toolkit;
 namespace
 {
 const char* IMAGE_PATH[] = {
-                            DALI_IMAGE_DIR "gallery-medium-1.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-2.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-3.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-4.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-5.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-6.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-7.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-8.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-9.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-10.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-11.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-12.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-13.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-14.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-15.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-16.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-17.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-18.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-19.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-20.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-21.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-22.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-23.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-24.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-25.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-26.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-27.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-28.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-29.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-30.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-31.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-32.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-33.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-34.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-35.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-36.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-37.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-38.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-39.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-40.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-41.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-42.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-43.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-44.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-45.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-46.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-47.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-48.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-49.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-50.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-51.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-52.jpg",
-                            DALI_IMAGE_DIR "gallery-medium-53.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-1.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-2.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-3.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-4.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-5.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-6.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-7.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-8.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-9.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-10.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-11.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-12.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-13.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-14.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-15.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-16.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-17.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-18.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-19.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-20.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-21.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-22.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-23.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-24.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-25.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-26.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-27.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-28.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-29.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-30.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-31.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-32.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-33.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-34.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-35.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-36.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-37.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-38.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-39.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-40.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-41.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-42.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-43.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-44.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-45.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-46.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-47.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-48.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-49.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-50.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-51.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-52.jpg",
+                            DEMO_IMAGE_DIR "gallery-medium-53.jpg",
 };
 
 const char* NINEPATCH_IMAGE_PATH[] = {
-                            DALI_IMAGE_DIR "selection-popup-bg.1.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.2.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.3.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.4.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.5.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.6.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.7.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.8.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.9.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.10.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.11.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.12.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.13.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.14.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.15.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.16.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.17.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.18.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.19.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.20.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.21.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.22.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.23.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.24.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.25.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.26.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.27.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.28.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.29.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.30.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.31.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.32.9.png",
-                            DALI_IMAGE_DIR "selection-popup-bg.33.9.png",
-                            DALI_IMAGE_DIR "button-disabled.9.png",
-                            DALI_IMAGE_DIR "button-down.9.png",
-                            DALI_IMAGE_DIR "button-down-disabled.9.png",
-                            DALI_IMAGE_DIR "button-up-1.9.png",
-                            DALI_IMAGE_DIR "button-up-2.9.png",
-                            DALI_IMAGE_DIR "button-up-3.9.png",
-                            DALI_IMAGE_DIR "button-up-4.9.png",
-                            DALI_IMAGE_DIR "button-up-5.9.png",
-                            DALI_IMAGE_DIR "button-up-6.9.png",
-                            DALI_IMAGE_DIR "button-up-7.9.png",
-                            DALI_IMAGE_DIR "button-up-8.9.png",
-                            DALI_IMAGE_DIR "button-up-9.9.png",
-                            DALI_IMAGE_DIR "button-up-10.9.png",
-                            DALI_IMAGE_DIR "button-up-11.9.png",
-                            DALI_IMAGE_DIR "button-up-12.9.png",
-                            DALI_IMAGE_DIR "button-up-13.9.png",
-                            DALI_IMAGE_DIR "button-up-14.9.png",
-                            DALI_IMAGE_DIR "button-up-15.9.png",
-                            DALI_IMAGE_DIR "button-up-16.9.png",
-                            DALI_IMAGE_DIR "button-up-17.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.1.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.2.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.3.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.4.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.5.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.6.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.7.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.8.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.9.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.10.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.11.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.12.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.13.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.14.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.15.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.16.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.17.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.18.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.19.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.20.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.21.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.22.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.23.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.24.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.25.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.26.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.27.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.28.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.29.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.30.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.31.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.32.9.png",
+                            DEMO_IMAGE_DIR "selection-popup-bg.33.9.png",
+                            DEMO_IMAGE_DIR "button-disabled.9.png",
+                            DEMO_IMAGE_DIR "button-down.9.png",
+                            DEMO_IMAGE_DIR "button-down-disabled.9.png",
+                            DEMO_IMAGE_DIR "button-up-1.9.png",
+                            DEMO_IMAGE_DIR "button-up-2.9.png",
+                            DEMO_IMAGE_DIR "button-up-3.9.png",
+                            DEMO_IMAGE_DIR "button-up-4.9.png",
+                            DEMO_IMAGE_DIR "button-up-5.9.png",
+                            DEMO_IMAGE_DIR "button-up-6.9.png",
+                            DEMO_IMAGE_DIR "button-up-7.9.png",
+                            DEMO_IMAGE_DIR "button-up-8.9.png",
+                            DEMO_IMAGE_DIR "button-up-9.9.png",
+                            DEMO_IMAGE_DIR "button-up-10.9.png",
+                            DEMO_IMAGE_DIR "button-up-11.9.png",
+                            DEMO_IMAGE_DIR "button-up-12.9.png",
+                            DEMO_IMAGE_DIR "button-up-13.9.png",
+                            DEMO_IMAGE_DIR "button-up-14.9.png",
+                            DEMO_IMAGE_DIR "button-up-15.9.png",
+                            DEMO_IMAGE_DIR "button-up-16.9.png",
+                            DEMO_IMAGE_DIR "button-up-17.9.png",
 };
 
 const unsigned int NUM_IMAGES = sizeof(IMAGE_PATH) / sizeof(char*);
@@ -207,7 +207,7 @@ Geometry& QuadMesh()
 }
 
 bool gUseMesh(false);
-bool gUseImageView(false);
+bool gUseImageActor(false);
 bool gNinePatch(false);
 unsigned int gRowsPerPage(25);
 unsigned int gColumnsPerPage( 25 );
@@ -225,11 +225,10 @@ Renderer CreateRenderer( unsigned int index )
 
     const char* imagePath = !gNinePatch ? IMAGE_PATH[index] : NINEPATCH_IMAGE_PATH[index];
     Image image = ResourceImage::New(imagePath);
-    Sampler textureSampler = Sampler::New( image, "sTexture" );
     Material material = Material::New( shader );
-    material.AddSampler(textureSampler);
-    material.SetBlendMode( BlendingMode::OFF );
+    material.AddTexture( image, "sTexture" );
     renderers[index] = Renderer::New( QuadMesh(), material );
+    renderers[index].SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::OFF );
   }
   return renderers[index];
 }
@@ -244,13 +243,13 @@ Actor CreateMeshActor( unsigned int index)
 
 }
 // Test application to compare performance between ImageActor and ImageView
-// By default, the application consist of 10 pages of 25x25 ImageActors, this can be modified using the following command line arguments:
+// By default, the application consist of 10 pages of 25x25 Image views, this can be modified using the following command line arguments:
 // -r NumberOfRows  (Modifies the number of rows per page)
 // -c NumberOfColumns (Modifies the number of columns per page)
 // -p NumberOfPages (Modifies the nimber of pages )
-// --use-imageview ( Use ImageView instead of ImageActor )
+// --use-image-actor ( Use ImageActor instead of ImageView )
 // --use-mesh ( Use new renderer API (as ImageView) but shares renderers between actors when possible )
-// --use-nine-patch ( Use nine patch images )
+// --nine-patch ( Use nine patch images )
 
 //
 class Benchmark : public ConnectionTracker
@@ -291,13 +290,13 @@ public:
     {
       CreateMeshActors();
     }
-    else if( gUseImageView )
+    else if( gUseImageActor )
     {
-      CreateImageViews();
+      CreateImageActors();
     }
     else
     {
-      CreateImageActors();
+      CreateImageViews();
     }
 
     ShowAnimation();
@@ -339,8 +338,7 @@ public:
 
     for( size_t i(0); i<actorCount; ++i )
     {
-      Image image = ResourceImage::New(ImagePath(i));
-      mImageView[i] = ImageView::New(image);
+      mImageView[i] = ImageView::New(ImagePath(i));
       mImageView[i].SetSize(Vector3(0.0f,0.0f,0.0f));
       mImageView[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
       stage.Add(mImageView[i]);
@@ -408,15 +406,7 @@ public:
           duration = durationPerActor;
           delay = delayBetweenActors * count;
         }
-        if( gUseImageView )
-        {
-          mImageView[count].SetPosition( initialPosition );
-          mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
-          mImageView[count].SetOrientation( Quaternion( Radian(0.0f),Vector3::XAXIS));
-          mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
-          mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
-        }
-        else
+        if( gUseImageActor || gUseMesh )
         {
           mActor[count].SetPosition( initialPosition );
           mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
@@ -424,6 +414,14 @@ public:
           mShow.AnimateTo( Property( mActor[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
           mShow.AnimateTo( Property( mActor[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
         }
+        else
+        {
+          mImageView[count].SetPosition( initialPosition );
+          mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
+          mImageView[count].SetOrientation( Quaternion( Radian(0.0f),Vector3::XAXIS));
+          mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
+          mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
+        }
         ++count;
       }
     }
@@ -440,20 +438,20 @@ public:
     size_t actorCount( mRowsPerPage*mColumnsPerPage*mPageCount);
     for( size_t i(0); i<actorCount; ++i )
     {
-      if( gUseImageView )
-      {
-        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(0.0f,3.0f));
-        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(3.0f,3.0f));
-        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(6.0f,2.0f));
-        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3( 12.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(8.0f,2.0f));
-      }
-      else
+      if( gUseImageActor || gUseMesh )
       {
         mScroll.AnimateBy( Property( mActor[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(0.0f,3.0f));
         mScroll.AnimateBy( Property( mActor[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(3.0f,3.0f));
         mScroll.AnimateBy( Property( mActor[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(6.0f,2.0f));
         mScroll.AnimateBy( Property( mActor[i], Actor::Property::POSITION), Vector3( 12.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(8.0f,2.0f));
       }
+      else
+      {
+        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(0.0f,3.0f));
+        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(3.0f,3.0f));
+        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3(-4.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(6.0f,2.0f));
+        mScroll.AnimateBy( Property( mImageView[i], Actor::Property::POSITION), Vector3( 12.0f*stageSize.x,0.0f, 0.0f), AlphaFunction::EASE_OUT, TimePeriod(8.0f,2.0f));
+      }
     }
     mScroll.Play();
     mScroll.FinishedSignal().Connect( this, &Benchmark::OnAnimationEnd );
@@ -467,6 +465,7 @@ public:
 
     unsigned int totalColumns = mColumnsPerPage * mPageCount;
 
+    float finalZ = Dali::Stage::GetCurrent().GetRenderTaskList().GetTask(0).GetCameraActor().GetCurrentWorldPosition().z;
     float totalDuration( 5.0f);
     float durationPerActor( 0.5f );
     float delayBetweenActors = ( totalDuration - durationPerActor) / (mRowsPerPage*mColumnsPerPage);
@@ -482,15 +481,15 @@ public:
           delay = delayBetweenActors * count;
         }
 
-        if( gUseImageView )
+        if( gUseImageActor || gUseMesh )
         {
-          mHide.AnimateTo( Property( mImageView[count], Actor::Property::ORIENTATION),  Quaternion( Radian( Degree( 70.0f ) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT, TimePeriod( delay, duration ));
-          mHide.AnimateBy( Property( mImageView[count], Actor::Property::POSITION_Z), 1000.0f, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay +delayBetweenActors*actorsPerPage + duration, duration ));
+          mHide.AnimateTo( Property( mActor[count], Actor::Property::ORIENTATION),  Quaternion( Radian( Degree( 70.0f ) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT, TimePeriod( delay, duration ));
+          mHide.AnimateBy( Property( mActor[count], Actor::Property::POSITION_Z), finalZ, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay +delayBetweenActors*actorsPerPage + duration, duration ));
         }
         else
         {
-          mHide.AnimateTo( Property( mActor[count], Actor::Property::ORIENTATION),  Quaternion( Radian( Degree( 70.0f ) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT, TimePeriod( delay, duration ));
-          mHide.AnimateBy( Property( mActor[count], Actor::Property::POSITION_Z), 1000.0f, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay +delayBetweenActors*actorsPerPage + duration, duration ));
+          mHide.AnimateTo( Property( mImageView[count], Actor::Property::ORIENTATION),  Quaternion( Radian( Degree( 70.0f ) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT, TimePeriod( delay, duration ));
+          mHide.AnimateBy( Property( mImageView[count], Actor::Property::POSITION_Z), finalZ, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay +delayBetweenActors*actorsPerPage + duration, duration ));
         }
         ++count;
       }
@@ -536,9 +535,9 @@ int main( int argc, char **argv )
     {
       gUseMesh = true;
     }
-    else if( arg.compare("--use-imageview") == 0)
+    else if( arg.compare("--use-image-actor") == 0)
     {
-      gUseImageView = true;
+      gUseImageActor = true;
     }
     else if( arg.compare("--nine-patch" ) == 0)
     {