Bug#615197: xserver-xorg-video-intel: Screen corruptions to due insufficient clipping
On Sun, May 15, 2011 at 21:34:26 +0200, Thomas Richter wrote:
> On 15.05.2011 21:21, Julien Cristau wrote:
> >Asked upstream, one question for you:
> >21:16< ickle> pbox->y2< pbox->y1 is an invalid rect
> >21:18< ickle> the previous line should be pbox->y1>= fullY1 break
> >21:18< ickle> can you ask if it appears to be just an off-by-one?
> >ie what are the values of pbox->y1 and pbox->y2?
> Sorry, I don't quite get the question. All what the code does is
> that it checks whether the current line (fullY1) is between the top
> edge of the current rectangle in the damage region (pbox->y1<=
> fullY1) and above
> the bottom edge of the damage region (pbox->y2> fullY1). It is
> probably written in a somewhat unconventional way. A nicer way to
> put it is:
> fullY1 >= pbox->y1 && fullY1 < pbox->y2
> Thus, line at or below the top edge, and above the bottom edge. A
> rectangle doesn't have to be invalid to have fullY1 >= pbox->y1 and
> fullY1 < pbox->y2. I'm not quite clear what the break is used for,
> I assume that the rectangles are ordered by increasing Y coordinate, and
> that the code can terminate early if it detects a rectangle in the
> damage region that has a top edge below the line.
cc:ing Chris so he can answer directly.