rewrite/simplify the fast_draw_pixels() function