Skip to content

Commit

Permalink
Replace reactive-rendering feature with unconditional-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Nov 4, 2024
1 parent 66b4206 commit 61a7b64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ all-features = true
maintenance = { status = "actively-developed" }

[features]
default = ["wgpu", "tiny-skia", "fira-sans", "auto-detect-theme", "reactive-rendering"]
default = ["wgpu", "tiny-skia", "fira-sans", "auto-detect-theme"]
# Enables the `wgpu` GPU-accelerated renderer backend
wgpu = ["iced_renderer/wgpu", "iced_widget/wgpu"]
# Enables the `tiny-skia` software renderer backend
Expand Down Expand Up @@ -65,8 +65,8 @@ fira-sans = ["iced_renderer/fira-sans"]
auto-detect-theme = ["iced_core/auto-detect-theme"]
# Enables strict assertions for debugging purposes at the expense of performance
strict-assertions = ["iced_renderer/strict-assertions"]
# Redraws only when widgets react to some runtime event
reactive-rendering = ["iced_winit/reactive-rendering"]
# Redraws on every runtime event, and not only when a widget requests it
unconditional-rendering = ["iced_winit/unconditional-rendering"]

[dependencies]
iced_core.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ x11 = ["winit/x11"]
wayland = ["winit/wayland"]
wayland-dlopen = ["winit/wayland-dlopen"]
wayland-csd-adwaita = ["winit/wayland-csd-adwaita"]
reactive-rendering = []
unconditional-rendering = []

[dependencies]
iced_futures.workspace = true
Expand Down
6 changes: 4 additions & 2 deletions winit/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,11 +1051,13 @@ async fn run_instance<P, C>(
&mut messages,
);

#[cfg(not(feature = "reactive-rendering"))]
#[cfg(feature = "unconditional-rendering")]
window.raw.request_redraw();

match ui_state {
#[cfg(feature = "reactive-rendering")]
#[cfg(not(
feature = "unconditional-rendering"
))]
user_interface::State::Updated {
redraw_request: Some(redraw_request),
} => match redraw_request {
Expand Down

0 comments on commit 61a7b64

Please sign in to comment.