DALi Version 1.3.34
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / filters / blur-two-pass-filter.cpp
index ee86bb3..f2689ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -132,14 +132,14 @@ void BlurTwoPassFilter::Enable()
   mActorForInput.SetSize( mTargetSize );
 
   // create internal offscreen for result of horizontal pass
-  mImageForHorz = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED );
+  mImageForHorz = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
   // create an actor to render mImageForHorz for vertical blur pass
   mActorForHorz = Toolkit::ImageView::New( mImageForHorz );
   mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
   mActorForHorz.SetSize( mTargetSize );
 
   // create internal offscreen for result of the two pass blurred image
-  mBlurredImage = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED);
+  mBlurredImage = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
   // create an actor to blend the blurred image and the input image with the given blur strength
   mActorForBlending.SetImage( mBlurredImage );
   mActorForBlending.SetParentOrigin( ParentOrigin::CENTER );
@@ -187,7 +187,10 @@ void BlurTwoPassFilter::Enable()
 
   // Add effect texture to blend-two-image custom shader
   TextureSet textureSet = mActorForBlending.GetRendererAt(0).GetTextures();
-  TextureSetImage( textureSet, 1u, mInputImage );
+  if( textureSet )
+  {
+    TextureSetImage( textureSet, 1u, mInputImage );
+  }
 
   SetupCamera();
   CreateRenderTasks();