Skip to content
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

m: Cache document in web frontend #66

Merged
merged 1 commit into from
Jan 14, 2023
Merged

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