svn commit: r261585 - head/sys/dev/vt/hw/vga

Ed Schouten ed at 80386.nl
Fri Feb 7 14:04:49 UTC 2014


Hi Aleksandr,

On 7 February 2014 13:39, Aleksandr Rybalko <ray at freebsd.org> wrote:
> +static void
> +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color)
> +{
> +}
> +
> +static void
> +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill,
> +    term_color_t color)
> +{
> +}
> +
>  static inline void
>  vga_bitblt_draw(struct vt_device *vd, const uint8_t *src,
>      u_long ldst, uint8_t shift, unsigned int width, unsigned int height,

My question is, why do the setpixel and drawrect functions take signed
coordinates, whereas bitblt does not? Wouldn' it be better to use
unsigned coordinates all over the place?

Furthermore, I think it's a bit weird that vga_bitbltchr() contains
explicit bounds checking. What happened there? I remember at one point
in time, we had the nice invariant that vt(9) never attempted to draw
outside of the display resolution. What caused us to give up on that?

-- 
Ed Schouten <ed at 80386.nl>


More information about the svn-src-head mailing list