* egui-winit: don't assume window available at init
On Android in particular we can only initialize render state once we
have a native window, after a 'Resumed' lifecycle event. It's still
practical to be able to initialize an egui_winit::State early on
so this adds setters for the max_texture_side and pixels_per_point
that can be called once we have a valid Window and have initialized
a graphics context.
On Wayland, where we need to access the Display for clipboard handling
we now get the Display from the event loop instead of a window.
* egui-wgpu: lazily initialize render + surface state
Enable the renderer and surface state initialization to be deferred
until we know that any winit window we created has a valid native window
and enable the surface state to be updated in case the native window
changes.
In particular these changes help with running on Android where winit
windows will only have a valid native window associated with them
between Resumed and Paused lifecycle events, and so surface creation
(and render state initialization) needs to wait until the first
Resumed event, and the surface needs to be dropped/recreated based on
Paused/Resumed events.
* Move all epi-related code from egui_glow into eframe
* Move epi stuff from egui-winit into eframe
* Remove mention of epi in egui
* Remove mention of epi in egui_glium
* Remove trait epi::NativeTexture
* Remove confusing mentions of epi
* Refactor egui_web: break up into smaller files
* Clean up feature flags further, and update changelogs
* Clean up check.sh
* Small cleanup of egui_web/Cargo.toml
* Fix dependencies for pure_glow example
* Fix clippy false positive
* Update to rust 1.60.0
* Rename the feature `convert_bytemuck` to `bytemuck`
* Rename the feature `serialize` to `serde`.
* Make use of the "weak dependency" cargo feature
* Set rust-version = "1.60" for all crates
* egui_glow: clipboard, links, persistence & winit are now opt-in features
* Refactor text layout: don't need &Fonts in all functions
* Replace indexing in Fonts with member function
* Wrap Fonts in a Mutex
* Remove mutex for Font::glyph_info_cache
* Remove RwLock around Font::characters
* Put FontsImpl and GalleyCache behind the same Mutex
* Round font sizes to whole pixels before deduplicating them
* Make TextStyle !Copy
* Implement user-named TextStyle:s
* round font size earlier
* Cache fonts based on family and size
* Move TextStyle into egui and Style
* Remove body_text_style
* Query graphics about max texture size and use that as font atlas size
* Recreate texture atlas when it is getting full
* Replace `std::time::Instant` with wasm-compatible `instant::Instant`
* Change version requirement for instant to be compatible to winit
* Enable wasm-bindgen feature for instant
* Update lockfile
* Update changelog
* sort dependencies
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>