[Tizen] Fix InvalidateFrameBuffer error 12/225612/2 accepted/tizen/5.5/unified/20200311.131100 submit/tizen_5.5/20200310.033529
authorSeungho, Baek <sbsh.baek@samsung.com>
Thu, 20 Feb 2020 23:42:05 +0000 (08:42 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Mon, 9 Mar 2020 06:16:50 +0000 (15:16 +0900)
Change-Id: Icca5f00b10a431c7dfec97a3ffb34e9900b41c5e
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
dali/internal/render/common/render-manager.cpp

index 747f5b3..d32dbf8 100755 (executable)
@@ -586,18 +586,6 @@ void RenderManager::Render( Integration::RenderStatus& status, bool forceClear,
 
         DoRender( instruction );
       }
-
-      if ( mImpl->currentContext->IsSurfacelessContextSupported() )
-      {
-        mImpl->glContextHelperAbstraction.MakeSurfacelessContextCurrent();
-      }
-
-      GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
-      mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
-      for ( auto&& context : mImpl->surfaceContextContainer )
-      {
-        context->InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
-      }
     }
 
     //Notify RenderGeometries that rendering has finished
@@ -1040,6 +1028,12 @@ void RenderManager::DoRender( RenderInstruction& instruction )
   {
     mImpl->currentContext->Flush();
   }
+
+  if( instruction.mFrameBuffer && instruction.mFrameBuffer->IsSurfaceBacked() )
+  {
+    GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
+    mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+  }
 }
 
 } // namespace SceneGraph