Merge "Add a TextEditor property to limit input to maximum characters" into devel...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / filters / image-filter.h
index d836173..d73f9e6 100644 (file)
@@ -1,28 +1,31 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H__
-#define __DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_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.
-//
+#ifndef DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H
+#define DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H
+
+/*
+ * Copyright (c) 2019 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 <dali/public-api/actors/camera-actor.h>
+#include <dali/public-api/rendering/frame-buffer.h>
+#include <dali/public-api/rendering/texture.h>
 
 // INTERNAL INCLUDES
-#include <dali/dali.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/effects-view/effects-view.h>
+#include <dali-toolkit/devel-api/controls/effects-view/effects-view.h>
 
 namespace Dali
 {
@@ -35,7 +38,7 @@ namespace Internal
 
 /**
  * An interface class that provides a interface for image filters that perform
- * a simple shader effect on an input image, rendering the output to a FrameBufferImage.
+ * a simple shader effect on an input texture, rendering the output to a FrameBuffer.
  */
 class ImageFilter
 {
@@ -75,22 +78,22 @@ public:
   void SetRefreshOnDemand( bool onDemand );
 
   /**
-   * Set the input image
-   * @param[in] The input/original image.
+   * Set the input texture
+   * @param[in] The input/original texture.
    */
-  void SetInputImage( Image image );
+  void SetInputTexture( Texture texture );
 
   /**
-   * Set the output image
-   * @return The output image.
+   * Set the output frame buffer
+   * @return The output frame buffer.
    */
-  void SetOutputImage( FrameBufferImage image );
+  void SetOutputFrameBuffer( FrameBuffer frameBuffer );
 
   /**
    * Set size of ImageFilter. Used to create internal offscreen buffers
    * @param[in] size  THe size.
    */
-  void SetSize( const Vector2& size );
+  virtual void SetSize( const Vector2& size );
 
   /**
    * Set the pixel format for internal offscreen buffers
@@ -136,22 +139,24 @@ public:
    */
   void SetBackgroundColor( const Vector4& color );
 
+protected:
+
   /**
-   * Enable optional debug output in the shader
-   * @param[in] flag Set true to enable, dalse to disable.
+   * Setup position and parameters for camera
    */
-  void RenderDebug( bool flag );
+  void SetupCamera();
 
 protected:
-  Image            mInputImage;
-  FrameBufferImage mOutputImage;
+  Texture          mInputTexture;
+  FrameBuffer      mOutputFrameBuffer;
   FilterKernel     mKernel;
   Actor            mRootActor;
+  CameraActor      mCameraActor;
   Vector4          mBackgroundColor;
   Vector2          mTargetSize;
   Pixel::Format    mPixelFormat;
   bool             mRefreshOnDemand;
-  bool             mDebugRender;
+
 }; // class Imagefilter
 
 } // namespace Internal
@@ -160,5 +165,5 @@ protected:
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H__
+#endif // DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H