X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fgaussian-blur-view%2Fgaussian-blur-view-impl.h;h=76fe76c6dda848a5f86ff9cf30864e1992bed0b9;hp=7f3848923140a09c114eb9b5733c330e35e39c7a;hb=b1e8521ad77e7b4e62b59613b2edef64429130e9;hpb=397218b6cdd85915f5fe00fa9d3615dfa3867422 diff --git a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h index 7f38489..76fe76c 100644 --- a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h +++ b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H__ -#define __DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H__ +#ifndef DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H +#define DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H /* - * Copyright (c) 2014 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. @@ -21,10 +21,11 @@ // EXTERNAL INCLUDES #include #include +#include // INTERNAL INCLUDES #include -#include +#include #include namespace Dali @@ -70,17 +71,14 @@ public: const float downsampleWidthScale, const float downsampleHeightScale, bool blurUserImage); - void Add(Actor child); - void Remove(Actor child); - void Activate(); void ActivateOnce(); void Deactivate(); - void SetUserImageAndOutputRenderTarget(Image inputImage, FrameBufferImage outputRenderTarget); + void SetUserImageAndOutputRenderTarget(Texture inputImage, FrameBuffer outputRenderTarget); Property::Index GetBlurStrengthPropertyIndex() const {return mBlurStrengthPropertyIndex;} - FrameBufferImage GetBlurredRenderTarget() const; + FrameBuffer GetBlurredRenderTarget() const; /// @copydoc Dali::Toolkit::GaussianBlurView::SetBackgroundColor(const Vector4&) void SetBackgroundColor( const Vector4& color ); @@ -98,6 +96,16 @@ private: virtual void OnInitialize(); virtual void OnSizeSet(const Vector3& targetSize); + /** + * @copydoc Control::OnChildAdd() + */ + virtual void OnChildAdd( Actor& child ); + + /** + * @copydoc Control::OnChildRemove() + */ + virtual void OnChildRemove( Actor& child ); + void SetBlurBellCurveWidth(float blurBellCurveWidth); float CalcGaussianWeight(float x); void SetShaderConstants(); @@ -138,6 +146,8 @@ private: ///////////////////////////////////////////////////////////// // for creating a subtree for all user added child actors, so that we can have them exclusive to the mRenderChildrenTask and our other actors exclusive to our other tasks Actor mChildrenRoot; + // for creating a subtree for the internal actors + Actor mInternalRoot; ///////////////////////////////////////////////////////////// // for mapping offscreen renders to render target sizes @@ -146,28 +156,28 @@ private: ///////////////////////////////////////////////////////////// // for rendering all user added children to offscreen target - FrameBufferImage mRenderTargetForRenderingChildren; + FrameBuffer mRenderTargetForRenderingChildren; RenderTask mRenderChildrenTask; ///////////////////////////////////////////////////////////// // for rendering separated blur passes to offscreen targets - FrameBufferImage mRenderTarget1; - FrameBufferImage mRenderTarget2; + FrameBuffer mRenderTarget1; + FrameBuffer mRenderTarget2; - Toolkit::ImageView mImageActorHorizBlur; - Toolkit::ImageView mImageActorVertBlur; + Actor mHorizBlurActor; + Actor mVertBlurActor; RenderTask mHorizBlurTask; RenderTask mVertBlurTask; ///////////////////////////////////////////////////////////// // for compositing blur and children renders to offscreen target - Toolkit::ImageView mImageActorComposite; + Actor mCompositingActor; RenderTask mCompositeTask; ///////////////////////////////////////////////////////////// // for holding blurred result - Toolkit::ImageView mTargetActor; + Actor mTargetActor; ///////////////////////////////////////////////////////////// // for animating fade in / out of blur, hiding internal implementation but allowing user to set via GaussianBlurView interface @@ -175,8 +185,8 @@ private: ///////////////////////////////////////////////////////////// // User can specify image to blur and output target, so we can use GaussianBlurView for arbitrary blur processes - Image mUserInputImage; - FrameBufferImage mUserOutputRenderTarget; + Texture mUserInputImage; + FrameBuffer mUserOutputRenderTarget; Dali::Toolkit::GaussianBlurView::GaussianBlurViewSignal mFinishedSignal; ///< Signal emitted when blur has completed. @@ -213,4 +223,4 @@ inline const Toolkit::Internal::GaussianBlurView& GetImpl( const Toolkit::Gaussi } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H__ +#endif // DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H