[Tizen] Do not call PreRender if rendering will be skipped
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 14 Dec 2021 05:36:38 +0000 (14:36 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 14 Dec 2021 05:36:42 +0000 (14:36 +0900)
This reverts commit d016d5b607229f9de13e9754a57c68b4d31c586d.

Change-Id: I8520f06d2110ac36418668088e22f6aa421e6f73

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
dali/internal/adaptor/common/combined-update-render-controller.cpp

index 440270a..e71166b 100644 (file)
@@ -220,7 +220,7 @@ bool TestApplication::PreRenderWithPartialUpdate(uint32_t intervalMilliseconds,
   DoUpdate(intervalMilliseconds, location);
 
   mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
-  mCore->PreRender(mScene, damagedRects);
+  mCore->PreRender(mRenderStatus, mScene, damagedRects);
 
   return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
 }
index 356cec0..c8e0d1b 100644 (file)
@@ -694,7 +694,7 @@ void CombinedUpdateRenderController::UpdateRenderThread()
           mDamagedRects.clear();
 
           // Collect damage rects
-          mCore.PreRender(scene, mDamagedRects);
+          mCore.PreRender(windowRenderStatus, scene, mDamagedRects);
 
           // Render off-screen frame buffers first if any
           mCore.RenderScene(windowRenderStatus, scene, true);
@@ -702,7 +702,10 @@ void CombinedUpdateRenderController::UpdateRenderThread()
           Rect<int> clippingRect; // Empty for fbo rendering
 
           // Switch to the context of the surface, merge damaged areas for previous frames
-          windowSurface->PreRender(sceneSurfaceResized, mDamagedRects, clippingRect); // Switch GL context
+          if(windowRenderStatus.NeedsUpdate())
+          {
+            windowSurface->PreRender(sceneSurfaceResized, mDamagedRects, clippingRect); // Switch GL context
+          }
 
           // Render the surface
           mCore.RenderScene(windowRenderStatus, scene, false, clippingRect);