-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix ImageSource not working in FF/Safari #10230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't qualify this fix as hacky, it's fairly common to defer cpu resource deletion to a later frame to ensure graphics APIs can still retrieve the data. The concern is whether we are confident that a single frame is enough in that situation, and the fix does indeed work great on both firefox and safari.
In the announcement of V2, "Updates to the v1 releases will be made only for critical browser compatibility" is mentioned. Any chance for an emergency backport of this? The entire image source feature is broken in Firefox. |
@lights0123 yes, we're planning to do a v1.13 patch release with this fix in a few days. |
@lights0123 we released this as a patch v1.13.1 |
Summary: upgrades mapbox to 1.13.1, node bearings were not showing in firefox/safari presumably due to: mapbox/mapbox-gl-js#10230 allow-large-files Reviewed By: cjminer505 Differential Revision: D28098026 fbshipit-source-id: 972b3df93f3b471f81c171f588500182e5a40822
Closes #10226. Closes #10230. Turns out that since Safari/FF don't support offscreen canvas, ImageSource uses the old blob url image loading hack, however the image isn't bound to a GL texture immediately because this is deferred to a separate
prepare
step. This leads to image sources trying to upload an image to GL that was already reset.This is a hacky workaround — wait until the next frame before releasing the image, so that
prepare
passes can happen before. But it may be fragile — we should have a hard look at the architecture here and make it more resilient.Launch Checklist
mapbox-gl-js
changelog:<changelog>Fix ImageSource not working in some cases in Firefox & Safari.</changelog>