Remove incorrect empty Actor handle parameter from Visuals DoInitialize
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / image / batch-image-visual.cpp
index 1ce668b..eecef34 100644 (file)
@@ -27,7 +27,6 @@
 #include <dali/public-api/images/pixel-data.h>
 #include <dali/public-api/rendering/texture.h>
 #include <dali/public-api/rendering/texture-set.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
 #include <dali/public-api/rendering/texture-set.h>
 
 // INTERNAL HEADER
@@ -86,11 +85,16 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   }\n
 );
 
-} //unnamed namespace
+} // unnamed namespace
+
+BatchImageVisualPtr BatchImageVisual::New( VisualFactoryCache& factoryCache )
+{
+  return new BatchImageVisual( factoryCache );
+}
 
 BatchImageVisual::BatchImageVisual( VisualFactoryCache& factoryCache )
-  : Visual::Base( factoryCache ),
-    mDesiredSize()
+: Visual::Base( factoryCache ),
+  mDesiredSize()
 {
 }
 
@@ -98,7 +102,7 @@ BatchImageVisual::~BatchImageVisual()
 {
 }
 
-void BatchImageVisual::DoInitialize( Actor& actor, const Property::Map& propertyMap )
+void BatchImageVisual::DoSetProperties( const Property::Map& propertyMap )
 {
   std::string oldImageUrl = mImageUrl;
   Property::Value* imageURLValue = propertyMap.Find( Dali::Toolkit::ImageVisual::Property::URL, Dali::Toolkit::Internal::IMAGE_URL_NAME );
@@ -123,25 +127,6 @@ void BatchImageVisual::DoInitialize( Actor& actor, const Property::Map& property
 
     mDesiredSize = ImageDimensions( desiredWidth, desiredHeight );
   }
-
-  // Remove old renderer if exit.
-  if( mImpl->mRenderer )
-  {
-    if( actor ) // Remove old renderer from actor.
-    {
-      actor.RemoveRenderer( mImpl->mRenderer );
-    }
-    if( !oldImageUrl.empty() ) // Clean old renderer from cache.
-    {
-      CleanCache( oldImageUrl );
-    }
-  }
-
-  // If actor is on stage, create new renderer and apply to actor.
-  if( actor && actor.OnStage() )
-  {
-    SetOnStage( actor );
-  }
 }
 
 void BatchImageVisual::SetSize( const Vector2& size )
@@ -260,6 +245,17 @@ void BatchImageVisual::DoCreatePropertyMap( Property::Map& map ) const
   }
 }
 
+void BatchImageVisual::DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue )
+{
+  // TODO
+}
+
+Dali::Property::Value BatchImageVisual::DoGetProperty( Dali::Property::Index index )
+{
+  // TODO
+  return Dali::Property::Value();
+}
+
 Shader BatchImageVisual::GetBatchShader( VisualFactoryCache& factoryCache )
 {
   Shader shader = factoryCache.GetShader( VisualFactoryCache::BATCH_IMAGE_SHADER );