X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffilters%2Fblur-two-pass-filter.cpp;h=307a3a163b6dc9eebdb89f746cd46c25bddd9b95;hb=d9e73542cfca2591f40ca9ffeefa1e20e0c2bbd0;hp=ee86bb322114eabf7e7aaa7e64fd95e1e3c60bcf;hpb=11ed6421771d05113ae1a6510167d8c2557ac20e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp index ee86bb3..307a3a1 100644 --- a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp +++ b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp @@ -28,7 +28,7 @@ #include // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -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 ); @@ -172,13 +172,13 @@ void BlurTwoPassFilter::Enable() Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource.str(); Property::Map visualMap; - visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::DevelVisual::Property::SHADER, customShader ); mActorForInput.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); mActorForHorz.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); // Set up blend-two-image custom shader customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = BLEND_TWO_IMAGES_FRAGMENT_SOURCE; - visualMap[ Toolkit::Visual::Property::SHADER ] = customShader; + visualMap[ Toolkit::DevelVisual::Property::SHADER ] = customShader; mActorForBlending.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); mRootActor.Add( mActorForInput ); @@ -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();