+
+static void draw_huge_pixel(uint16_t *dest, int dest_width, uint16_t color)
+{
+ int i, j;
+ uint16_t grid_color = PACK_RGB16(127, 127, 127);
+
+ for(i=0; i<LOWRES_SCALE; i++) {
+ for(j=0; j<LOWRES_SCALE; j++) {
+ dest[j] = i == 0 || j == 0 ? grid_color : color;
+ }
+ dest += dest_width;
+ }
+}
+
+static void draw_lowres_raster(void)
+{
+ int i, j;
+ uint16_t *sptr = lowres_pixels;
+ uint16_t *dptr = fb_pixels;
+
+ for(i=0; i<lowres_height; i++) {
+ for(j=0; j<lowres_width; j++) {
+ draw_huge_pixel(dptr, fb_width, *sptr++);
+ dptr += LOWRES_SCALE;
+ }
+ dptr += fb_width * LOWRES_SCALE - fb_width;
+ }
+}