X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffilters%2Femboss-filter.cpp;h=7f6dd1859f4f8447b5ff70a137d422e3c84bbf12;hb=acbe10c62c46a30c58e08d8971a736f04e68dbf8;hp=b27455829734f6e0ea6ba0b05ea6d4d124d94286;hpb=5c871f829de93f200bdcd47c1a80e3eee96b93cc;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/filters/emboss-filter.cpp b/dali-toolkit/internal/filters/emboss-filter.cpp index b274558..7f6dd18 100644 --- a/dali-toolkit/internal/filters/emboss-filter.cpp +++ b/dali-toolkit/internal/filters/emboss-filter.cpp @@ -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. @@ -28,9 +28,10 @@ #include // INTERNAL INCLUDES -#include #include +#include #include +#include namespace Dali { @@ -127,22 +128,11 @@ void EmbossFilter::Enable() mRootActor.Add( mActorForComposite ); - Image dummyImage; // Dummy image, force creation of an image visual - - InitializeVisual( mActorForComposite, mVisualForEmboss1, dummyImage ); + Internal::InitializeVisual( mActorForComposite, mVisualForEmboss1, mImageForEmboss1 ); Toolkit::GetImplementation( mVisualForEmboss1 ).SetCustomShader( customShader ); - - InitializeVisual( mActorForComposite, mVisualForEmboss2, dummyImage ); - Toolkit::GetImplementation( mVisualForEmboss2 ).SetCustomShader( customShader ); - - TextureSet textureSet1 = TextureSet::New(); - TextureSetImage( textureSet1, 0, mImageForEmboss1 ); - mActorForComposite.GetRendererAt(0).SetTextures( textureSet1 ); mActorForComposite.GetRendererAt(0).RegisterProperty( COLOR_UNIFORM_NAME, Color::BLACK ); - - TextureSet textureSet2 = TextureSet::New(); - TextureSetImage( textureSet2, 0, mImageForEmboss2 ); - mActorForComposite.GetRendererAt(1).SetTextures( textureSet2 ); + Internal::InitializeVisual( mActorForComposite, mVisualForEmboss2, mImageForEmboss2 ); + Toolkit::GetImplementation( mVisualForEmboss2 ).SetCustomShader( customShader ); mActorForComposite.GetRendererAt(1).RegisterProperty( COLOR_UNIFORM_NAME, Color::WHITE ); SetupCamera(); @@ -173,8 +163,8 @@ void EmbossFilter::Disable() if( mActorForComposite ) { - mVisualForEmboss1.SetOffStage( mActorForComposite ); - mVisualForEmboss2.SetOffStage( mActorForComposite ); + Toolkit::GetImplementation(mVisualForEmboss1).SetOffStage( mActorForComposite ); + Toolkit::GetImplementation(mVisualForEmboss2).SetOffStage( mActorForComposite ); mVisualForEmboss1.Reset(); mVisualForEmboss2.Reset(); mRootActor.Remove( mActorForComposite ); @@ -192,6 +182,11 @@ void EmbossFilter::Disable() taskList.RemoveTask(mRenderTaskForEmboss2); } + if( mRenderTaskForOutput ) + { + taskList.RemoveTask( mRenderTaskForOutput ); + } + mRootActor.Reset(); } }