X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fsuper-blur-view%2Fsuper-blur-view-impl.h;h=4380a6ed037f6f13f6d4b46c61337f4bb9f30938;hb=refs%2Fchanges%2F49%2F88249%2F1;hp=b5d35c53437ce4698846d5a87b75ae2a0f36b0b6;hpb=7b09f888bc98f59e15a1d5fc8b56a36e779ad517;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 b5d35c5..4380a6e 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,27 +1,28 @@ #ifndef __DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H__ #define __DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2016 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // INTERNAL INCLUDES -#include #include -#include -#include +#include +#include +#include namespace Dali { @@ -37,16 +38,8 @@ namespace Internal /** * SuperBlurView implementation class */ -class SuperBlurView : public ControlImpl +class SuperBlurView : public Control { -public: - - // Properties - enum - { - SUPER_BLUR_VIEW_PROPERTY_START_INDEX = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1, - SUPER_BLUR_VIEW_PROPERTY_END_INDEX = SUPER_BLUR_VIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices - }; public: @@ -61,6 +54,12 @@ public: void SetImage(Image inputImage); /** + * Get the image for blurring. + * @return The image for blurring. + */ + Image GetImage(); + + /** * @copydoc Dali::Toolkit::SuperBlurView::GetBlurStrengthPropertyIndex */ Property::Index GetBlurStrengthPropertyIndex() const; @@ -115,7 +114,7 @@ protected: */ virtual ~SuperBlurView(); -private: // from ControlImpl +private: // from Control /** * @copydoc Toolkit::Control::OnInitialize @@ -123,14 +122,24 @@ private: // from ControlImpl virtual void OnInitialize(); /** - * @copydoc Toolkit::Control::OnControlSizeSet + * @copydoc CustomActorImpl::OnSizeSet() */ - virtual void OnControlSizeSet(const Vector3& targetSize); + virtual void OnSizeSet(const Vector3& targetSize); /** - * @copydoc Toolkit::ControlImpl::OnRelaidOut() + * @copydoc CustomActorImpl::OnStageConnection() */ - virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container ); + virtual void OnStageConnection( int depth ); + + /** + * @copydoc CustomActorImpl::OnStageDisconnection() + */ + virtual void OnStageDisconnection(); + + /** + * @copydoc CustomActorImpl::GetNaturalSize() + */ + virtual Vector3 GetNaturalSize(); private: @@ -152,19 +161,24 @@ private: */ void ClearBlurResource(); -private: - - unsigned int mBlurLevels; - - Property::Index mBlurStrengthPropertyIndex; + /** + * Sets shader effect on the control renderer + * @param[in,out] Sets custom shader effect on the given visual + */ + void SetShaderEffect( Toolkit::Visual::Base& visual ); +private: std::vector mGaussianBlurView; std::vector mBlurredImage; - std::vector mImageActors; - bool mResourcesCleared; - + std::vector mVisuals; + Image mInputImage; Vector2 mTargetSize; + Toolkit::SuperBlurView::SuperBlurViewSignal mBlurFinishedSignal; ///< Signal emitted when blur has completed. + + Property::Index mBlurStrengthPropertyIndex; + unsigned int mBlurLevels; + bool mResourcesCleared; }; }