FocusFinder use CalculateCurrentScreenExtents 40/292840/4
authorEunki Hong <eunkiki.hong@samsung.com>
Mon, 15 May 2023 15:14:48 +0000 (00:14 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Thu, 15 Jun 2023 04:23:06 +0000 (04:23 +0000)
Let we use CalculateCurrentScreenExtents instead of CalculateScreenExtents
during find next focusable actor.
Since CalculateScreenExtents is heavy job, we'd better use
CalculateCurrentScreenExtents, what we were used until now.

Change-Id: Ic59f23869c549457ce622899876cef178dabb63b
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
dali-toolkit/devel-api/focus-manager/focus-finder.cpp

index 71934f0..c007888 100644 (file)
@@ -360,7 +360,7 @@ Actor FindNextFocus(Actor& actor, Actor& focusedActor, Rect<float>& focusedRect,
       Dali::Actor child = actor.GetChildAt(i-1);\r
       if(child && child != focusedActor && IsFocusable(child))\r
       {\r
-        Rect<float> candidateRect = DevelActor::CalculateScreenExtents(child);\r
+        Rect<float> candidateRect = DevelActor::CalculateCurrentScreenExtents(child);\r
 \r
         // convert x, y, width, height -> left, right, bottom, top\r
         ConvertCoordinate(candidateRect);\r
@@ -395,12 +395,12 @@ Actor GetNearestFocusableActor(Actor rootActor, Actor focusedActor, Toolkit::Con
   if (!focusedActor)\r
   {\r
     // If there is no currently focused actor, it is searched based on the upper left corner of the current window.\r
-    Rect<float> rootRect = DevelActor::CalculateScreenExtents(rootActor);\r
+    Rect<float> rootRect = DevelActor::CalculateCurrentScreenExtents(rootActor);\r
     focusedRect = Rect<float>(rootRect.x, rootRect.y, 0.f, 0.f);\r
   }\r
   else\r
   {\r
-    focusedRect = DevelActor::CalculateScreenExtents(focusedActor);\r
+    focusedRect = DevelActor::CalculateCurrentScreenExtents(focusedActor);\r
   }\r
 \r
 \r