Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe3c3aed31 | |||
| d0e4ce796b | |||
| 9e4d4a6716 | |||
| 4f849a23b8 | |||
| 8c0eb3dfab | |||
| a39e04329e |
@@ -35,8 +35,15 @@ jobs:
|
|||||||
# runner's memory — ld was OOM-killed (signal 9) on runs 447 and 486.
|
# runner's memory — ld was OOM-killed (signal 9) on runs 447 and 486.
|
||||||
# line-tables-only keeps file:line in panic backtraces while cutting the
|
# line-tables-only keeps file:line in panic backtraces while cutting the
|
||||||
# link's memory footprint enough to fit the runner.
|
# link's memory footprint enough to fit the runner.
|
||||||
|
#
|
||||||
|
# CARGO_BUILD_JOBS=2: with one job per core, cargo links several large
|
||||||
|
# test binaries concurrently; as the workspace grew (runs 514/516/519)
|
||||||
|
# two+ simultaneous ld processes OOM-killed the runner again even at
|
||||||
|
# line-tables-only. Two jobs keeps at most two links in flight — the
|
||||||
|
# compile-throughput cost is small next to the cache-warm build.
|
||||||
env:
|
env:
|
||||||
CARGO_PROFILE_DEV_DEBUG: line-tables-only
|
CARGO_PROFILE_DEV_DEBUG: line-tables-only
|
||||||
|
CARGO_BUILD_JOBS: '2'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ impl Plugin for SafeAreaInsetsPlugin {
|
|||||||
);
|
);
|
||||||
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
app.init_resource::<android::SafeAreaPollTries>()
|
app.add_message::<crate::events::StateChangedEvent>()
|
||||||
|
.init_resource::<android::SafeAreaPollTries>()
|
||||||
.add_systems(Update, android::refresh_insets)
|
.add_systems(Update, android::refresh_insets)
|
||||||
.add_systems(Update, android::rearm_on_resumed)
|
.add_systems(Update, android::rearm_on_resumed)
|
||||||
.add_systems(Update, android::refresh_surface_size);
|
.add_systems(Update, android::refresh_surface_size);
|
||||||
@@ -330,11 +331,16 @@ mod android {
|
|||||||
/// `on_window_resized` in `table_plugin` recomputes the board layout,
|
/// `on_window_resized` in `table_plugin` recomputes the board layout,
|
||||||
/// 3. re-arms the inset poller, because a screen change almost always
|
/// 3. re-arms the inset poller, because a screen change almost always
|
||||||
/// moves the system bars too — covering the "re-poll never fires"
|
/// moves the system bars too — covering the "re-poll never fires"
|
||||||
/// hole left open in #116.
|
/// hole left open in #116,
|
||||||
|
/// 4. emits `StateChangedEvent` so `card_plugin`'s sync pipeline
|
||||||
|
/// re-renders every card sprite from scratch — belt-and-braces for
|
||||||
|
/// the transient tableau clip of #130, where geometry converged but
|
||||||
|
/// stale card visuals survived the relayout.
|
||||||
pub(super) fn refresh_surface_size(
|
pub(super) fn refresh_surface_size(
|
||||||
mut frame: Local<u32>,
|
mut frame: Local<u32>,
|
||||||
mut windows: Query<(Entity, &mut Window)>,
|
mut windows: Query<(Entity, &mut Window)>,
|
||||||
mut resize_events: MessageWriter<WindowResized>,
|
mut resize_events: MessageWriter<WindowResized>,
|
||||||
|
mut state_events: MessageWriter<crate::events::StateChangedEvent>,
|
||||||
mut poll: ResMut<SafeAreaPollTries>,
|
mut poll: ResMut<SafeAreaPollTries>,
|
||||||
) {
|
) {
|
||||||
const POLL_INTERVAL_FRAMES: u32 = 30; // ~0.5 s @ 60 fps
|
const POLL_INTERVAL_FRAMES: u32 = 30; // ~0.5 s @ 60 fps
|
||||||
@@ -381,6 +387,7 @@ mod android {
|
|||||||
width: decor_w as f32 / scale,
|
width: decor_w as f32 / scale,
|
||||||
height: decor_h as f32 / scale,
|
height: decor_h as f32 / scale,
|
||||||
});
|
});
|
||||||
|
state_events.write(crate::events::StateChangedEvent);
|
||||||
poll.0 = 0;
|
poll.0 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user