From 13f211c6515af99b1afd4fa292dbf8c6da0d8b7b Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 29 Aug 2022 16:53:28 +0900 Subject: [PATCH] Do not call SetBufferDamagedRects if the damaged rect is empty An empty damaged rect means we will not render the scene and not swap buffers. A call to eglSetDamageRegion without out eglSwapBuffers may cause EGL_BAD_ACCESS error. Change-Id: I949498c39d9a558b42b7e2edbbe1162f432e87b8 --- .../internal/window-system/common/window-render-surface.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 22ac0f3..8dd26e9 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -636,12 +636,6 @@ bool WindowRenderSurface::PreRender(bool resizingSurface, const std::vector>& da return; } + if(damagedRects.empty()) + { + // Empty damaged rect. We don't need rendering + clippingRect = Rect(); + return; + } + mGraphics->ActivateSurfaceContext(this); EGLint bufferAge = eglImpl.GetBufferAge(mEGLSurface); -- 2.7.4