[PATCH] fb: reorder Bresenham error correction to avoid overshoot.

Keith Packard keithp at keithp.com
Tue Aug 14 17:09:51 PDT 2012


Matt Turner <mattst88 at gmail.com> writes:

> From: Simon Schubert <2 at 0x2c.org>
>
> When fbBresSolid draws a line, it can happen that after the last
> pixel, the Bresenham error term overflows, and fbBresSolid paints
> another pixel before adjusting the error term.
>
> However, if this happens on the last pixel (len=0), this extra pixel
> might overshoot the boundary, and, in rare cases, lead to a segfault.
>
> Fix this issue by adjusting for the Bresenham error term before
> drawing the main pixel, not after.

Merged.
   c22c936..863d528  master -> master

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120814/b8b2e62c/attachment.pgp>


More information about the xorg-devel mailing list