From: Heeyong Song Date: Mon, 29 Aug 2022 07:53:28 +0000 (+0900) Subject: Do not call SetBufferDamagedRects if the damaged rect is empty X-Git-Tag: dali_2.1.38~2^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=13f211c6515af99b1afd4fa292dbf8c6da0d8b7b 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 --- 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);