[Tizen] Fix a bug that RenderTask::SetClearEnabled(false) doesn't work 88/224088/3 accepted/tizen/5.5/unified/20200219.071422 submit/tizen_5.5/20200212.054229 submit/tizen_5.5/20200214.020309 submit/tizen_5.5/20200217.020405 submit/tizen_5.5/20200218.013117
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 31 Jan 2020 05:39:34 +0000 (14:39 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 6 Feb 2020 07:00:55 +0000 (16:00 +0900)
Change-Id: I38f37263b1a763125e82a4d90f4df9f8ce9fd742

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

index adddfa2..747f5b3 100755 (executable)
@@ -917,30 +917,34 @@ 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 );
-    if( isPartialUpdate )
+    mImpl->currentContext->ClearColor( clearColor.r,
+                                       clearColor.g,
+                                       clearColor.b,
+                                       clearColor.a );
+
+    if( !clearFullFrameRect )
     {
-      intersectRect = IntersectAABB( scissorBox, viewportRect );
-      mImpl->currentContext->Scissor( intersectRect.x, intersectRect.y, intersectRect.width, intersectRect.height );
+      mImpl->currentContext->SetScissorTest( true );
+      if( isPartialUpdate )
+      {
+        intersectRect = IntersectAABB( scissorBox, viewportRect );
+        mImpl->currentContext->Scissor( intersectRect.x, intersectRect.y, intersectRect.width, intersectRect.height );
+      }
+      else
+      {
+        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->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height );
+      mImpl->currentContext->SetScissorTest( false );
+      mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
     }
-    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
@@ -1042,4 +1046,4 @@ void RenderManager::DoRender( RenderInstruction& instruction )
 
 } // namespace Internal
 
-} // namespace Dali
\ No newline at end of file
+} // namespace Dali