X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fsuper-blur-view%2Fsuper-blur-view-impl.h;h=117d34a83f8d8c16df7c821fc6f7af7b0fc52e33;hp=db9c6132aa5c12f2799d3293fc9d53476e397f82;hb=b1e8521ad77e7b4e62b59613b2edef64429130e9;hpb=f4d559ea999cbbc44b1ecd489c4ca3711d37feca diff --git a/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.h b/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.h index db9c613..117d34a 100644 --- a/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.h +++ b/dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H__ -#define __DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H__ +#ifndef DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H +#define DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -18,10 +18,15 @@ * */ +// EXTERNAL INCLUDES +#include +#include + // INTERNAL INCLUDES #include -#include -#include +#include +#include +#include namespace Dali { @@ -39,14 +44,6 @@ namespace Internal */ class SuperBlurView : public Control { -public: - - // Properties - enum - { - SUPER_BLUR_VIEW_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - SUPER_BLUR_VIEW_PROPERTY_END_INDEX = SUPER_BLUR_VIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices - }; public: @@ -58,7 +55,7 @@ public: /** * @copydoc Dali::Toolkit::SuperBlurView::SetImage */ - void SetImage(Image inputImage); + void SetTexture( Texture texture ); /** * @copydoc Dali::Toolkit::SuperBlurView::GetBlurStrengthPropertyIndex @@ -81,9 +78,9 @@ public: Dali::Toolkit::SuperBlurView::SuperBlurViewSignal& BlurFinishedSignal(); /** - * @copydoc Dali::Toolkit::SuperBlurView::GetBlurredImage + * @copydoc Dali::Toolkit::SuperBlurView::GetBlurredTexture */ - Image GetBlurredImage( unsigned int level ); + Texture GetBlurredTexture( unsigned int level ); // Properties @@ -123,23 +120,33 @@ private: // from Control virtual void OnInitialize(); /** - * @copydoc Toolkit::Control::OnControlSizeSet + * @copydoc CustomActorImpl::OnSizeSet() + */ + virtual void OnSizeSet(const Vector3& targetSize); + + /** + * @copydoc CustomActorImpl::OnSceneConnection() + */ + virtual void OnSceneConnection( int depth ); + + /** + * @copydoc CustomActorImpl::OnSceneDisconnection() */ - virtual void OnControlSizeSet(const Vector3& targetSize); + virtual void OnSceneDisconnection(); /** - * @copydoc Control::OnRelayout() + * @copydoc CustomActorImpl::GetNaturalSize() */ - virtual void OnRelayout( const Vector2& size, ActorSizeContainer& container ); + virtual Vector3 GetNaturalSize(); private: /** * Carry out the idx-th pass of blurring * @param[in] idx The blur pass index - * @param[in] image The input image for the current blurring, it is either the original image or the blurred image from the previous pass + * @param[in] texture The input texture for the current blurring, it is either the original image or the blurred texture from the previous pass */ - void BlurImage( unsigned int idx, Image image ); + void BlurTexture( unsigned int idx, Texture texture ); /** * Signal handler to tell when the last blur view completes @@ -153,18 +160,18 @@ private: void ClearBlurResource(); private: + std::vector mGaussianBlurView; + std::vector mBlurredImage; + std::vector mRenderers; + Texture mInputTexture; + Vector2 mTargetSize; - unsigned int mBlurLevels; + Toolkit::SuperBlurView::SuperBlurViewSignal mBlurFinishedSignal; ///< Signal emitted when blur has completed. + std::string mUrl; Property::Index mBlurStrengthPropertyIndex; - - std::vector mGaussianBlurView; - std::vector mBlurredImage; - std::vector mImageActors; + unsigned int mBlurLevels; bool mResourcesCleared; - - Vector2 mTargetSize; - Toolkit::SuperBlurView::SuperBlurViewSignal mBlurFinishedSignal; ///< Signal emitted when blur has completed. }; } @@ -188,4 +195,4 @@ inline const Toolkit::Internal::SuperBlurView& GetImpl( const Toolkit::SuperBlur } -#endif /* __DALI_TOOLKIT_INTERNALSUPER_BLUR_VIEW_H__ */ +#endif // DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H