From 8e64eff090963b496dd759b20c7f618ff60821ab Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Thu, 8 Sep 2022 11:23:26 +0900 Subject: [PATCH] [Tizen](Partial Update) partiall update after window rotation works well. Currently, mDamagedRects should be "rotated" rects, and others (clippingRect, mDamagedBufferRects) are not be rotated. But current clippingRect merged by rotated rects. This patch make clippingRect calculate well. And also, if clippingRect become empty, mDamagedRects should be cleared. Change-Id: I4c71d91ee01da67b42f446fb438c0e2fe29d1d67 --- dali/internal/window-system/common/window-render-surface.cpp | 5 ++--- dali/internal/window-system/common/window-render-surface.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 2eb946a..4f00430 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -623,7 +623,7 @@ bool WindowRenderSurface::PreRender(bool resizingSurface, const std::vector surfaceRect = scene.GetCurrentSurfaceRect(); if(clippingRect == surfaceRect) { - mDamagedRects.assign(1, surfaceRect); + mDamagedRects.assign(1, RecalculateRect[std::min(scene.GetCurrentSurfaceOrientation() / 90, 3)](surfaceRect, surfaceRect)); } } @@ -867,7 +867,6 @@ void WindowRenderSurface::SetBufferDamagedRects(const std::vector>& da { InsertRects(mBufferDamagedRects, surfaceRect); clippingRect = surfaceRect; - mDamagedRects.assign(1, RecalculateRect[orientation](surfaceRect, surfaceRect)); return; } @@ -875,6 +874,7 @@ void WindowRenderSurface::SetBufferDamagedRects(const std::vector>& da { // Empty damaged rect. We don't need rendering clippingRect = Rect(); + // Clean up current damanged rects. mDamagedRects.clear(); return; } @@ -888,7 +888,6 @@ void WindowRenderSurface::SetBufferDamagedRects(const std::vector>& da { InsertRects(mBufferDamagedRects, surfaceRect); clippingRect = surfaceRect; - mDamagedRects.assign(1, RecalculateRect[orientation](surfaceRect, surfaceRect)); return; } diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index 05e7bf7..660dfdb 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -338,7 +338,7 @@ private: // Data int mScreenRotationAngle; uint32_t mDpiHorizontal; uint32_t mDpiVertical; - std::vector> mDamagedRects{}; ///< Keeps collected damaged render items rects for one render pass + std::vector> mDamagedRects{}; ///< Keeps collected damaged render items rects for one render pass. These rects are rotated by scene orientation. bool mOwnSurface; ///< Whether we own the surface (responsible for deleting it) bool mWindowRotationFinished; bool mScreenRotationFinished; -- 2.7.4