[4.0] DALi version 1.2.84
[platform/core/uifw/dali-adaptor.git] / adaptors / base / render-helper.cpp
index c77d2c9..1276078 100644 (file)
@@ -155,15 +155,23 @@ bool RenderHelper::PreRender()
   return true;
 }
 
-void RenderHelper::PostRender()
+void RenderHelper::PostRender( bool renderToFbo )
 {
   // Inform the gl implementation that rendering has finished before informing the surface
   mGLES.PostRender();
 
-  if( mSurface )
+  if( renderToFbo )
+  {
+    mGLES.Flush();
+    mGLES.Finish();
+  }
+  else
   {
-    // Inform the surface that rendering this frame has finished.
-    mSurface->PostRender( *mEGL, mGLES, mDisplayConnection, mSurfaceReplaced, mSurfaceResized );
+    if( mSurface )
+    {
+      // Inform the surface that rendering this frame has finished.
+      mSurface->PostRender( *mEGL, mGLES, mDisplayConnection, mSurfaceReplaced, mSurfaceResized );
+    }
   }
   mSurfaceReplaced = false;
   mSurfaceResized = false;