Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2014 15:04:47 +0100
From:      Ed Schouten <ed@80386.nl>
To:        Aleksandr Rybalko <ray@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r261585 - head/sys/dev/vt/hw/vga
Message-ID:  <CAJOYFBAAmcfrob4LsBC2jz6TxfNPd%2Bh6Np_dn7toOgXRZHAiow@mail.gmail.com>
In-Reply-To: <201402071239.s17CdwIH007683@svn.freebsd.org>
References:  <201402071239.s17CdwIH007683@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Aleksandr,

On 7 February 2014 13:39, Aleksandr Rybalko <ray@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@80386.nl>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOYFBAAmcfrob4LsBC2jz6TxfNPd%2Bh6Np_dn7toOgXRZHAiow>