X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffilters%2Fblur-two-pass-filter.h;h=2e2e0a9dd22d81ade12401cecf03e44ace2c882e;hb=528ee21711fc507b20ddb031cf6b1d71f1f44e75;hp=9b29dde1c051e6abdfd4c056d7d7f84cd9537b12;hpb=f4d559ea999cbbc44b1ecd489c4ca3711d37feca;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/filters/blur-two-pass-filter.h b/dali-toolkit/internal/filters/blur-two-pass-filter.h index 9b29dde..2e2e0a9 100644 --- a/dali-toolkit/internal/filters/blur-two-pass-filter.h +++ b/dali-toolkit/internal/filters/blur-two-pass-filter.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H__ -#define __DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H__ +#ifndef DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H +#define DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,23 +19,17 @@ */ // EXTERNAL INCLUDES -#include -#include #include -#include // INTERNAL INCLUDES #include "image-filter.h" namespace Dali { - namespace Toolkit { - namespace Internal { - /** * A two pass blur filter, pass one performs a horizontal blur and pass two performs a * vertical blur on the result of pass one. @@ -55,66 +49,58 @@ public: public: // From ImageFilter /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable - virtual void Enable(); + void Enable() override; /// @copydoc Dali::Toolkit::Internal::ImageFilter::Disable - virtual void Disable(); + void Disable() override; /// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh - virtual void Refresh(); + void Refresh() override; /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize - virtual void SetSize( const Vector2& size ); + void SetSize(const Vector2& size) override; /** * Get the property index that controls the strength of the blur applied to the image. Useful for animating this property. * This property represents a value in the range [0.0 - 1.0] where 0.0 is no blur and 1.0 is full blur. */ - Property::Index GetBlurStrengthPropertyIndex() const {return mBlurStrengthPropertyIndex;} + Property::Index GetBlurStrengthPropertyIndex() const + { + return mBlurStrengthPropertyIndex; + } /** - * Retrieve the constrainable object to animate or constrain the blur strength property - * @return the constrainable object which blend the output image according to the blur strength + * Retrieve the handle to the object in order to animate or constrain the blur strength property + * @return The hadnle to the object which blends the output image according to the blur strength */ - Constrainable GetHandleForAnimateBlurStrength(); + Handle GetHandleForAnimateBlurStrength(); private: /** - * Setup position and parameters for camera - */ - void SetupCamera(); - - /** * Setup render tasks for blur */ void CreateRenderTasks(); private: - BlurTwoPassFilter( const BlurTwoPassFilter& ); - BlurTwoPassFilter& operator=( const BlurTwoPassFilter& ); + BlurTwoPassFilter(const BlurTwoPassFilter&); + BlurTwoPassFilter& operator=(const BlurTwoPassFilter&); private: // Attributes + // To perform horizontal blur from mInputTexture to mFrameBufferForHorz + RenderTask mRenderTaskForHorz; + Actor mActorForInput; + FrameBuffer mFrameBufferForHorz; - CameraActor mCameraForBlur; - - // To perform horizontal blur from mInputImage to mImageForHorz - RenderTask mRenderTaskForHorz; - ImageActor mActorForInput; - FrameBufferImage mImageForHorz; - ShaderEffect mShaderForHorz; - - // To perform vertical blur from mImageForHorz to mOutputImage - RenderTask mRenderTaskForVert; - ImageActor mActorForHorz; - ShaderEffect mShaderForVert; - FrameBufferImage mBlurredImage; + // To perform vertical blur from mFrameBufferForHorz to mOutputFrameBuffer + RenderTask mRenderTaskForVert; + Actor mActorForHorz; + FrameBuffer mBlurredFrameBuffer; // To blend the blurred image and input image according to the blur strength - RenderTask mRenderTaskForBlending; - ImageActor mActorForBlending; - Actor mRootActorForBlending; - ShaderEffect mShaderForBlending; - Property::Index mBlurStrengthPropertyIndex; + RenderTask mRenderTaskForBlending; + Actor mActorForBlending; + Actor mRootActorForBlending; + Property::Index mBlurStrengthPropertyIndex; }; // class BlurTwoPassFilter @@ -124,5 +110,4 @@ private: // Attributes } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H__ - +#endif // DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H