Optomized iteration within scanline min-max