*/
void MarkSurfaceAsInvalid() { mIsSurfaceInvalid = true; };
+ /**
+ * @brief Gets whether the render surface in this frame buffer is valid or not
+ * @note The render surface becomes invalid when it is deleted in the event thread
+ * @return Whether the render surface is valid or not
+ */
+ bool IsSurfaceValid() const;
+
public:
/**
void MakeContextCurrent();
/**
- * @brief Gets whether the depth buffer is required
- * @return TRUE if the depth buffer is required
+ * @brief Gets the background color of the surface.
+ * @return The background color
*/
- Integration::DepthBufferAvailable GetDepthBufferRequired();
+ Vector4 GetBackgroundColor();
/**
- * @brief Gets whether the stencil buffer is required
- * @return TRUE if the stencil buffer is required
+ * @brief Sets currentframe damaged rects
+ * @param[in] Sets currentframe damaged rects
+ * @param[out] return merged rect
*/
- Integration::StencilBufferAvailable GetStencilBufferRequired();
+ void SetDamagedRect( const Dali::DamagedRect& damagedRect, Dali::DamagedRect& mergedRect );
/**
- * @brief Gets the background color of the surface.
- * @return The background color
+ * @brief Gets whether partial update is required for partial update
+ * @return whether partial update or not
*/
- Vector4 GetBackgroundColor();
+ bool IsPartialUpdateEnabled() const;
+
+ /**
+ * @brief Sets whether partial update is required for partial update
+ * @param[in] value whether partial update or not
+ */
+ void SetPartialUpdateEnabled( bool value );
private:
uint32_t mHeight;
Vector4 mBackgroundColor;
bool mSizeChanged;
+ bool mBackgroundColorChanged;
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
new (slot) LocalType( surfaceFrameBuffer, &SurfaceFrameBuffer::SetBackgroundColor, color );
}
+inline void SetFrameBufferPartialUpdateMessage( SceneGraph::UpdateManager& updateManager, SurfaceFrameBuffer* surfaceFrameBuffer, bool value )
+{
+ 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::SetPartialUpdateEnabled, value );
+}
+
} // namespace Render
} // namespace Internal