only set dirty bits for precursor-like targets

This was introducing a mysterious "line" artifact on text rendering
in new systems.

Probably need to do some real on-device testing of this change
because the automated tests won't catch a dirty bit error on
the LCD.
This commit is contained in:
bunnie 2025-05-23 10:52:55 +08:00
parent 73fba43d04
commit 0f7ad13c08

View file

@ -111,10 +111,13 @@ pub fn xor_glyph(fb: &mut FrBuf, p: (isize, isize), gs: &GlyphSprite, xor: bool,
0xffff_ffff ^ ((pattern >> px_in_dest_low_word) & partial_mask_hi);
}
}
#[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))]
{
fb[(row_base as usize + WORDS_PER_LINE - 1) as usize] |= 0x1_0000; // set the dirty bit on the line
}
} else {
log::trace!("absolute x/y fail");
}
fb[(row_base as usize + WORDS_PER_LINE - 1) as usize] |= 0x1_0000; // set the dirty bit on the line
} else {
log::trace!("off the top");
}
@ -206,6 +209,10 @@ pub fn xor_glyph_large(fb: &mut FrBuf, p: (isize, isize), gs: &GlyphSprite, xor:
0xffff_ffff ^ ((src >> px_in_dest_low_word) & partial_mask_hi);
}
}
#[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))]
{
fb[(row_base as usize + WORDS_PER_LINE - 1) as usize] |= 0x1_0000; // set the dirty bit on the line
}
}
}
// Advance destination offset using + instead of * to maybe save some CPU cycles
@ -307,6 +314,10 @@ pub fn xor_glyph_2x(fb: &mut FrBuf, p: (isize, isize), gs: &GlyphSprite, xor: bo
0xffff_ffff ^ ((src >> px_in_dest_low_word) & partial_mask_hi);
}
}
#[cfg(any(feature = "hosted", feature = "renode", feature = "precursor"))]
{
fb[(row_base as usize + WORDS_PER_LINE - 1) as usize] |= 0x1_0000; // set the dirty bit on the line
}
}
}
// Advance destination offset using + instead of * to maybe save some CPU cycles