[Tizen] fix hit test for fbo rendertask 28/302928/1 accepted/tizen/7.0/unified/20231220.074656 accepted/tizen/7.0/unified/20231220.124900 accepted/tizen/7.0/unified/20231220.134945 accepted/tizen/7.0/unified/20231220.170051
authorseungho baek <sbsh.baek@samsung.com>
Fri, 19 May 2023 06:51:51 +0000 (15:51 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Fri, 15 Dec 2023 13:06:14 +0000 (22:06 +0900)
Change-Id: Ib0a06a51986a43367991f0d4946919223b58e1cf
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
dali/internal/event/events/hit-test-algorithm-impl.cpp

index 56e6871..8ddec9e 100644 (file)
@@ -617,12 +617,30 @@ bool HitTestRenderTaskList(const Vector2&    sceneSize,
   const auto&                                           exclusives = taskList.GetExclusivesList();
   RayTest                                               rayTest;
 
+  std::vector<std::pair<Dali::Actor, Results>> hitResults;
   // Hit test order should be reverse of draw order
   for(RenderTaskList::RenderTaskContainer::reverse_iterator iter = tasks.rbegin(); endIter != iter; ++iter)
   {
     RenderTask& renderTask = *iter->Get();
     if(HitTestRenderTask(exclusives, sceneSize, layers, renderTask, screenCoordinates, results, hitCheck, rayTest))
     {
+      if(renderTask.GetFrameBuffer())
+      {
+        Results result = results;
+        hitResults.push_back(std::make_pair(renderTask.GetScreenToFrameBufferMappingActor(), result));
+        continue;
+      }
+      else
+      {
+        for(auto && pair : hitResults)
+        {
+          if(pair.first == results.actor)
+          {
+            results = pair.second;
+            break;
+          }
+        }
+      }
       // Return true when an actor is hit (or layer in our render-task consumes the hit)
       return true;
     }