X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbloom-view%2Fbloom-view-impl.h;h=7048bc89808c7b1471fb34a39610c0c557b58ec2;hb=e65245a8ddc5d1fe018b4f890c6927974955e2a7;hp=72b0385ffe256b273dff45bfcfc1d98a8dbf51fa;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h index 72b0385..7048bc8 100644 --- a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h +++ b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h @@ -1,31 +1,34 @@ #ifndef __DALI_TOOLKIT_INTERNAL_BLOOM_VIEW_H__ #define __DALI_TOOLKIT_INTERNAL_BLOOM_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. + * + */ // EXTERNAL INCLUDES #include #include +#include +#include // INTERNAL INCLUDES -#include #include -#include -#include +#include +#include +#include namespace Dali { @@ -41,7 +44,7 @@ namespace Internal /** * BloomEffect implementation class */ -class BloomView : public ControlImpl +class BloomView : public Control { public: /** @@ -66,10 +69,6 @@ public: static Dali::Toolkit::BloomView New(); static Dali::Toolkit::BloomView New( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat, const float downsampleWidthScale, const float downsampleHeightScale); - - void Add(Actor child); - void Remove(Actor child); - void Activate(); void Deactivate(); @@ -83,10 +82,17 @@ public: private: virtual void OnInitialize(); - virtual void OnControlSizeSet(const Vector3& targetSize); - virtual void OnStageDisconnection(); + virtual void OnSizeSet(const Vector3& targetSize); + + /** + * @copydoc Control::OnChildAdd() + */ + virtual void OnChildAdd( Actor& child ); - virtual void OnControlStageConnection(); + /** + * @copydoc Control::OnChildRemove() + */ + virtual void OnChildRemove( Actor& child ); void AllocateResources(); void CreateRenderTasks(); @@ -116,6 +122,8 @@ private: ///////////////////////////////////////////////////////////// // for creating a subtree for all user added child actors, so that we can have them exclusive to the mRenderChildrenTask and our other actors exclusive to our other tasks Actor mChildrenRoot; + // for creating a subtree for the internal actors + Actor mInternalRoot; ///////////////////////////////////////////////////////////// // for mapping offscreen renders to render target sizes @@ -131,8 +139,7 @@ private: // for extracting bright parts of image to an offscreen target FrameBufferImage mBloomExtractTarget; // for rendering bright parts of image into separate texture, also used as target for gaussian blur RenderTask mBloomExtractTask; - ShaderEffect mBloomExtractShader; - ImageActor mBloomExtractImageActor; + Toolkit::ImageView mBloomExtractImageView; ///////////////////////////////////////////////////////////// // for blurring extracted bloom @@ -141,13 +148,13 @@ private: ///////////////////////////////////////////////////////////// // for compositing bloom and children renders to offscreen target RenderTask mCompositeTask; - ShaderEffect mCompositeShader; - ImageActor mCompositeImageActor; + + Toolkit::ImageView mCompositeImageView; ///////////////////////////////////////////////////////////// // for holding blurred result FrameBufferImage mOutputRenderTarget; - ImageActor mTargetImageActor; + Toolkit::ImageView mTargetImageView; ///////////////////////////////////////////////////////////// // Properties for setting by user, e.g. by animations @@ -158,6 +165,8 @@ private: Property::Index mImageIntensityPropertyIndex; Property::Index mImageSaturationPropertyIndex; + bool mActivated:1; + private: // Undefined copy constructor.