X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fbubble-effect%2Fbubble-emitter-impl.h;h=3ae36a1faf4f8b9dfa129234107d0922b153fae1;hb=d02debcc6c1e5876da270fc648fa5d880d75120b;hp=5a42bc71c498e0fac23b6984de4ab4198b54f2e4;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h b/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h index 5a42bc7..3ae36a1 100644 --- a/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h +++ b/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h @@ -1,30 +1,37 @@ #ifndef __DALI_TOOLKIT_INTERNAL_BUBBLE_EMITTER_IMPL_H__ #define __DALI_TOOLKIT_INTERNAL_BUBBLE_EMITTER_IMPL_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) 2014 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 +#include +#include +#include // INTERNAL INCLUDES -#include #include #include #include -#include - namespace Dali { @@ -37,7 +44,7 @@ namespace Internal /** * BubbleEmitter implementation class. */ -class BubbleEmitter : public ControlImpl +class BubbleEmitter : public Control { public: @@ -126,6 +133,11 @@ private: void OnRenderFinished(RenderTask& source); /** + * Callback function from Stage to tell us if the context has been regained. + */ + void OnContextRegained(); + + /** * Generate the material object which is attached to the meshActor to describe its color, texture, texture mapping mode etc. */ void GenMaterial(); @@ -198,6 +210,8 @@ private: unsigned int mNumBubblePerShader; ///< How many bubbles for each BubbleEffect shader. unsigned int mNumShader; ///< How many BubbleEffect shaders are used. unsigned int mTotalNumOfBubble; ///< mNumBubblePerShader*mNumShader. + bool mRenderTaskRunning; ///< If the background render task is currently running + Vector2 mBubbleSizeRange; ///< The bubble size range. std::vector mMesh; ///< The mesh vector, each mesh is used to create a meshActor which applies a BubbleEffect. @@ -210,6 +224,8 @@ private: unsigned int mCurrentUniform; ///< Keep track of the uniform index for the newly emitted bubble + Vector3 mHSVDelta; ///< The HSV difference used to adjust the background image color. + Image mBackgroundImage; ///< The original background image FrameBufferImage mEffectImage; ///< The image stores the adjusted color of the background image.The bubbles pick color from this image. CameraActor mCameraActor; ///< The render task views the scene from the perspective of this actor.