From owner-svn-src-all@FreeBSD.ORG Fri Feb 7 14:04:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E40353AF; Fri, 7 Feb 2014 14:04:48 +0000 (UTC) Received: from mail-vb0-x235.google.com (mail-vb0-x235.google.com [IPv6:2607:f8b0:400c:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 66F0910DD; Fri, 7 Feb 2014 14:04:48 +0000 (UTC) Received: by mail-vb0-f53.google.com with SMTP id p17so2664104vbe.12 for ; Fri, 07 Feb 2014 06:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QUDbpJKr7+F4098pzC+afqjG2+iDExr1HZLAiTmddQI=; b=s2PF30WfN23pAwQuowGyicwX1llhTEQ2Uqzsq821iYW7qnbavFE1WlWkcyhu99PLk4 6WbhE6Z/IJIm8RY+GMUX2ws4XKpoIDf+1xPE3/8B9SBKkIwpDImvmQqjjiAjUeoFA8QE PoDUF4ZQ2mXRE/+jLv0SClor6M/yGTnbVQEZ9MV16h1vbf8kO8FZ7Bmyz0zY6YETCYT7 IYEXPj6y2huhxSXp3Vnk3xyIhpxmTByawdozbI7HyLepeJR2G5U7hrO8olkkSMlQnPcf E7g6wW/nmnepDOkpB4O+FhEDvQ2/W0TaGuzAtGjZ+Kq/4biKkgTkb0e8zCHrlHRb33dt pm8g== MIME-Version: 1.0 X-Received: by 10.52.89.230 with SMTP id br6mr8979939vdb.20.1391781887581; Fri, 07 Feb 2014 06:04:47 -0800 (PST) Sender: edschouten@gmail.com Received: by 10.220.105.140 with HTTP; Fri, 7 Feb 2014 06:04:47 -0800 (PST) In-Reply-To: <201402071239.s17CdwIH007683@svn.freebsd.org> References: <201402071239.s17CdwIH007683@svn.freebsd.org> Date: Fri, 7 Feb 2014 15:04:47 +0100 X-Google-Sender-Auth: aBDZdHQTTLTB3Rqknc-j3WvhB-c Message-ID: Subject: Re: svn commit: r261585 - head/sys/dev/vt/hw/vga From: Ed Schouten To: Aleksandr Rybalko Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Feb 2014 14:04:49 -0000 Hi Aleksandr, On 7 February 2014 13:39, Aleksandr Rybalko 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