-
-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add back synced frame method and use it for triggerRepaint. #4535
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4535 +/- ##
===========================================
- Coverage 87.79% 65.29% -22.50%
===========================================
Files 246 246
Lines 33450 33457 +7
Branches 2219 1455 -764
===========================================
- Hits 29367 21847 -7520
- Misses 3081 10765 +7684
+ Partials 1002 845 -157 ☔ View full report in Codecov by Sentry. |
requestAnimationFrame is not a method that runs right away as far as I know, it might have higher priority than a promise, but I'm not sure I saw it anywhere, so I'm not sure I know how this fix will actually solve anything, but let me know if it does. In case this is not ready for review, please change it to a draft and ping me when you change it back to regular PR. THANKS! |
this experiment is not about the time between the call to requestAnimationFrame and when the passed callback is called, but about the time between the call to the passed callback and the actual map._render call. Currently the passed callback only schedules the _render and then returns whereas before the callback directly called _render.
|
Can we pass down the callback to the request animation frame and then call the resolve at the end? Would that work? Or is this the scratched out part in your comment? |
Launch Checklist
An experimental fix for #4534. With this I can again a capture a single frame with spector.js, as all the rendering is directly done inside the requestAnimationFrame callback.
Unfortunatly tests dont run through but fail after some random point. Probably a race I introduced?