From: Heeyong Song Date: Fri, 31 Jan 2020 05:39:34 +0000 (+0900) Subject: Fix a bug that RenderTask::SetClearEnabled(false) doesn't work X-Git-Tag: dali_1.4.57~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F223598%2F2;p=platform%2Fcore%2Fuifw%2Fdali-core.git Fix a bug that RenderTask::SetClearEnabled(false) doesn't work Change-Id: I38f37263b1a763125e82a4d90f4df9f8ce9fd742 --- diff --git a/dali/internal/render/common/render-manager.cpp b/dali/internal/render/common/render-manager.cpp index 35167ed..a1b527b 100644 --- a/dali/internal/render/common/render-manager.cpp +++ b/dali/internal/render/common/render-manager.cpp @@ -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