mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
modify the fb pop routine so it doesn't overwrite the status bar
this eliminates a small glitch in the time display/security infos whenever transitioning between foreground/background contexts
This commit is contained in:
parent
db569dd6e0
commit
148bf71a94
4 changed files with 8 additions and 6 deletions
|
|
@ -179,10 +179,9 @@ perform the Xous firmware upgrade. This requires running manual update commands,
|
|||
- fuzzer added to push many more corner cases than before -- disk is filled to ~75% capacity with dozens of Bases,
|
||||
triggering roughly 4 FSCB ops, and then all Bases and keys are verified to be correct.
|
||||
- Optimize GAM performance
|
||||
- context switches that revert to a prior app screen are restored from a stashed bitmap instead of a full redraw. this can cause
|
||||
a slight glitch on the status bar where the wrong time/status is displayed for up to a second after the context swap reverts, but
|
||||
it is a minor trade-off for the main purpose, which is to prevent old menus, contexts, and defacements from "piling up" when an
|
||||
app is blocked due to an exceptional condition being raised (such as the PDDB requesting a full basis unlock to generate the FSCB)
|
||||
- context switches that revert to a prior app screen are restored from a stashed bitmap instead of a full redraw. This
|
||||
prevents old menus, contexts, and defacements from "piling up" when an app is blocked due to an exceptional condition
|
||||
being raised (such as the PDDB requesting a full basis unlock to generate the FSCB)
|
||||
|
||||
## Roadmap to 1.0
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ fn wrapped_main() -> ! {
|
|||
let status_canvas = Canvas::new(
|
||||
Rectangle::new_coords(
|
||||
0, 0, screensize.x,
|
||||
// note: if this gets modified, the "pop" routine in gfx/backend/betrusted.rs also needs to be updated
|
||||
gfx.glyph_height_hint(GlyphStyle::Cjk).expect("couldn't get glyph height") as i16 * 2),
|
||||
255, &trng, None, crate::api::CanvasType::Status
|
||||
).expect("couldn't create status canvas");
|
||||
|
|
|
|||
|
|
@ -114,7 +114,9 @@ impl XousDisplay {
|
|||
}
|
||||
pub fn pop(&mut self) {
|
||||
let fb: &mut [u32] = self.fb.as_slice_mut();
|
||||
fb[..FB_SIZE].copy_from_slice(&self.srfb);
|
||||
// skip copying the status bar, so that the status info is not overwritten by the pop.
|
||||
// this is "fixed" at 32 pixels high (2 * Cjk glyph height hint) per line 79 in gam/src/main.rs
|
||||
fb[FB_WIDTH_WORDS * 32..FB_SIZE].copy_from_slice(&self.srfb[FB_WIDTH_WORDS * 32..FB_SIZE]);
|
||||
self.redraw();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ impl XousDisplay {
|
|||
self.srfb.copy_from_slice(&self.emulated_buffer);
|
||||
}
|
||||
pub fn pop(&mut self) {
|
||||
self.emulated_buffer.copy_from_slice(&self.srfb);
|
||||
self.emulated_buffer[FB_WIDTH_WORDS*32..].copy_from_slice(&self.srfb[FB_WIDTH_WORDS*32..]);
|
||||
self.redraw();
|
||||
self.update();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue