Skip to content

Web: improve custom cursor loading#3321

Merged
daxpedda merged 1 commit intorust-windowing:masterfrom
daxpedda:web-custom-cursor-improvements
Dec 26, 2023
Merged

Web: improve custom cursor loading#3321
daxpedda merged 1 commit intorust-windowing:masterfrom
daxpedda:web-custom-cursor-improvements

Conversation

@daxpedda
Copy link
Copy Markdown
Member

@daxpedda daxpedda commented Dec 26, 2023

  • Instead of holding references to the cursor state of a Window during cursor loading, an event is sent.
  • The event can now properly handle loading a cursor for multiple Windows.
  • Reduce the amount of Arc upgrades to an absolute minimum.
  • Drop references to ImageBitmap, HTMLElementCanvas and ImageBitmapRenderingContext as early as possible to free up resources.
  • Drop object URLs even in case of an error.
  • Always check if the cursor actually changed before updating it through Window::set_cursor().

Addresses #3306.

@daxpedda daxpedda added the DS - web Affects the Web backend (WebAssembly/WASM) label Dec 26, 2023
@daxpedda daxpedda force-pushed the web-custom-cursor-improvements branch from ed021f7 to 1e85e3a Compare December 26, 2023 02:42
@daxpedda daxpedda mentioned this pull request Dec 26, 2023
25 tasks
@daxpedda daxpedda merged commit 25d6a1d into rust-windowing:master Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DS - web Affects the Web backend (WebAssembly/WASM)

Development

Successfully merging this pull request may close these issues.

1 participant