Remove/Move experimental features
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / gaussian-blur-view / gaussian-blur-view-impl.h
index f57dd49..1b3bf38 100644 (file)
@@ -1,30 +1,32 @@
 #ifndef __DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H__
 #define __DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_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 <sstream>
 #include <cmath>
+#include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
-#include <dali/dali.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
 namespace Dali
 {
@@ -40,7 +42,7 @@ namespace Internal
 /**
  * GaussianBlurView implementation class
  */
-class GaussianBlurView : public ControlImpl
+class GaussianBlurView : public Control
 {
 public:
 
@@ -95,10 +97,17 @@ public:
 private:
 
   virtual void OnInitialize();
-  virtual void OnControlSizeSet(const Vector3& targetSize);
-  virtual void OnStageDisconnection();
+  virtual void OnSizeSet(const Vector3& targetSize);
 
-  virtual void OnControlStageConnection();
+  /**
+   * @copydoc Control::OnChildAdd()
+   */
+  virtual void OnChildAdd( Actor& child );
+
+  /**
+   * @copydoc Control::OnChildRemove()
+   */
+  virtual void OnChildRemove( Actor& child );
 
   void SetBlurBellCurveWidth(float blurBellCurveWidth);
   float CalcGaussianWeight(float x);
@@ -140,6 +149,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
@@ -156,23 +167,22 @@ private:
   FrameBufferImage mRenderTarget1;
   FrameBufferImage mRenderTarget2;
 
-  ShaderEffect mHorizBlurShader;
-  ShaderEffect mVertBlurShader;
+  Toolkit::ImageView mImageViewHorizBlur;
+  Toolkit::ImageView mImageViewVertBlur;
 
-  ImageActor mImageActorHorizBlur;
-  ImageActor mImageActorVertBlur;
+  Property::Map mCustomShader;
 
   RenderTask mHorizBlurTask;
   RenderTask mVertBlurTask;
 
   /////////////////////////////////////////////////////////////
   // for compositing blur and children renders to offscreen target
-  ImageActor mImageActorComposite;
+  Toolkit::ImageView mImageViewComposite;
   RenderTask mCompositeTask;
 
   /////////////////////////////////////////////////////////////
   // for holding blurred result
-  ImageActor mTargetActor;
+  Toolkit::ImageView mTargetActor;
 
   /////////////////////////////////////////////////////////////
   // for animating fade in / out of blur, hiding internal implementation but allowing user to set via GaussianBlurView interface
@@ -184,6 +194,8 @@ private:
   FrameBufferImage mUserOutputRenderTarget;
 
   Dali::Toolkit::GaussianBlurView::GaussianBlurViewSignal mFinishedSignal; ///< Signal emitted when blur has completed.
+
+  bool mActivated:1;
 private:
 
   // Undefined copy constructor.