[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-surface-frame-buffer.h
old mode 100644 (file)
new mode 100755 (executable)
index edd667d..f295c45
@@ -94,12 +94,6 @@ public:
   void SetSize( uint32_t width, uint32_t height );
 
   /**
-   * @brief Sets the background color.
-   * @param[in] color The new background color
-   */
-  void SetBackgroundColor( const Vector4& color );
-
-  /**
    * @copydoc Dali::Internal::FrameBuffer::MarkSurfaceAsInvalid()
    */
   void MarkSurfaceAsInvalid() { mIsSurfaceInvalid = true; };
@@ -130,10 +124,23 @@ public:
   void MakeContextCurrent();
 
   /**
-   * @brief Gets the background color of the surface.
-   * @return The background color
+   * @brief Sets currentframe damaged rects
+   * @param[in] Sets currentframe damaged rects
+   * @param[out] return merged rect
+   */
+  void SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect );
+
+  /**
+   * @brief Gets whether partial update is required for partial update
+   * @return whether partial update or not
+   */
+  bool IsPartialUpdateEnabled() const;
+
+  /**
+   * @brief Sets whether partial update is required for partial update
+   * @param[in] value whether partial update or not
    */
-  Vector4 GetBackgroundColor();
+  void SetPartialUpdateEnabled( bool value );
 
 private:
 
@@ -142,9 +149,9 @@ private:
 
   uint32_t                    mWidth;
   uint32_t                    mHeight;
-  Vector4                     mBackgroundColor;
   bool                        mSizeChanged;
   std::atomic<bool>           mIsSurfaceInvalid; ///< This is set only from the event thread and read only from the render thread
+  bool                        mPartialUpdateEnabled; ///< This value is whether partial update is required
 };
 
 // Messages for FrameBuffer
@@ -159,15 +166,15 @@ inline void SetFrameBufferSizeMessage( SceneGraph::UpdateManager& updateManager,
   new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetSize, width, height );
 }
 
-inline void SetFrameBufferBackgroundColorMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, const Vector4& color )
+inline void SetFrameBufferPartialUpdateMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, bool value )
 {
-  typedef MessageValue1< SurfaceFrameBuffer, Vector4 > LocalType;
+  typedef MessageValue1< SurfaceFrameBuffer, bool > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = updateManager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetBackgroundColor, color );
+  new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetPartialUpdateEnabled, value );
 }
 
 } // namespace Render