[Tizen] Implement partial update
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles / egl-implementation.h
old mode 100644 (file)
new mode 100755 (executable)
index 03c35f4..aefa9be
  */
 
 // EXTERNAL INCLUDES
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
+#include <dali/internal/graphics/common/egl-include.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/integration-api/core-enumerations.h>
 
 // INTERNAL INCLUDES
-#include <dali/integration-api/egl-interface.h>
+#include <dali/integration-api/adaptor-framework/egl-interface.h>
 
 namespace Dali
 {
-
 namespace Internal
 {
 namespace Adaptor
@@ -48,10 +46,12 @@ public:
    * @param[in] multiSamplingLevel The Multi-sampling level required
    * @param[in] depthBufferRequired Whether the depth buffer is required
    * @param[in] stencilBufferRequired Whether the stencil buffer is required
+   * @param[in] partialUpdateAvailable Whether the partial update is available
    */
   EglImplementation( int multiSamplingLevel,
                      Integration::DepthBufferAvailable depthBufferRequired,
-                     Integration::StencilBufferAvailable stencilBufferRequired );
+                     Integration::StencilBufferAvailable stencilBufferRequired,
+                     Integration::PartialUpdateAvailable partialUpdateAvailable );
 
   /**
    * Destructor
@@ -125,6 +125,16 @@ public:
    */
   virtual void SwapBuffers( EGLSurface& eglSurface );
 
+ /**
+  * Get current buffer age
+  */
+  virtual int GetBufferAge( EGLSurface& eglSurface );
+
+  /**
+   * Set Damaged rect for Partial update
+  */
+  virtual void SetDamagedRect( std::vector<int> damagedRectArray, EGLSurface& eglSurface );
+
   /**
    * Performs an OpenGL copy buffers command
    */
@@ -182,6 +192,11 @@ public:
   void SetGlesVersion( const int32_t glesVersion );
 
   /**
+   * Sets Whether the frame is the first after Resume.
+   */
+  void SetFirstFrameAfterResume();
+
+  /**
    * returns the display with which this object was initialized
    * @return the EGL Display.
    */
@@ -205,6 +220,11 @@ public:
    */
   bool IsSurfacelessContextSupported() const;
 
+  /**
+   * @brief Wait until all rendering calls for the currently context are executed
+   */
+  void WaitClient();
+
 private:
 
   Vector<EGLint>       mContextAttribs;
@@ -230,6 +250,7 @@ private:
 
   int32_t              mMultiSamplingLevel;
   int32_t              mGlesVersion;
+  std::vector<int>     mDamagedRectArray;
 
   ColorDepth           mColorDepth;
 
@@ -239,6 +260,13 @@ private:
   bool                 mDepthBufferRequired;
   bool                 mStencilBufferRequired;
   bool                 mIsSurfacelessContextSupported;
+  bool                 mIsKhrCreateContextSupported;
+  uint32_t             mSwapBufferCountAfterResume;
+  bool                 mIsKhrPartialUpdateSupported;
+  bool                 mPartialUpdateAvailable;
+
+  PFNEGLSETDAMAGEREGIONKHRPROC mEglSetDamageRegionKHR;
+  PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC mSwapBuffersWithDamage;
 };
 
 } // namespace Adaptor