2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/event/events/touch-event-processor.h>
21 #if defined(DEBUG_ENABLED)
26 #include <dali/integration-api/debug.h>
27 #include <dali/integration-api/events/touch-event-integ.h>
28 #include <dali/integration-api/trace.h>
29 #include <dali/internal/event/actors/actor-impl.h>
30 #include <dali/internal/event/actors/layer-impl.h>
31 #include <dali/internal/event/common/scene-impl.h>
32 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
33 #include <dali/internal/event/events/multi-point-event-util.h>
34 #include <dali/internal/event/events/touch-event-impl.h>
35 #include <dali/internal/event/render-tasks/render-task-impl.h>
36 #include <dali/public-api/events/touch-event.h>
37 #include <dali/public-api/math/vector2.h>
38 #include <dali/public-api/signals/callback.h>
46 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
47 #if defined(DEBUG_ENABLED)
48 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_TOUCH_PROCESSOR");
49 #endif // defined(DEBUG_ENABLED)
51 const char* TOUCH_POINT_STATE[6] =
61 bool ShouldEmitInterceptTouchEvent(const Actor& actorImpl, const Dali::TouchEvent& event)
63 PointState::Type state = event.GetState(0);
64 return actorImpl.GetInterceptTouchRequired() && (state!= PointState::MOTION || actorImpl.IsDispatchTouchMotion());
67 bool ShouldEmitTouchEvent(const Actor& actorImpl, const Dali::TouchEvent& event)
69 PointState::Type state = event.GetState(0);
70 return actorImpl.GetTouchRequired() && (state!= PointState::MOTION || actorImpl.IsDispatchTouchMotion());
73 Dali::Actor EmitInterceptTouchSignals(Dali::Actor actor, const Dali::TouchEvent& touchEvent)
75 Dali::Actor interceptedActor;
79 Dali::Actor parent = actor.GetParent();
82 // Recursively deliver events to the actor and its parents for intercept touch event.
83 interceptedActor = EmitInterceptTouchSignals(parent, touchEvent);
88 bool intercepted = false;
89 Actor& actorImpl(GetImplementation(actor));
90 if(ShouldEmitInterceptTouchEvent(actorImpl, touchEvent))
92 DALI_TRACE_SCOPE(gTraceFilter, "DALI_EMIT_INTERCEPT_TOUCH_EVENT_SIGNAL");
93 intercepted = actorImpl.EmitInterceptTouchEventSignal(touchEvent);
96 interceptedActor = Dali::Actor(&actorImpl);
102 return interceptedActor;
106 * Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached.
108 Dali::Actor EmitTouchSignals(Dali::Actor actor, const Dali::TouchEvent& touchEvent)
110 Dali::Actor consumedActor;
114 Dali::Actor oldParent(actor.GetParent());
116 Actor& actorImpl(GetImplementation(actor));
118 bool consumed(false);
120 // Only emit the signal if the actor's touch signal has connections (or derived actor implementation requires touch).
121 if(ShouldEmitTouchEvent(actorImpl, touchEvent))
123 DALI_TRACE_SCOPE(gTraceFilter, "DALI_EMIT_TOUCH_EVENT_SIGNAL");
124 consumed = actorImpl.EmitTouchEventSignal(touchEvent);
129 // One of this actor's listeners has consumed the event so set this actor as the consumed actor.
130 consumedActor = Dali::Actor(&actorImpl);
134 // The actor may have been removed/reparented during the signal callbacks.
135 Dali::Actor parent = actor.GetParent();
138 (parent == oldParent))
140 // One of the actor's parents may consumed the event and they should be set as the consumed actor.
141 consumedActor = EmitTouchSignals(parent, touchEvent);
146 return consumedActor;
149 Dali::Actor AllocAndEmitTouchSignals(unsigned long time, Dali::Actor actor, const Integration::Point& point)
151 TouchEventPtr touchEvent(new TouchEvent(time));
152 Dali::TouchEvent touchEventHandle(touchEvent.Get());
154 touchEvent->AddPoint(point);
156 return EmitTouchSignals(actor, touchEventHandle);
160 * Changes the state of the primary point to leave and emits the touch signals
162 Dali::Actor EmitTouchSignals(Actor* actor, RenderTask& renderTask, const TouchEventPtr& originalTouchEvent, PointState::Type state)
164 Dali::Actor consumingActor;
168 TouchEventPtr touchEventImpl = TouchEvent::Clone(*originalTouchEvent.Get());
170 Integration::Point& primaryPoint = touchEventImpl->GetPoint(0);
172 const Vector2& screenPosition = primaryPoint.GetScreenPosition();
173 Vector2 localPosition;
174 actor->ScreenToLocal(renderTask, localPosition.x, localPosition.y, screenPosition.x, screenPosition.y);
176 primaryPoint.SetLocalPosition(localPosition);
177 primaryPoint.SetHitActor(Dali::Actor(actor));
178 primaryPoint.SetState(state);
180 consumingActor = EmitTouchSignals(Dali::Actor(actor), Dali::TouchEvent(touchEventImpl.Get()));
183 return consumingActor;
187 * @brief Parses the primary touch point by performing a hit-test if necessary
189 * @param[out] hitTestResults The hit test results are put into this variable
190 * @param[in/out] capturingTouchActorObserver The observer for the capturing touch actor member
191 * @param[in] lastRenderTask The last render task member
192 * @param[in] currentPoint The current point information
193 * @param[in] scene The scene that this touch is related to
195 void ParsePrimaryTouchPoint(
196 HitTestAlgorithm::Results& hitTestResults,
197 ActorObserver& capturingTouchActorObserver,
198 ActorObserver& ownTouchActorObserver,
199 const RenderTaskPtr& lastRenderTask,
200 const Integration::Point& currentPoint,
201 const Internal::Scene& scene)
203 Actor* capturingTouchActor = capturingTouchActorObserver.GetActor();
205 // We only set the capturing touch actor when the first touch-started actor captures all touch so if it's set, just use it
206 if(capturingTouchActor && lastRenderTask)
208 hitTestResults.actor = Dali::Actor(capturingTouchActor);
209 hitTestResults.renderTask = lastRenderTask;
210 const Vector2& screenPosition = currentPoint.GetScreenPosition();
211 capturingTouchActor->ScreenToLocal(*lastRenderTask, hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y, screenPosition.x, screenPosition.y);
215 Actor* ownTouchActor = ownTouchActorObserver.GetActor();
216 HitTestAlgorithm::HitTest(scene.GetSize(), scene.GetRenderTaskList(), scene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults, ownTouchActor);
218 if(currentPoint.GetState() == PointState::STARTED && hitTestResults.actor)
220 // If we've just started touch, then check whether the actor has requested to capture all touch events
221 Actor* hitActor = &GetImplementation(hitTestResults.actor);
222 if(hitActor->CapturesAllTouchAfterStart())
224 capturingTouchActorObserver.SetActor(hitActor);
226 if(hitActor->IsAllowedOnlyOwnTouch())
228 ownTouchActorObserver.SetActor(hitActor);
234 } // unnamed namespace
236 TouchEventProcessor::TouchEventProcessor(Scene& scene)
238 mLastPrimaryHitActor(MakeCallback(this, &TouchEventProcessor::OnObservedActorDisconnected)),
239 mLastConsumedActor(),
240 mCapturingTouchActor(),
242 mTouchDownConsumedActor(),
243 mInterceptedTouchActor(),
245 mLastPrimaryPointState(PointState::FINISHED)
247 DALI_LOG_TRACE_METHOD(gLogFilter);
250 TouchEventProcessor::~TouchEventProcessor()
252 DALI_LOG_TRACE_METHOD(gLogFilter);
255 void TouchEventProcessor::Clear()
257 mLastPrimaryHitActor.SetActor(nullptr);
258 mLastConsumedActor.SetActor(nullptr);
259 mCapturingTouchActor.SetActor(nullptr);
260 mOwnTouchActor.SetActor(nullptr);
261 mInterceptedTouchActor.SetActor(nullptr);
262 mLastRenderTask.Reset();
263 mLastPrimaryPointState = PointState::FINISHED;
266 bool TouchEventProcessor::ProcessTouchEvent(const Integration::TouchEvent& event)
268 DALI_LOG_TRACE_METHOD(gLogFilter);
269 DALI_ASSERT_ALWAYS(!event.points.empty() && "Empty TouchEvent sent from Integration\n");
271 PRINT_HIERARCHY(gLogFilter);
273 DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_TOUCH_EVENT");
275 // 1) Check if it is an interrupted event - we should inform our last primary hit actor about this
276 // and emit the stage signal as well.
278 if(event.points[0].GetState() == PointState::INTERRUPTED)
280 Dali::Actor consumingActor;
281 Integration::Point currentPoint(event.points[0]);
283 Actor* lastPrimaryHitActor(mLastPrimaryHitActor.GetActor());
284 if(lastPrimaryHitActor)
286 Dali::Actor lastPrimaryHitActorHandle(lastPrimaryHitActor);
287 currentPoint.SetHitActor(lastPrimaryHitActorHandle);
289 consumingActor = AllocAndEmitTouchSignals(event.time, lastPrimaryHitActorHandle, currentPoint);
292 // If the last consumed actor was different to the primary hit actor then inform it as well (if it has not already been informed).
293 Actor* lastConsumedActor(mLastConsumedActor.GetActor());
294 if(lastConsumedActor &&
295 lastConsumedActor != lastPrimaryHitActor &&
296 lastConsumedActor != consumingActor)
298 Dali::Actor lastConsumedActorHandle(lastConsumedActor);
299 currentPoint.SetHitActor(lastConsumedActorHandle);
300 AllocAndEmitTouchSignals(event.time, lastConsumedActorHandle, currentPoint);
303 // Tell the touch-down consuming actor as well, if required
304 Actor* touchDownConsumedActor(mTouchDownConsumedActor.GetActor());
305 if(touchDownConsumedActor &&
306 touchDownConsumedActor != lastPrimaryHitActor &&
307 touchDownConsumedActor != lastConsumedActor &&
308 touchDownConsumedActor != consumingActor)
310 Dali::Actor touchDownConsumedActorHandle(touchDownConsumedActor);
312 currentPoint.SetHitActor(touchDownConsumedActorHandle);
313 AllocAndEmitTouchSignals(event.time, touchDownConsumedActorHandle, currentPoint);
317 mTouchDownConsumedActor.SetActor(nullptr);
319 currentPoint.SetHitActor(Dali::Actor());
321 TouchEventPtr touchEventImpl(new TouchEvent(event.time));
322 Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
324 touchEventImpl->AddPoint(currentPoint);
326 mScene.EmitTouchedSignal(touchEventHandle);
327 return false; // No need for hit testing & already an interrupted event so just return false
331 TouchEventPtr touchEventImpl(new TouchEvent(event.time));
332 Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
334 DALI_LOG_INFO(gLogFilter, Debug::Concise, "\n");
335 DALI_LOG_INFO(gLogFilter, Debug::General, "Point(s): %d\n", event.GetPointCount());
337 RenderTaskPtr currentRenderTask;
338 bool firstPointParsed = false;
340 for(auto&& currentPoint : event.points)
342 HitTestAlgorithm::Results hitTestResults;
343 hitTestResults.point = currentPoint;
344 hitTestResults.eventTime = event.time;
345 if(!firstPointParsed)
347 firstPointParsed = true;
348 ParsePrimaryTouchPoint(hitTestResults, mCapturingTouchActor, mOwnTouchActor, mLastRenderTask, currentPoint, mScene);
350 // Only set the currentRenderTask for the primary hit actor.
351 currentRenderTask = hitTestResults.renderTask;
355 HitTestAlgorithm::HitTest(mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), currentPoint.GetScreenPosition(), hitTestResults);
358 Integration::Point newPoint(currentPoint);
359 newPoint.SetHitActor(hitTestResults.actor);
360 newPoint.SetLocalPosition(hitTestResults.actorCoordinates);
362 touchEventImpl->AddPoint(newPoint);
364 DALI_LOG_INFO(gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n", TOUCH_POINT_STATE[currentPoint.GetState()], currentPoint.GetScreenPosition().x, currentPoint.GetScreenPosition().y, (hitTestResults.actor ? reinterpret_cast<void*>(&hitTestResults.actor.GetBaseObject()) : NULL), (hitTestResults.actor ? hitTestResults.actor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : ""), hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y);
367 // 3) Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached.
369 bool consumed = false;
371 // Emit the touch signal
372 Dali::Actor consumedActor;
374 Integration::Point& primaryPoint = touchEventImpl->GetPoint(0);
375 Dali::Actor primaryHitActor = primaryPoint.GetHitActor();
376 PointState::Type primaryPointState = primaryPoint.GetState();
378 if(currentRenderTask)
380 Actor* interceptedTouchActor(mInterceptedTouchActor.GetActor());
381 if(interceptedTouchActor)
383 Dali::Actor interceptedTouchActorHandle(interceptedTouchActor);
384 consumedActor = EmitTouchSignals(interceptedTouchActorHandle, touchEventHandle);
388 // Emit the intercept touch signal
389 Dali::Actor interceptedActor = EmitInterceptTouchSignals(primaryHitActor, touchEventHandle);
392 mInterceptedTouchActor.SetActor(&GetImplementation(interceptedActor));
393 // If the child is being touched, INTERRUPTED is sent.
394 if(mLastPrimaryHitActor.GetActor() &&
395 mLastPrimaryHitActor.GetActor() != interceptedActor &&
397 mLastPrimaryPointState != PointState::FINISHED)
399 EmitTouchSignals(mLastPrimaryHitActor.GetActor(), *mLastRenderTask.Get(), touchEventImpl, PointState::INTERRUPTED);
400 mTouchDownConsumedActor.SetActor(nullptr);
402 consumedActor = EmitTouchSignals(interceptedActor, touchEventHandle);
406 consumedActor = EmitTouchSignals(primaryHitActor, touchEventHandle);
409 consumed = consumedActor ? true : false;
411 if(primaryPointState == PointState::MOTION)
413 DALI_LOG_INFO(gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) id(%d), name(%s), state(%s), screenPosition(%f, %f)\n", primaryHitActor ? reinterpret_cast<void*>(&primaryHitActor.GetBaseObject()) : NULL, primaryHitActor ? primaryHitActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, primaryHitActor ? primaryHitActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", TOUCH_POINT_STATE[primaryPointState], primaryPoint.GetScreenPosition().x, primaryPoint.GetScreenPosition().y);
414 DALI_LOG_INFO(gLogFilter, Debug::Concise, "ConsumedActor: (%p) id(%d), name(%s), state(%s)\n", consumedActor ? reinterpret_cast<void*>(&consumedActor.GetBaseObject()) : NULL, consumedActor ? consumedActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, consumedActor ? consumedActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", TOUCH_POINT_STATE[primaryPointState]);
418 DALI_LOG_RELEASE_INFO("PrimaryHitActor:(%p), id(%d), name(%s), state(%s)\n", primaryHitActor ? reinterpret_cast<void*>(&primaryHitActor.GetBaseObject()) : NULL, primaryHitActor ? primaryHitActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, primaryHitActor ? primaryHitActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", TOUCH_POINT_STATE[primaryPointState]);
419 DALI_LOG_RELEASE_INFO("ConsumedActor: (%p), id(%d), name(%s), state(%s)\n", consumedActor ? reinterpret_cast<void*>(&consumedActor.GetBaseObject()) : NULL, consumedActor ? consumedActor.GetProperty<int32_t>(Dali::Actor::Property::ID) : -1, consumedActor ? consumedActor.GetProperty<std::string>(Dali::Actor::Property::NAME).c_str() : "", TOUCH_POINT_STATE[primaryPointState]);
423 if((primaryPointState == PointState::DOWN) &&
424 (touchEventImpl->GetPointCount() == 1) &&
425 (consumedActor && consumedActor.GetProperty<bool>(Dali::Actor::Property::CONNECTED_TO_SCENE)))
427 mTouchDownConsumedActor.SetActor(&GetImplementation(consumedActor));
430 // 4) Check if the last primary hit actor requires a leave event and if it was different to the current primary
431 // hit actor. Also process the last consumed actor in the same manner.
432 Actor* lastPrimaryHitActor(nullptr);
433 if(mInterceptedTouchActor.GetActor())
435 lastPrimaryHitActor = mInterceptedTouchActor.GetActor();
439 lastPrimaryHitActor = mLastPrimaryHitActor.GetActor();
441 Actor* lastConsumedActor(mLastConsumedActor.GetActor());
442 if((primaryPointState == PointState::MOTION) || (primaryPointState == PointState::UP) || (primaryPointState == PointState::STATIONARY))
446 Dali::Actor leaveEventConsumer;
447 RenderTask& lastRenderTaskImpl = *mLastRenderTask.Get();
449 if(lastPrimaryHitActor &&
450 lastPrimaryHitActor != primaryHitActor &&
451 lastPrimaryHitActor != consumedActor)
453 if(lastPrimaryHitActor->IsHittable() && IsActuallySensitive(lastPrimaryHitActor))
455 if(lastPrimaryHitActor->GetLeaveRequired())
457 DALI_LOG_RELEASE_INFO("LeaveActor(Hit): (%p) %d %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetId(), lastPrimaryHitActor->GetName().data());
458 leaveEventConsumer = EmitTouchSignals(lastPrimaryHitActor, lastRenderTaskImpl, touchEventImpl, PointState::LEAVE);
463 // At this point mLastPrimaryHitActor was touchable and sensitive in the previous touch event process but is not in the current one.
464 // An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
465 DALI_LOG_RELEASE_INFO("InterruptedActor(Hit): (%p) %d %s\n", reinterpret_cast<void*>(lastPrimaryHitActor), lastPrimaryHitActor->GetId(), lastPrimaryHitActor->GetName().data());
466 leaveEventConsumer = EmitTouchSignals(lastPrimaryHitActor, lastRenderTaskImpl, touchEventImpl, PointState::INTERRUPTED);
470 consumed |= leaveEventConsumer ? true : false;
472 // Check if the motion event has been consumed by another actor's listener. In this case, the previously
473 // consumed actor's listeners may need to be informed (through a leave event).
474 // Further checks here to ensure we do not signal the same actor twice for the same event.
475 if(lastConsumedActor &&
476 lastConsumedActor != consumedActor &&
477 lastConsumedActor != lastPrimaryHitActor &&
478 lastConsumedActor != primaryHitActor &&
479 lastConsumedActor != leaveEventConsumer)
481 if(lastConsumedActor->IsHittable() && IsActuallySensitive(lastConsumedActor))
483 if(lastConsumedActor->GetLeaveRequired())
485 DALI_LOG_RELEASE_INFO("LeaveActor(Consume): (%p) %d %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetId(), lastConsumedActor->GetName().data());
486 EmitTouchSignals(lastConsumedActor, lastRenderTaskImpl, touchEventImpl, PointState::LEAVE);
491 // At this point mLastConsumedActor was touchable and sensitive in the previous touch event process but is not in the current one.
492 // An interrupted event is send to allow some actors to go back to their original state (i.e. Button controls)
493 DALI_LOG_RELEASE_INFO("InterruptedActor(Consume): (%p) %d %s\n", reinterpret_cast<void*>(lastConsumedActor), lastConsumedActor->GetId(), lastConsumedActor->GetName().data());
494 EmitTouchSignals(mLastConsumedActor.GetActor(), lastRenderTaskImpl, touchEventImpl, PointState::INTERRUPTED);
500 // 5) If our primary point is an Up event, then the primary point (in multi-touch) will change next
501 // time so set our last primary actor to NULL. Do the same to the last consumed actor as well.
502 if(primaryPointState == PointState::UP)
508 // The primaryHitActor may have been removed from the scene so ensure it is still on the scene before setting members.
509 if(primaryHitActor && GetImplementation(primaryHitActor).OnScene())
511 mLastPrimaryHitActor.SetActor(&GetImplementation(primaryHitActor));
513 // Only observe the consumed actor if we have a primaryHitActor (check if it is still on the scene).
514 if(consumedActor && GetImplementation(consumedActor).OnScene())
516 mLastConsumedActor.SetActor(&GetImplementation(consumedActor));
520 mLastConsumedActor.SetActor(nullptr);
523 mLastRenderTask = currentRenderTask;
524 mLastPrimaryPointState = primaryPointState;
532 // 6) Emit an interrupted event to the touch-down actor if it hasn't consumed the up and
533 // emit the stage touched event if required.
535 if(touchEventImpl->GetPointCount() == 1) // Only want the first touch and the last release
537 switch(primaryPointState)
541 Actor* touchDownConsumedActor(mTouchDownConsumedActor.GetActor());
542 if(touchDownConsumedActor &&
543 touchDownConsumedActor != consumedActor &&
544 touchDownConsumedActor != lastPrimaryHitActor &&
545 touchDownConsumedActor != lastConsumedActor)
547 Dali::Actor touchDownConsumedActorHandle(touchDownConsumedActor);
549 Integration::Point currentPoint = touchEventImpl->GetPoint(0);
550 currentPoint.SetHitActor(touchDownConsumedActorHandle);
551 currentPoint.SetState(PointState::INTERRUPTED);
553 AllocAndEmitTouchSignals(event.time, touchDownConsumedActorHandle, currentPoint);
556 mTouchDownConsumedActor.SetActor(nullptr);
557 mInterceptedTouchActor.SetActor(nullptr);
562 case PointState::DOWN:
564 mScene.EmitTouchedSignal(touchEventHandle);
568 case PointState::MOTION:
569 case PointState::LEAVE:
570 case PointState::STATIONARY:
571 case PointState::INTERRUPTED:
582 void TouchEventProcessor::OnObservedActorDisconnected(Actor* actor)
584 if(actor == mLastPrimaryHitActor.GetActor())
586 Dali::Actor actorHandle(actor);
588 Integration::Point point;
589 point.SetState(PointState::INTERRUPTED);
590 point.SetHitActor(actorHandle);
592 TouchEventPtr touchEventImpl(new TouchEvent);
593 touchEventImpl->AddPoint(point);
594 Dali::TouchEvent touchEventHandle(touchEventImpl.Get());
596 Dali::Actor eventConsumer = EmitTouchSignals(actorHandle, touchEventHandle);
598 if(mLastConsumedActor.GetActor() != eventConsumer)
600 EmitTouchSignals(Dali::Actor(mLastConsumedActor.GetActor()), touchEventHandle);
603 // Do not set mLastPrimaryHitActor to NULL we may be iterating through its observers
605 mLastConsumedActor.SetActor(nullptr);
606 mLastRenderTask.Reset();
607 mLastPrimaryPointState = PointState::FINISHED;
611 } // namespace Internal