Skip to content

Conversation

notgull
Copy link
Member

@notgull notgull commented Jan 13, 2023

This PR caches the window().document() call in the Display type for the web backend of this crate. This is just an optimization to prevent having to query the document multiple times. I'm not too familiar with web technology, so if this is invalid (if, e.g. document can change during operation), please let me know.

@notgull notgull requested a review from john01dav as a code owner January 13, 2023 17:22
@notgull notgull merged commit 33a4c37 into master Jan 14, 2023
@notgull notgull deleted the notgull/cached-document branch January 14, 2023 05:48
@notgull notgull mentioned this pull request Jun 4, 2023
notgull added a commit that referenced this pull request Jun 4, 2023
* On MacOS, the contents scale is updated when set_buffer() is called, to adapt when the window is on a new screen (#68).
* **Breaking:** Split the `GraphicsContext` type into `Context` and `Surface` (#64).
* On Web, cache the document in the `Context` type (#66).
* **Breaking:** Introduce a new "owned buffer" for no-copy presentation (#65).
* Enable support for multi-threaded WASM (#77).
* Fix buffer resizing on X11 (#69).
* Add a set of functions for handling buffer damage (#99).
* Add a `fetch()` function for getting the window contents (#104).
* Bump MSRV to 1.64 (#81).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant