Bug 1823365 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Lee Salzman [:lsalzman] from comment #2)
> Jonathan, ideas about how to make this thread-safe? Could we conceivably just disable missing glyphs on worker threads and side-step the issue?

I guess that'd be possible, though it seems generally bad for us to handle text rendering differently depending whether we're on a worker or the main thread.

Another option may be to consolidate the glyph-atlas globals into a single record, so we just have one global pointer to manage, and then ensure that whatever thread needs to use it can atomically take ownership of that record the duration of its operation.

I've started to put together a patch to do the latter; let's see if it seems to work without too much pain.
(In reply to Lee Salzman [:lsalzman] from comment #2)
> Jonathan, ideas about how to make this thread-safe? Could we conceivably just disable missing glyphs on worker threads and side-step the issue?

I guess that'd be possible, though it seems generally bad for us to handle text rendering differently depending whether we're on a worker or the main thread.

Another option may be to consolidate the glyph-atlas globals into a single record, so we just have one global pointer to manage, and then ensure that whatever thread needs to use it can atomically take ownership of that record for the duration of its operation.

I've started to put together a patch to do the latter; let's see if it seems to work without too much pain.

Back to Bug 1823365 Comment 3