Fix a bug that RenderTask::SetClearEnabled(false) doesn't work 98/223598/2
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 31 Jan 2020 05:39:34 +0000 (14:39 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 3 Feb 2020 08:09:12 +0000 (17:09 +0900)
Change-Id: I38f37263b1a763125e82a4d90f4df9f8ce9fd742

dali/internal/render/common/render-manager.cpp

index 35167ed..a1b527b 100644 (file)
@@ -759,22 +759,26 @@ void RenderManager::DoRender( RenderInstruction& instruction )
   }
 
   mImpl->currentContext->Viewport(viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height);
-  mImpl->currentContext->ClearColor( clearColor.r,
-                                     clearColor.g,
-                                     clearColor.b,
-                                     clearColor.a );
 
-  if( instruction.mIsClearColorSet && !clearFullFrameRect )
+  if( instruction.mIsClearColorSet )
   {
-    mImpl->currentContext->SetScissorTest( true );
-    mImpl->currentContext->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height );
-    mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
-    mImpl->currentContext->SetScissorTest( false );
-  }
-  else
-  {
-    mImpl->currentContext->SetScissorTest( false );
-    mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+    mImpl->currentContext->ClearColor( clearColor.r,
+                                       clearColor.g,
+                                       clearColor.b,
+                                       clearColor.a );
+
+    if( !clearFullFrameRect )
+    {
+      mImpl->currentContext->SetScissorTest( true );
+      mImpl->currentContext->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height );
+      mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+      mImpl->currentContext->SetScissorTest( false );
+    }
+    else
+    {
+      mImpl->currentContext->SetScissorTest( false );
+      mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+    }
   }
 
   // Clear the list of bound textures