X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffilters%2Fblur-two-pass-filter.h;h=2e2e0a9dd22d81ade12401cecf03e44ace2c882e;hb=c281071e49022c17ca2459c91bfab58c471b05d4;hp=1e723b942d52e4f1472bdfedd8cefd7bf205c68c;hpb=4b38b709efae6ba534f7d336b70dabb74c804e03;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 1e723b9..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,22 +49,25 @@ 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 handle to the object in order to animate or constrain the blur strength property @@ -80,41 +77,30 @@ public: // From ImageFilter 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