Better fix for [bug 829] (same surface display corruption)

Lionel Ulmer lionel.ulmer at free.fr
Fri Jul 5 15:18:11 CDT 2002


On Fri, Jul 05, 2002 at 12:50:07PM -0700, Alexandre Julliard wrote:
> Lionel Ulmer <lionel.ulmer at free.fr> writes:
> 
> > What I had in mind in my comments to your patch was something like that :
> > 
> >  if (src != iface)
> >     Do the standard memcpy code path
> >  else
> >     if source_Y > dest_Y
> >       do the ascending memmove copy
> >     else
> >       do the descending memmove copy
> 
> Do you actually need memmove in all these cases?  It seems to me that
> it would only be needed if source_Y == dest_Y.

Yeah, you're right. So the thing should be :

  if ((not on the same surface) OR
      (src_Y > dst_Y) OR
      ((src_Y == dst_Y) AND
       ((src_rect_Right <= dst_rect_Left) OR
        (dst_rect_Right <= src_rect_Left))))
      ascending memcpy path
  else if src_Y == dst_Y
      memmove path
  else
      descending memcpy path

And the code should even be understandable :-)

                              Lionel

-- 
		 Lionel Ulmer - http://www.bbrox.org/



More information about the wine-devel mailing list