Remove list item in error case 09/292809/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 11 May 2023 08:22:48 +0000 (17:22 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 15 May 2023 06:43:39 +0000 (15:43 +0900)
Change-Id: I2835fef3080aa022495816bc7ec6bf9e43c83f24

dali/internal/window-system/common/window-render-surface.cpp

index 1337ff8..1f9dcfc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -523,18 +523,18 @@ bool WindowRenderSurface::PreRender(bool resizingSurface, const std::vector<Rect
     */
   if(scene && resizingSurface)
   {
-    int totalAngle = 0;
+    int  totalAngle                  = 0;
     bool isScreenOrientationChanging = false;
 
     if(mWindowRotationAngle != scene.GetCurrentSurfaceOrientation())
     {
-      mWindowRotationAngle = scene.GetCurrentSurfaceOrientation();
+      mWindowRotationAngle         = scene.GetCurrentSurfaceOrientation();
       mIsWindowOrientationChanging = true;
     }
 
     if(mScreenRotationAngle != scene.GetCurrentScreenOrientation())
     {
-      mScreenRotationAngle = scene.GetCurrentScreenOrientation();
+      mScreenRotationAngle        = scene.GetCurrentScreenOrientation();
       isScreenOrientationChanging = true;
     }
     totalAngle = (mWindowRotationAngle + mScreenRotationAngle) % 360;
@@ -543,7 +543,7 @@ bool WindowRenderSurface::PreRender(bool resizingSurface, const std::vector<Rect
 
     Rect<int> surfaceSize = scene.GetCurrentSurfaceRect();
     //update surface size
-    mPositionSize.width = surfaceSize.width;
+    mPositionSize.width  = surfaceSize.width;
     mPositionSize.height = surfaceSize.height;
 
     DALI_LOG_RELEASE_INFO("Window is resizing, (%d, %d), [%d x %d]\n", mPositionSize.x, mPositionSize.y, mPositionSize.width, mPositionSize.height);
@@ -774,13 +774,6 @@ void WindowRenderSurface::ProcessFrameCallback()
 
 void WindowRenderSurface::OnFileDescriptorEventDispatched(FileDescriptorMonitor::EventType eventBitMask, int fileDescriptor)
 {
-  if(!(eventBitMask & FileDescriptorMonitor::FD_READABLE))
-  {
-    DALI_LOG_ERROR("WindowRenderSurface::OnFileDescriptorEventDispatched: file descriptor error [%d]\n", eventBitMask);
-    close(fileDescriptor);
-    return;
-  }
-
   DALI_LOG_RELEASE_INFO("WindowRenderSurface::OnFileDescriptorEventDispatched: Frame rendered [%d]\n", fileDescriptor);
 
   std::unique_ptr<FrameCallbackInfo> callbackInfo;
@@ -798,7 +791,7 @@ void WindowRenderSurface::OnFileDescriptorEventDispatched(FileDescriptorMonitor:
   }
 
   // Call the connected callback
-  if(callbackInfo)
+  if(callbackInfo && (eventBitMask & FileDescriptorMonitor::FD_READABLE))
   {
     for(auto&& iter : (callbackInfo)->callbacks)
     {
@@ -819,7 +812,7 @@ void WindowRenderSurface::SetBufferDamagedRects(const std::vector<Rect<int>>& da
     Dali::Integration::Scene scene = mScene.GetHandle();
     if(scene)
     {
-      surfaceRect = scene.GetCurrentSurfaceRect();
+      surfaceRect        = scene.GetCurrentSurfaceRect();
       int32_t totalAngle = scene.GetCurrentSurfaceOrientation() + scene.GetCurrentScreenOrientation();
       if(totalAngle >= 360)
       {