Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-manager.cpp
index 2eec97a..7c56dfb 100644 (file)
@@ -72,7 +72,7 @@ struct RenderManager::Impl
         Integration::GlContextHelperAbstraction& glContextHelperAbstraction,
         Integration::DepthBufferAvailable depthBufferAvailableParam,
         Integration::StencilBufferAvailable stencilBufferAvailableParam )
-  : context( glAbstraction ),
+  : context( glAbstraction, &surfaceContextContainer ),
     currentContext( &context ),
     glAbstraction( glAbstraction ),
     glSyncAbstraction( glSyncAbstraction ),
@@ -610,6 +610,12 @@ void RenderManager::DoRender( RenderInstruction& instruction )
     {
       surfaceFrameBuffer = static_cast<Render::SurfaceFrameBuffer*>( instruction.mFrameBuffer );
 
+      if ( !surfaceFrameBuffer->IsSurfaceValid() )
+      {
+        // Skip rendering the frame buffer if the render surface becomes invalid
+        return;
+      }
+
       if ( mImpl->currentContext->IsSurfacelessContextSupported() )
       {
         Context* surfaceContext = surfaceFrameBuffer->GetContext();