| 639 | } |
| 640 | |
| 641 | void ViewNodeTree::flushOnDrawCallbacks() { |
| 642 | if (_onDrawCallbacks.empty()) { |
| 643 | return; |
| 644 | } |
| 645 | |
| 646 | auto rootView = getRootView(); |
| 647 | if (rootView == nullptr) { |
| 648 | return; |
| 649 | } |
| 650 | |
| 651 | auto onDrawCallbacks = std::move(_onDrawCallbacks); |
| 652 | auto& transaction = getCurrentViewTransactionScope().transaction(); |
| 653 | for (const auto& onDrawCallback : onDrawCallbacks) { |
| 654 | if (onDrawCallback == nullptr) { |
| 655 | continue; |
| 656 | } |
| 657 | |
| 658 | transaction.scheduleOnNextDraw( |
| 659 | rootView, [onDrawCallback]() { (*onDrawCallback)({Value(TimePoint::now().getTime() * 1000.0)}); }); |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | ViewNodesVisibilityObserver* ViewNodeTree::getViewNodesVisibilityObserver() const { |
| 664 | return _visibilityObserver.get(); |
nothing calls this directly
no test coverage detected