webgpu: Fix HTML event loop integration (#34631)

* webgpu: Fix HTML event loop integration

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Bring back self.drawing_buffer.borrow().cleared

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Rc webgpu_contexts

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-12-17 07:13:44 +01:00 committed by GitHub
parent 4ddcba240b
commit b7e528d2ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 57 additions and 24 deletions

View file

@ -1621,6 +1621,9 @@ impl ScriptThread {
// TODO(#31871): Update the rendering: consolidate all reflow calls into one here?
#[cfg(feature = "webgpu")]
document.update_rendering_of_webgpu_canvases();
// > Step 22: For each doc of docs, update the rendering or user interface of
// > doc and its node navigable to reflect the current state.
let window = document.window();