Revert "[Tizen] Implement partial update"
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-surface-frame-buffer.h
index ebe7eb5..edd667d 100644 (file)
@@ -17,6 +17,9 @@
  * limitations under the License.
  */
 
+// EXTERNAL INCLUDES
+#include <atomic>
+
 // INTERNAL INCLUDES
 #include <dali/internal/update/manager/update-manager.h>
 #include <dali/internal/render/renderers/render-frame-buffer.h>
@@ -96,6 +99,18 @@ public:
    */
   void SetBackgroundColor( const Vector4& color );
 
+  /**
+   * @copydoc Dali::Internal::FrameBuffer::MarkSurfaceAsInvalid()
+   */
+  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:
 
   /**
@@ -110,16 +125,9 @@ public:
   Context* GetContext();
 
   /**
-   * @brief Gets whether the depth buffer is required
-   * @return TRUE if the depth buffer is required
-   */
-  Integration::DepthBufferAvailable GetDepthBufferRequired();
-
-  /**
-   * @brief Gets whether the stencil buffer is required
-   * @return TRUE if the stencil buffer is required
+   * @brief Makes the graphics context current
    */
-  Integration::StencilBufferAvailable GetStencilBufferRequired();
+  void MakeContextCurrent();
 
   /**
    * @brief Gets the background color of the surface.
@@ -136,6 +144,7 @@ private:
   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
 };
 
 // Messages for FrameBuffer