From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] ioemu: fix xenfb slow case update Date: Fri, 29 Feb 2008 15:26:22 +0000 Message-ID: <20080229152622.GC8268@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ioemu: fix xenfb slow case update Signed-off-by: Samuel Thibault diff -r 067d8f19e78a tools/ioemu/hw/xenfb.c --- a/tools/ioemu/hw/xenfb.c Thu Feb 28 13:55:37 2008 +0000 +++ b/tools/ioemu/hw/xenfb.c Fri Feb 29 15:25:17 2008 +0000 @@ -1072,7 +1072,7 @@ /* A convenient function for munging pixels between different depths */ #define BLT(SRC_T,DST_T,RLS,GLS,BLS,RRS,GRS,BRS,RM,GM,BM) \ - for (line = y ; line < h ; line++) { \ + for (line = y ; line < (y+h) ; line++) { \ SRC_T *src = (SRC_T *)(xenfb->pixels \ + (line * xenfb->row_stride) \ + (x * xenfb->depth / 8)); \ @@ -1080,7 +1080,7 @@ + (line * xenfb->ds->linesize) \ + (x * xenfb->ds->depth / 8)); \ int col; \ - for (col = x ; col < w ; col++) { \ + for (col = x ; col < (x+w) ; col++) { \ *dst = (((*src >> RRS) & RM) << RLS) | \ (((*src >> GRS) & GM) << GLS) | \ (((*src >> GRS) & BM) << BLS); \