ProcessCoreEvents();
}
+void Adaptor::IncreaseSurfaceResizeCounter()
+{
+ // Nofify surface resizing before flushing event queue
+ if(mThreadController)
+ {
+ mThreadController->ResizeSurface();
+ }
+}
+
void Adaptor::NotifySceneCreated()
{
GetCore().SceneCreated();
void SurfaceResizeComplete(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize);
/**
+ * @brief Increase surface resize completed counter.
+ * This API will be ignored if thread controller is not exist.
+ */
+ void IncreaseSurfaceResizeCounter();
+
+ /**
* Sets layout direction of root by system language
* @param[in] locale System locale
*/
{
Integration::RenderStatus windowRenderStatus;
- const bool sceneSurfaceResized = scene.IsSurfaceRectChanged();
+ const uint32_t sceneSurfaceResized = scene.GetSurfaceRectChangedCount();
// clear previous frame damaged render items rects, buffer history is tracked on surface level
mDamagedRects.clear();
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
+ windowSurface->PreRender(sceneSurfaceResized > 0u, mDamagedRects, clippingRect); // Switch GL context
// Render the surface
mCore.RenderScene(windowRenderStatus, scene, false, clippingRect);
// Buffer swapping now happens when the surface render target is presented.
// If surface is resized, the surface resized count is decreased.
- if(DALI_UNLIKELY(sceneSurfaceResized))
+ if(DALI_UNLIKELY(sceneSurfaceResized > 0u))
{
- SurfaceResized();
+ SurfaceResized(sceneSurfaceResized);
}
}
}
mSurfaceSemaphore.Release(1);
}
-void CombinedUpdateRenderController::SurfaceResized()
+void CombinedUpdateRenderController::SurfaceResized(uint32_t resizedCount)
{
ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
- if(mSurfaceResized)
+
+ if(mSurfaceResized >= resizedCount)
+ {
+ mSurfaceResized -= resizedCount;
+ }
+ else
{
- mSurfaceResized--;
+ mSurfaceResized = 0u;
}
}
* Called by the Update/Render thread after a surface has been resized.
*
* This will lock the mutex in mEventThreadWaitCondition
+ * @param[in] resizedCount The number of resized count for given surface.
*/
- void SurfaceResized();
+ void SurfaceResized(uint32_t resizedCount);
/**
* Helper for the thread calling the entry function