On 05/01/2017 16:55, Ed Maste wrote: > On 20 April 2017 at 14:06, Jung-uk Kim <j...@freebsd.org> wrote: >> >> Maybe but I haven't seen much improvement in the area for many years. >> Do you have any reason to believe someone is working on it? >> >> Even if we have such backend, I don't expect much difference in drawing >> small area, i.e., redrawing narrow borders. On top of that, I don't >> like "if (vd->vd_driver->vd_drawrect == NULL) return (ENOTSUP)" stuff. > > I don't believe anyone is working on it at the moment, but I expect > that effort will go into improved VGA / VESA support at some point and > that might implement an improved drawrect. I agree that there's > unlikely to be a noticeable difference in the case of occasional > operations filling a small region (e.g., border clearing after vt > switch). > > However, the vd_drawrect == NULL case is really no different than > vd_setpixel == NULL. All vt drivers except ofwfb provide both, and > ofwfb provides neither.
I can revert it but I don't like the previous implementation. There were overlapping regions and off-by-one issues. Please see the attached patch, which is against the previous version. Jung-uk Kim
--- vt_core.c.orig +++ vt_core.c @@ -1546,21 +1546,23 @@ /* Left bar. */ if (vw->vw_draw_area.tr_begin.tp_col > 0) vd->vd_driver->vd_drawrect(vd, - 0, 0, - vw->vw_draw_area.tr_begin.tp_col - 1, vd->vd_height - 1, + 0, vw->vw_draw_area.tr_begin.tp_row, + vw->vw_draw_area.tr_begin.tp_col - 1, + vw->vw_draw_area.tr_end.tp_row - 1, 1, c); /* Right bar. */ if (vw->vw_draw_area.tr_end.tp_col < vd->vd_width) vd->vd_driver->vd_drawrect(vd, - vw->vw_draw_area.tr_end.tp_col - 1, 0, - vd->vd_width - 1, vd->vd_height - 1, + vw->vw_draw_area.tr_end.tp_col, + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_width - 1, vw->vw_draw_area.tr_end.tp_row - 1, 1, c); /* Bottom bar. */ if (vw->vw_draw_area.tr_end.tp_row < vd->vd_height) vd->vd_driver->vd_drawrect(vd, - 0, vw->vw_draw_area.tr_end.tp_row - 1, + 0, vw->vw_draw_area.tr_end.tp_row, vd->vd_width - 1, vd->vd_height - 1, 1, c);
signature.asc
Description: OpenPGP digital signature