Stop using ImageActor in GaussianBlur, Bloom & SuperBlur
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / bloom-view / bloom-view-impl.h
index 72b0385..207ce92 100644 (file)
@@ -1,31 +1,35 @@
 #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) 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 <sstream>
 #include <cmath>
+#include <dali/public-api/actors/camera-actor.h>
+#include <dali/public-api/actors/image-actor.h>
+#include <dali/public-api/render-tasks/render-task.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/public-api/controls/bloom-view/bloom-view.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
+#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
 
 namespace Dali
 {
@@ -41,7 +45,7 @@ namespace Internal
 /**
  * BloomEffect implementation class
  */
-class BloomView : public ControlImpl
+class BloomView : public Control
 {
 public:
   /**
@@ -83,10 +87,7 @@ public:
 private:
 
   virtual void OnInitialize();
-  virtual void OnControlSizeSet(const Vector3& targetSize);
-  virtual void OnStageDisconnection();
-
-  virtual void OnControlStageConnection();
+  virtual void OnSizeSet(const Vector3& targetSize);
 
   void AllocateResources();
   void CreateRenderTasks();
@@ -131,8 +132,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 mBloomExtractImageActor;
 
   /////////////////////////////////////////////////////////////
   // for blurring extracted bloom
@@ -141,13 +141,13 @@ private:
   /////////////////////////////////////////////////////////////
   // for compositing bloom and children renders to offscreen target
   RenderTask mCompositeTask;
-  ShaderEffect mCompositeShader;
-  ImageActor mCompositeImageActor;
+
+  Toolkit::ImageView mCompositeImageActor;
 
   /////////////////////////////////////////////////////////////
   // for holding blurred result
   FrameBufferImage mOutputRenderTarget;
-  ImageActor mTargetImageActor;
+  Toolkit::ImageView mTargetImageActor;
 
   /////////////////////////////////////////////////////////////
   // Properties for setting by user, e.g. by animations
@@ -158,6 +158,8 @@ private:
   Property::Index mImageIntensityPropertyIndex;
   Property::Index mImageSaturationPropertyIndex;
 
+  bool mActivated:1;
+
 private:
 
   // Undefined copy constructor.