[3.0] Modified custom shader part for native image 91/115591/2 accepted/tizen/3.0/common/20170222.125805 accepted/tizen/3.0/ivi/20170222.082536 accepted/tizen/3.0/mobile/20170222.082357 accepted/tizen/3.0/tv/20170222.082439 accepted/tizen/3.0/wearable/20170222.082505 submit/tizen_3.0/20170221.075915
authortaeyoon0.lee <taeyoon0.lee@samsung.com>
Mon, 20 Feb 2017 12:30:38 +0000 (21:30 +0900)
committertaeyoon0.lee <taeyoon0.lee@samsung.com>
Tue, 21 Feb 2017 06:15:34 +0000 (15:15 +0900)
 - Fixed issue, custom shader isn't applied after changed to visual

Change-Id: Idd5c2eba75db78fa7974e780c80b72d5b3f7ac5b

dali-toolkit/internal/visuals/image/image-visual.cpp

index 4bc0d02..f3d4feb 100644 (file)
@@ -296,13 +296,6 @@ void ImageVisual::DoInitialize( Actor& actor, const Property::Map& propertyMap )
     }
   }
 
-  NativeImage nativeImage = NativeImage::DownCast( mImage );
-
-  if( nativeImage )
-  {
-    SetNativeFragmentShaderCode( nativeImage );
-  }
-
   // if actor is on stage, create new renderer and apply to actor
   if( actor && actor.OnStage() )
   {
@@ -562,6 +555,13 @@ void ImageVisual::InitializeRenderer( const Image& image )
 {
   mImpl->mFlags &= ~Impl::IS_FROM_CACHE;
 
+  NativeImage nativeImage = NativeImage::DownCast( image );
+
+  if( nativeImage )
+  {
+    SetNativeFragmentShaderCode( nativeImage );
+  }
+
   mImpl->mRenderer = CreateRenderer();
 
   if( image )