X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ffilters%2Fblur-two-pass-filter.h;h=2e2e0a9dd22d81ade12401cecf03e44ace2c882e;hb=ec503e92aa01bc67f8ea118cf14aa3b1ed9d390e;hp=3e73a27ce86acd95f8a5e5ebcc18c25339c43b5d;hpb=3ef357cc431d17b7be772f0f74acb080feab123e;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 3e73a27..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. @@ -20,20 +20,16 @@ // EXTERNAL INCLUDES #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. @@ -53,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 @@ -77,33 +76,31 @@ public: // From ImageFilter Handle GetHandleForAnimateBlurStrength(); private: - /** * 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; - // To perform horizontal blur from mInputImage to mImageForHorz - RenderTask mRenderTaskForHorz; - Toolkit::ImageView mActorForInput; - FrameBufferImage mImageForHorz; - - // To perform vertical blur from mImageForHorz to mOutputImage - RenderTask mRenderTaskForVert; - Toolkit::ImageView mActorForHorz; - 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; - Toolkit::ImageView mActorForBlending; - Actor mRootActorForBlending; - Property::Index mBlurStrengthPropertyIndex; + RenderTask mRenderTaskForBlending; + Actor mActorForBlending; + Actor mRootActorForBlending; + Property::Index mBlurStrengthPropertyIndex; }; // class BlurTwoPassFilter @@ -113,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