From: Eunki, Hong Date: Tue, 13 Aug 2024 02:36:34 +0000 (+0900) Subject: Ensure render once after we set surface full swap X-Git-Tag: dali_2.3.37~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F316053%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Ensure render once after we set surface full swap It is possible if event thread running too slow, the surface's full swap infomatin might not be applied to update render thread. For example : When OnIconifyChanged come, mAdaptor->Resume() called so combined update render thread wake up. But it is possible that window render surface's SetFullSwapNextFrame() not be called until the end of render loop. If then, the full scene rendering might be skiped after Adaptor resume finished. To avoid this kind of issue, let we request update once when SetFullSwapNextFrame() called after ProcessCoreEvents(). Change-Id: I40e738f6a7d56f1abd3e6d0dec37ad0de5a57994 Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 867abc6..59e4504 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -587,6 +587,12 @@ void Window::Show() mSurface->SetFullSwapNextFrame(); + // Need to update/render once if surface set full swaped after adaptor call ProcessCoreEvents(). + if(DALI_LIKELY(mAdaptor)) + { + mAdaptor->RequestUpdateOnce(); + } + DALI_LOG_RELEASE_INFO("Window (%p), WinId (%d), Show(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible); } @@ -772,6 +778,12 @@ void Window::SetSize(Dali::Window::WindowSize size) } mSurface->SetFullSwapNextFrame(); + + // Need to update/render once if surface set full swaped after adaptor call ProcessCoreEvents(). + if(DALI_LIKELY(mAdaptor)) + { + mAdaptor->RequestUpdateOnce(); + } } Dali::Window::WindowSize Window::GetSize() const @@ -877,6 +889,12 @@ void Window::SetPositionSize(PositionSize positionSize) } mSurface->SetFullSwapNextFrame(); + + // Need to update/render once if surface set full swaped after adaptor call ProcessCoreEvents(). + if(DALI_LIKELY(mAdaptor)) + { + mAdaptor->RequestUpdateOnce(); + } } void Window::SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan) @@ -994,6 +1012,12 @@ void Window::OnIconifyChanged(bool iconified) } mSurface->SetFullSwapNextFrame(); + + // Need to update/render once if surface set full swaped after adaptor call ProcessCoreEvents(). + if(DALI_LIKELY(mAdaptor)) + { + mAdaptor->RequestUpdateOnce(); + } } void Window::OnMaximizeChanged(bool maximized) @@ -1126,6 +1150,12 @@ void Window::OnUpdatePositionSize(Dali::PositionSize& positionSize) } mSurface->SetFullSwapNextFrame(); + + // Need to update/render once if surface set full swaped after adaptor call ProcessCoreEvents(). + if(DALI_LIKELY(mAdaptor)) + { + mAdaptor->RequestUpdateOnce(); + } } void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp) @@ -1223,6 +1253,12 @@ void Window::OnResume() } mSurface->SetFullSwapNextFrame(); + + // Need to update/render once if surface set full swaped after adaptor call ProcessCoreEvents(). + if(DALI_LIKELY(mAdaptor)) + { + mAdaptor->RequestUpdateOnce(); + } } void Window::OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options)