Remove ResourceImage usage from demos
[platform/core/uifw/dali-demo.git] / examples / perf-scroll / perf-scroll.cpp
index 2835f79..f77d01f 100644 (file)
@@ -23,6 +23,8 @@
 #include <dali/integration-api/debug.h>
 #include <iostream>
 
+#include "shared/utility.h"
+
 using namespace Dali;
 using namespace Dali::Toolkit;
 
@@ -225,14 +227,13 @@ Renderer CreateRenderer( unsigned int index )
     Shader shader = Shader::New( VERTEX_SHADER_TEXTURE, FRAGMENT_SHADER_TEXTURE );
 
     const char* imagePath = !gNinePatch ? IMAGE_PATH[index] : NINEPATCH_IMAGE_PATH[index];
-    Image image = ResourceImage::New( imagePath );
+    Texture texture = DemoHelper::LoadTexture( imagePath );
 
     TextureSet textureSet = TextureSet::New();
-    textureSet.SetImage( 0u, image );
+    textureSet.SetTexture( 0u, texture );
     renderers[index] = Renderer::New( QuadMesh(), shader );
     renderers[index].SetTextures( textureSet );
-    renderers[index].SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::OFF );
-
+    renderers[index].SetProperty( Renderer::Property::BLEND_MODE, BlendMode::OFF );
   }
   return renderers[index];
 }
@@ -285,7 +286,7 @@ public:
     mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f );
 
     // Respond to a click anywhere on the stage
-    stage.GetRootLayer().TouchedSignal().Connect( this, &PerfScroll::OnTouch );
+    stage.GetRootLayer().TouchSignal().Connect( this, &PerfScroll::OnTouch );
 
     mParent = Actor::New();
     mParent.SetAnchorPoint( AnchorPoint::TOP_LEFT );
@@ -303,7 +304,7 @@ public:
     ShowAnimation();
   }
 
-  bool OnTouch( Actor actor, const TouchEvent& touch )
+  bool OnTouch( Actor actor, const TouchData& touch )
   {
     // quit the application
     mApplication.Quit();
@@ -496,7 +497,7 @@ void RunTest( Application& application )
 
 // Entry point for Linux & Tizen applications
 //
-int main( int argc, char **argv )
+int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv );