#define DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H
/*
- * Copyright (c) 2019 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.
// EXTERNAL INCLUDES
#include <dali/public-api/render-tasks/render-task.h>
-#include <dali-toolkit/public-api/controls/image-view/image-view.h>
// 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.
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
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
} // namespace Dali
#endif // DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H
-