[Tizen] make thread safe in update-render thread 21/274021/1 accepted/tizen/6.0/unified/20220513.142015 submit/tizen_6.0/20220512.140928
authorseungho <sbsh.baek@samsung.com>
Wed, 20 Apr 2022 05:39:12 +0000 (14:39 +0900)
committerseungho <sbsh.baek@samsung.com>
Wed, 20 Apr 2022 05:39:12 +0000 (14:39 +0900)
Change-Id: Ia03ac9ab7506e091ceb11cef2bc8eb05a415065d
Signed-off-by: seungho <sbsh.baek@samsung.com>
dali/internal/adaptor/common/combined-update-render-controller.cpp

index 82662a9..cacb4e6 100644 (file)
@@ -587,6 +587,8 @@ void CombinedUpdateRenderController::UpdateRenderThread()
   {
     LOG_UPDATE_RENDER_TRACE;
 
+    bool uploadOnly = mUploadWithoutRendering;
+
     // Performance statistics are logged upon a VSYNC tick so use this point for a VSync marker
     AddPerformanceMarker( PerformanceInterface::VSYNC );
 
@@ -666,7 +668,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
                   updateStatus,
                   renderToFboEnabled,
                   isRenderingToFbo,
-                  mUploadWithoutRendering);
+                  uploadOnly);
     AddPerformanceMarker( PerformanceInterface::UPDATE_END );
 
     unsigned int keepUpdatingStatus = updateStatus.KeepUpdating();
@@ -729,9 +731,9 @@ void CombinedUpdateRenderController::UpdateRenderThread()
     AddPerformanceMarker( PerformanceInterface::RENDER_START );
 
     // Upload shared resources
-    mCore.PreRender( renderStatus, mForceClear, mUploadWithoutRendering );
+    mCore.PreRender( renderStatus, mForceClear, uploadOnly );
 
-    if ( !mUploadWithoutRendering )
+    if ( !uploadOnly )
     {
       // Go through each window
       WindowContainer windows;
@@ -778,7 +780,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
       }
     }
 
-    mCore.PostRender( mUploadWithoutRendering );
+    mCore.PostRender( uploadOnly );
 
     //////////////////////////////
     // DELETE SURFACE