From c05153b5afdc29243b07faa9e7878c7d69e5601e Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 27 Nov 2020 17:21:31 +0800 Subject: [PATCH] add dirty bit set to put_pixel() --- services/graphics-server/src/op.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/graphics-server/src/op.rs b/services/graphics-server/src/op.rs index ab4e9a875..aeabd9ccc 100644 --- a/services/graphics-server/src/op.rs +++ b/services/graphics-server/src/op.rs @@ -303,6 +303,8 @@ fn put_pixel(fb: &mut LcdFB, x: usize, y: usize, color: PixelColor) { } else { fb[(x + y * LCD_WORDS_PER_LINE * 32) / 32] &= !(1 << (x % 32)) } + // set the dirty bit on the line that contains the pixel + fb[y * LCD_WORDS_PER_LINE + (LCD_WORDS_PER_LINE - 1)] |= 0x1_0000; } // plotLine(int x0, int y0, int x1, int y1)