diff --git a/services/graphics-server/src/lib.rs b/services/graphics-server/src/lib.rs index 3eed8f207..825950ca5 100644 --- a/services/graphics-server/src/lib.rs +++ b/services/graphics-server/src/lib.rs @@ -220,6 +220,7 @@ impl Gfx { clip, obj: ClipObjectType::Tile(tile), }; + log::info!("ClipObject size: {}", core::mem::size_of::()); let buf = Buffer::into_buf(co).or(Err(xous::Error::InternalError))?; buf.lend(self.conn, Opcode::DrawClipObject.to_u32().unwrap()) .map(|_| ()) diff --git a/services/graphics-server/src/op.rs b/services/graphics-server/src/op.rs index 2a9211c64..bb3eb0555 100644 --- a/services/graphics-server/src/op.rs +++ b/services/graphics-server/src/op.rs @@ -598,6 +598,7 @@ pub fn tile(fb: &mut LcdFB, tile: Tile, clip: Option) { let bound = tile.bound(); let tl_x = bound.tl.x as usize; let tl_y = bound.tl.y as usize; + log::info!("bound: {:?}, clip: {:?}", bound, clip); let (mut br_x, mut br_y) = match clip { Some(clip) => { let x = min(bound.br.x, clip.br.x) as usize; @@ -620,10 +621,11 @@ pub fn tile(fb: &mut LcdFB, tile: Tile, clip: Option) { let first_word = tl_x / 32; let last_word = LCD_WORDS_PER_LINE - 1; - + log::info!("tl_y {}, br_y {}, clip: {:?}", tl_y, br_y, clip); for tile_ln in tl_y..=br_y { let fb_ln = tile_ln * LCD_WORDS_PER_LINE; let tile_line = tile.get_line(Point::new(tl_x as i16, tile_ln as i16)); + // log::info!("tile_line: {:x?}", tile_line); let mut fb_wd = first_word; let mut tile_wd = 0; let mut fb_word = fb[fb_ln + fb_wd]; @@ -652,6 +654,8 @@ pub fn tile(fb: &mut LcdFB, tile: Tile, clip: Option) { fb[fb_ln + last_word] = left_part | right_part; // set the dirty bit on the line + let old = fb[fb_ln + (LCD_WORDS_PER_LINE - 1)]; fb[fb_ln + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000; + // log::info!("dirty[{}] {:x}->{:x}", fb_ln, old, fb[fb_ln + (LCD_WORDS_PER_LINE - 1)]); } }