Add null check for mTextureSet.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / filters / spread-filter.cpp
index 216f3a0..5eb8a82 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/constraints.h>
-#include <dali/public-api/common/stage.h>
+#include <dali/devel-api/common/stage.h>
 #include <dali/public-api/object/property-map.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 
@@ -85,7 +85,7 @@ void SpreadFilter::Enable()
   // create actor to render input with applied emboss effect
   mActorForInput = Actor::New();
   mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
-  mActorForInput.SetSize(mTargetSize);
+  mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize);
   // register properties as shader uniforms
   mActorForInput.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread );
   mActorForInput.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 1.0f / mTargetSize.width, 0.0f ) );
@@ -102,7 +102,7 @@ void SpreadFilter::Enable()
   // create an actor to render mImageForHorz for vertical blur pass
   mActorForHorz = Actor::New();
   mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
-  mActorForHorz.SetSize(mTargetSize);
+  mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize);
   // register properties as shader uniforms
   mActorForHorz.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread );
   mActorForHorz.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 0.0f, 1.0f / mTargetSize.height ) );
@@ -172,11 +172,11 @@ void SpreadFilter::SetSize( const Vector2& size )
   mTargetSize = size;
   if( mActorForInput )
   {
-    mActorForInput.SetSize(mTargetSize);
+    mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize);
   }
   if( mActorForHorz )
   {
-    mActorForHorz.SetSize(mTargetSize);
+    mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize);
   }
 }