Konkitoman
9e89188ebe
Fix trying to render not existent viewport resulting in 100% cpu usage
2023-10-19 20:05:21 +03:00
Konkitoman
f5e1d0869e
Fixing:
...
* Fix web
* Fix errors from ./scripts/check.sh
2023-10-19 18:50:48 +03:00
Konkitoman
4f1696cf9c
big refractor
...
egui:
* removed FullOutput::repaint_after
* now for redraw only request_repaint_callback is used!
* now on every Context::request_repaint() will repaint only once
* exposed Context::requested_repaint and Context::requested_repaint_last_frame
eframe:
* now event result is returned as EventResult insted of Vec<EventResult>
* fix to many redraw requests
----:
* fix egui not waking when a repaint was from other thread
* now every thing feels more responsive!
2023-10-19 15:53:38 +03:00
Konkitoman
b1e7fafe70
egui:
...
* now every viewport has his own frame_nr
eframe:
* some refactoring
* now on Windows spinner will make the async viewport refresh, this problem was only for async viewport in Windows
* problem found there are two redraw systems, one was broken now is fixed, the one that was broken on Linux X11 was not needed, but for Windows both are needed!
1: The egui repaint_callback system
2: The egui repaint_after from FullOutput
2023-10-18 18:47:16 +03:00
Konkitoman
7f1a1e3b2e
Now in ViewportBuilder has close_button and drag_and_drop enabled by default!
...
Fix Windows not rendering a sync viewport in a sync viewport
2023-10-18 14:50:42 +03:00
Konkitoman
954366ef7f
eframe: refactor code to be more compact and faster
2023-10-11 21:08:07 +03:00
Konkitoman
287f7041f6
Fix typos and expose Context::is_desktop
2023-09-30 10:22:17 +03:00
Konkitoman
7caa042b92
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-30 09:39:45 +03:00
Konkitoman
73f14c9b0a
Update crates/eframe/src/native/run.rs
...
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com >
2023-09-28 19:04:37 +03:00
Emil Ernerfeldt
5a0186fa2b
Release 0.23.0 - New image API
2023-09-28 08:44:33 +02:00
Emil Ernerfeldt
9a947e5547
Final image API doc tweaks
2023-09-27 16:40:26 +02:00
Emil Ernerfeldt
a9272e0e55
Update dependencies in Cargo.lock ( #3401 )
...
* Update to ehttp 0.3.1 with better error messages
* Explain why we are using an old cocoa
* cargo update
❯ cargo update
Updating crates.io index
Updating accesskit v0.11.0 -> v0.11.2
Updating accesskit_consumer v0.15.0 -> v0.15.2
Updating accesskit_macos v0.7.0 -> v0.9.0
Updating accesskit_unix v0.5.0 -> v0.5.2
Updating accesskit_windows v0.14.0 -> v0.14.3
Updating accesskit_winit v0.14.0 -> v0.14.4
Updating addr2line v0.19.0 -> v0.21.0
Removing ahash v0.7.6
Updating aho-corasick v1.0.1 -> v1.1.1
Adding allocator-api2 v0.2.16
Updating android-activity v0.4.1 -> v0.4.3
Adding android-tzdata v0.1.1
Updating anyhow v1.0.71 -> v1.0.75
Updating arboard v3.2.0 -> v3.2.1
Updating arrayvec v0.7.2 -> v0.7.4
Updating async-channel v1.8.0 -> v1.9.0
Updating async-executor v1.5.1 -> v1.5.3
Adding async-fs v1.6.0
Updating async-lock v2.7.0 -> v2.8.0
Adding async-process v1.8.0
Updating async-recursion v1.0.4 -> v1.0.5
Adding async-signal v0.2.1
Updating async-task v4.4.0 -> v4.4.1
Updating async-trait v0.1.68 -> v0.1.73
Adding atomic-waker v1.1.2
Updating backtrace v0.3.67 -> v0.3.69
Adding base64 v0.21.4
Updating bindgen v0.65.1 -> v0.68.1
Updating bitflags v2.3.1 -> v2.4.0
Adding blocking v1.4.0
Updating bumpalo v3.13.0 -> v3.14.0
Updating bytemuck v1.13.1 -> v1.14.0
Updating bytemuck_derive v1.4.1 -> v1.5.0
Updating bytes v1.4.0 -> v1.5.0
Updating calloop v0.10.5 -> v0.10.6
Updating cc v1.0.79 -> v1.0.83
Updating cfg-expr v0.15.1 -> v0.15.5
Updating chrono v0.4.24 -> v0.4.31
Updating cocoa-foundation v0.1.1 -> v0.1.2
Updating concurrent-queue v2.2.0 -> v2.3.0
Updating core-graphics-types v0.1.1 -> v0.1.2
Updating cpufeatures v0.2.7 -> v0.2.9
Updating crossbeam-utils v0.8.15 -> v0.8.16
Adding deranged v0.3.8
Removing dirs v4.0.0
Removing dirs-sys v0.3.7
Updating dlib v0.5.0 -> v0.5.2
Updating dyn-clone v1.0.11 -> v1.0.14
Updating either v1.8.1 -> v1.9.0
Updating enum-map v2.5.0 -> v2.6.3
Updating enum-map-derive v0.11.0 -> v0.14.0
Updating enumflags2 v0.7.7 -> v0.7.8
Updating enumflags2_derive v0.7.7 -> v0.7.8
Updating enumn v0.1.8 -> v0.1.12
Adding equivalent v1.0.1
Updating errno v0.3.1 -> v0.3.3
Adding event-listener v3.0.0
Updating fancy-regex v0.7.1 -> v0.11.0
Adding fastrand v2.0.1
Adding fdeflate v0.3.0
Updating flate2 v1.0.25 -> v1.0.27
Updating form_urlencoded v1.1.0 -> v1.2.0
Updating getrandom v0.2.9 -> v0.2.10
Updating gimli v0.27.2 -> v0.28.0
Updating glutin v0.30.8 -> v0.30.10
Updating glutin_egl_sys v0.5.0 -> v0.5.1
Updating gpu-descriptor v0.2.3 -> v0.2.4
Updating gpu-descriptor-types v0.1.1 -> v0.1.2
Adding hashbrown v0.14.0
Updating hermit-abi v0.3.1 -> v0.3.3
Updating iana-time-zone v0.1.56 -> v0.1.57
Updating idna v0.3.0 -> v0.4.0
Updating image v0.24.6 -> v0.24.7
Adding indexmap v2.0.0
Updating io-lifetimes v1.0.10 -> v1.0.11
Updating is-terminal v0.4.7 -> v0.4.9
Updating itoa v1.0.6 -> v1.0.9
Updating libc v0.2.144 -> v0.2.148
Adding linux-raw-sys v0.4.7
Updating lock_api v0.4.9 -> v0.4.10
Updating log v0.4.17 -> v0.4.20
Updating memchr v2.5.0 -> v2.6.3
Adding memoffset v0.7.1
Updating miniz_oxide v0.6.2 -> v0.7.1
Updating mio v0.8.6 -> v0.8.8
Adding nix v0.26.4
Updating num-traits v0.2.15 -> v0.2.16
Adding num_enum v0.6.1
Adding num_enum_derive v0.6.1
Updating object v0.30.3 -> v0.32.1
Updating once_cell v1.17.1 -> v1.18.0
Updating orbclient v0.3.45 -> v0.3.46
Updating os_str_bytes v6.5.0 -> v6.5.1
Updating parking v2.1.0 -> v2.1.1
Updating parking_lot_core v0.9.7 -> v0.9.8
Updating paste v1.0.12 -> v1.0.14
Updating percent-encoding v2.2.0 -> v2.3.0
Updating pin-project-lite v0.2.9 -> v0.2.13
Adding piper v0.2.1
Updating plist v1.4.0 -> v1.5.0
Updating png v0.17.7 -> v0.17.10
Updating prettyplease v0.2.5 -> v0.2.15
Updating proc-macro2 v1.0.58 -> v1.0.67
Updating profiling v1.0.8 -> v1.0.11
Updating quick-xml v0.26.0 -> v0.29.0
Updating quote v1.0.27 -> v1.0.33
Updating regex v1.8.2 -> v1.9.5
Adding regex-automata v0.3.8
Removing regex-syntax v0.6.29
Removing regex-syntax v0.7.2
Adding regex-syntax v0.7.5
Updating ron v0.8.0 -> v0.8.1
Removing rustix v0.37.19
Adding rustix v0.37.23
Adding rustix v0.38.14
Updating rustls v0.20.8 -> v0.21.7
Adding rustls-webpki v0.100.3
Adding rustls-webpki v0.101.6
Updating ryu v1.0.13 -> v1.0.15
Updating scopeguard v1.1.0 -> v1.2.0
Updating serde v1.0.163 -> v1.0.188
Updating serde_derive v1.0.163 -> v1.0.188
Updating serde_json v1.0.96 -> v1.0.107
Updating serde_repr v0.1.12 -> v0.1.16
Updating serde_spanned v0.6.2 -> v0.6.3
Updating sha1 v0.10.5 -> v0.10.6
Updating shlex v1.1.0 -> v1.2.0
Adding signal-hook-registry v1.4.1
Adding simd-adler32 v0.3.7
Updating siphasher v0.3.10 -> v0.3.11
Updating slab v0.4.8 -> v0.4.9
Updating smallvec v1.10.0 -> v1.11.1
Updating smithay-client-toolkit v0.16.0 -> v0.16.1
Updating strict-num v0.1.0 -> v0.1.1
Updating syn v2.0.16 -> v2.0.37
Updating syntect v5.0.0 -> v5.1.0
Updating system-deps v6.1.0 -> v6.1.1
Updating target-lexicon v0.12.7 -> v0.12.11
Updating tempfile v3.5.0 -> v3.8.0
Updating termcolor v1.2.0 -> v1.3.0
Updating thiserror v1.0.40 -> v1.0.49
Updating thiserror-impl v1.0.40 -> v1.0.49
Removing time v0.1.45
Removing time v0.3.21
Adding time v0.3.29
Updating time-core v0.1.1 -> v0.1.2
Updating time-macros v0.2.9 -> v0.2.15
Updating toml v0.7.4 -> v0.7.8
Updating toml_datetime v0.6.2 -> v0.6.3
Updating toml_edit v0.19.9 -> v0.19.15
Updating tracing-attributes v0.1.24 -> v0.1.26
Updating ttf-parser v0.19.0 -> v0.19.2
Updating tts v0.25.5 -> v0.25.6
Updating typenum v1.16.0 -> v1.17.0
Updating unicode-ident v1.0.8 -> v1.0.12
Updating unicode-width v0.1.10 -> v0.1.11
Updating ureq v2.6.2 -> v2.7.1
Updating url v2.3.1 -> v2.4.1
Updating waker-fn v1.1.0 -> v1.1.1
Updating walkdir v2.3.3 -> v2.4.0
Removing wasi v0.10.0+wasi-snapshot-preview1
Updating wasm-bindgen-futures v0.4.36 -> v0.4.37
Updating webbrowser v0.8.10 -> v0.8.11
Removing webpki v0.22.1
Updating webpki-roots v0.22.6 -> v0.23.1
Updating which v4.4.0 -> v4.4.2
Updating winapi-util v0.1.5 -> v0.1.6
Adding windows v0.51.1
Adding windows-core v0.51.1
Updating windows-implement v0.44.0 -> v0.48.0
Updating windows-interface v0.44.0 -> v0.48.0
Updating windows-targets v0.48.0 -> v0.48.5
Updating windows_aarch64_gnullvm v0.48.0 -> v0.48.5
Updating windows_aarch64_msvc v0.48.0 -> v0.48.5
Updating windows_i686_gnu v0.48.0 -> v0.48.5
Updating windows_i686_msvc v0.48.0 -> v0.48.5
Updating windows_x86_64_gnu v0.48.0 -> v0.48.5
Updating windows_x86_64_gnullvm v0.48.0 -> v0.48.5
Updating windows_x86_64_msvc v0.48.0 -> v0.48.5
Updating winnow v0.4.6 -> v0.5.15
Adding xdg-home v1.0.0
Updating xml-rs v0.8.15 -> v0.8.19
Updating zbus v3.10.0 -> v3.14.1
Updating zbus_macros v3.10.0 -> v3.14.1
Updating zbus_names v2.5.1 -> v2.6.0
Updating zvariant v3.14.0 -> v3.15.0
Updating zvariant_derive v3.14.0 -> v3.15.0
❯ cargo update -p ureq --precise 2.6.2
Updating crates.io index
Downgrading rustls v0.21.7 -> v0.20.9
Removing rustls-webpki v0.100.3
Removing rustls-webpki v0.101.6
Downgrading ureq v2.7.1 -> v2.6.2
Adding webpki v0.22.1
Downgrading webpki-roots v0.23.1 -> v0.22.6
❯ cargo update -p plist --precise 1.4.0
Updating crates.io index
Downgrading plist v1.5.0 -> v1.4.0
Downgrading quick-xml v0.29.0 -> v0.26.0
❯ cargo update -p ron --precise 0.8.0
Updating crates.io index
Removing base64 v0.21.4
Downgrading ron v0.8.1 -> v0.8.0
* Remove unnecessary mut
* Silence over-eager clippy
* Add misisng `'static` lifetime to `run_simple_native`
* ❯ cargo update -p android-activity --precise 0.4.1
Updating crates.io index
Downgrading android-activity v0.4.2 -> v0.4.1
Removing num_enum v0.6.1
Removing num_enum_derive v0.6.1
2023-09-27 12:49:24 +02:00
Emil Ernerfeldt
f138131bc8
Improve top-level crate docs, and sort features is Cargo.toml
2023-09-27 11:40:28 +02:00
Emil Ernerfeldt
35945dea46
Misc code cleanup ( #3398 )
...
* eframe README: explain how to enable copy/paste
* Implement Debug for a couple of structs
* Code cleanup
* Better docs
* profile ron serialization
* CI: Allow "exclude from changelog" as the only label
2023-09-27 09:06:17 +02:00
Simon
4986b35701
Add NativeOptions::window_builder for more customization ( #3390 )
...
* added a window builder hook for more customization
* `EFrame` -> `eframe`
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com >
2023-09-27 08:52:49 +02:00
Emil Ernerfeldt
b3e19f5b7d
Move App::persist_window to NativeOptions and App::max_size_points to WebOptions ( #3397 )
...
* Move `App::persist_window` to `NativeOptions`
* Move `App::max_size_points` to `WebOptions`
* Build fixes
2023-09-27 08:48:48 +02:00
Konkitoman
8fad6b761d
Now we use egui::ColorImage insted of (u32, u32, Vec<u8>)
2023-09-27 01:06:56 +03:00
Konkitoman
449f38adf2
This is a temporary fix to not unsafe impl Sync + Send for backends
...
The problem is that when we call Context::create_viewport_sync can be on any thread because egui::Context is Sync + Send but the backend is not!
So we want the callback to the backend to be thread local!
The problem that this adds is that now you cannot create more then one egui::Context,
because the thread local variabile is static and i don't know how to store a non static LocalKey on egui::ContextImpl
2023-09-27 00:21:06 +03:00
Konkitoman
38e00e2ea2
refactor eframe viewport sync rendering for glow and wgpu
2023-09-26 22:56:46 +03:00
Emil Ernerfeldt
1b830bbcb4
Less loud warning when loading old memories
2023-09-26 21:29:04 +02:00
Konkitoman
1930d69ae3
Fix the change that change from a Vec to HashMap braked web and pure_glow
2023-09-26 20:34:09 +03:00
Konkitoman
5c8c56c1b8
rename the events that are result of events event_result
2023-09-26 19:50:11 +03:00
Konkitoman
e5783127f4
Fix max_texture_side for the main viewport was alwats set to 0
2023-09-26 19:45:12 +03:00
Konkitoman
43ad25a4d9
Renamed gl_window to glutin_ctx in init_run_state and initializate max_texture_side, and now on any egui_winit has max_texture_side set
2023-09-26 18:59:42 +03:00
Konkitoman
6a5838c119
Now all sizes are in Vec2 insted of Pos2
2023-09-26 18:33:57 +03:00
Konkitoman
b719e1c030
eframe fix android build
2023-09-26 18:23:37 +03:00
Konkitoman
543a0a2a83
egui, egui_glow, eframe: fix all errors returned by ./scripts/check.sh
2023-09-26 00:45:33 +03:00
Konkitoman
489d8a79c8
egui: fix web app runner
2023-09-26 00:14:26 +03:00
Konkitoman
e453d667e5
egui and eframe now uses more ViewportIdPair
2023-09-26 00:05:04 +03:00
Konkitoman
f4c5378ad3
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-25 23:15:51 +03:00
Emil Ernerfeldt
fdd493d48f
Misc cleanup ( #3381 )
...
* Give credit to recent big-time contributors in the main README.md
* Better named profiling scopes
* Document everything in memory.rs
* Better doc-strings
* Add a section about dependencies to the main README.md
* Improve egui_extras docs
* fix typos
2023-09-24 09:32:31 +02:00
Konkitoman
8ecd29dea7
eframe: Now WGPU implementation when creating a sync viewport will inherit the icon of his parent
...
And refactoring and adding some inline documentation
2023-09-20 18:56:38 +03:00
Konkitoman
915d1b6997
Add ViewportIdPair, Viewport, ViewportOutput
2023-09-19 17:55:54 +03:00
Konkitoman
c96197db79
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-19 17:22:31 +03:00
Barugon
c07394b576
Only show on-screen-keyboard and IME when editing text ( #3362 )
...
* Remove calls to `set_ime_allowed`
* Allow IME if `text_cursor_pos` is `Some`
* Only call `Window::set_ime_allowed` when necessary
* allow_ime doesn't need to be atomic
* Remove unused imports
* Fix assignment
2023-09-19 14:14:42 +02:00
Sebastian Reinhard
433d1fc239
file_storage: Wrap File in BufWriter ( #3353 )
...
When exiting my application, it would freeze for around a minute waiting to finish writing ca. 40MB to file storage.
Some quick profiling revealed that it was spending all that time in `File::write`,
presumably making a large number of system calls writing tiny amounts of data at a time.
We can avoid this by buffering writes using a `BufWriter`, just like we already do with `BufReader`.
With this change, my application takes around 1-2 seconds to exit, with the majority of that time spent serializing `ron`.
I'm sure there are further potential performance improvements there, but this is already an order of magnitude or two better.
I also fixed the call to `log::warn!`, which was using incorrect formatting syntax and not including the error message.
2023-09-18 16:40:29 +02:00
aspect
9c4f55b1f4
Remove Function() invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. ( #3349 )
...
* remove Function (eval) from eframe text agent for compatibility with browser extensions.
* cargo fmt on image viewer
2023-09-17 13:25:50 +02:00
Dunfan Lu
d949eaf682
Fix typo in eframe/README.md ( #3344 )
2023-09-16 12:22:02 +02:00
Emil Ernerfeldt
4b5146d35d
Add more profiling scopes ( #3332 )
2023-09-13 19:32:19 +02:00
Emil Ernerfeldt
fc3bddd0cf
Add more puffin profile scopes to eframe ( #3330 )
...
* Add puffin profile scopes to the startup and running of eframe
* puffin_profiler example: start puffin right away
* cargo format let-else statements
* More profile scopes
* Add some `#[inline]`
* Standardize puffin profile scope definitions
* standardize again
* Silence warning when puffin is disabled
2023-09-13 09:00:38 +02:00
Konkitoman
fc90a7e7c8
Fix cyclical reference
...
Removed the last fix because there is not need for it now!
2023-09-11 18:50:17 +03:00
Konkitoman
956c1c3527
Fix memory leak
2023-09-10 15:33:06 +03:00
Konkitoman
a5d4ce84d4
Now eframe glow supports viewport sync icon
2023-09-06 19:16:20 +03:00
Konkitoman
fb80880ff8
* Fix posibile deadlock when sending a viewport command from a sync viewport
...
* Improve viewports example
2023-09-06 16:30:20 +03:00
Konkitoman
b1189c14ae
Now when creating a async viewport, if we not spefify the icon will have his parent icon
2023-09-06 15:58:41 +03:00
Konkitoman
83f82601e8
* Fix warnings
...
* Refactor eframe wgpu
2023-09-06 15:18:18 +03:00
Konkitoman
fea6ed7878
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-06 13:35:02 +03:00
Emil Ernerfeldt
82704bebbf
Update MSRV to Rust 1.70.0 ( #3310 )
...
* Update to Rust 1.70
* Fix renamed clippy lint
* Use let-else more
* Code cleanup
* Remove derelict Safety comments
* Enable more clippy lints
2023-09-06 07:59:24 +02:00
Konkitoman
e44c2e6928
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-05 16:19:41 +03:00
Emil Ernerfeldt
67168be069
Improve clippy, and add more docs ( #3306 )
...
* Silence a few clippy warnings
* Use named threads
* Remove some deprecated functions
* Document Context and Ui fully
* Use `parking_lot::Mutex` in `eframe`
* Expand clippy.toml files
* build fix
2023-09-05 14:11:22 +02:00