public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
* fix framebuffer block move support
@ 2008-11-09 11:44 Bart Veer
  0 siblings, 0 replies; only message in thread
From: Bart Veer @ 2008-11-09 11:44 UTC (permalink / raw)
  To: ecos-patches

As per a bug reported on ecos-discuss:

2008-11-09  Bart Veer  <bartv@ecoscentric.com>

	* src/linear.c: fix the block move operations (new_y > y) overlap
	handling.

Index: src/linear.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/framebuf/current/src/linear.c,v
retrieving revision 1.1
diff -u -p -r1.1 linear.c
--- src/linear.c	7 Oct 2008 10:15:04 -0000	1.1
+++ src/linear.c	9 Nov 2008 11:42:01 -0000
@@ -515,9 +515,9 @@ cyg_fb_linear_move_block_8_impl(void* fb
         dest   += (height * stride);
         
         for ( ; height; height--) {
-            __builtin_memcpy(dest, source, width);
             source  -= stride;
             dest    -= stride;
+            __builtin_memcpy(dest, source, width);
         }
         return;
     }
@@ -640,9 +640,9 @@ cyg_fb_linear_move_block_16_impl(void* f
         dest   = (cyg_uint16*)(((cyg_uint8*)dest)   + (height * stride8));
         width <<= 1;
         for ( ; height; height--) {
-            __builtin_memcpy(dest, source, width);
             source   = (cyg_uint16*)(((cyg_uint8*)source) - stride8);
             dest     = (cyg_uint16*)(((cyg_uint8*)dest) - stride8);
+            __builtin_memcpy(dest, source, width);
         }
         return;
     }
@@ -765,9 +765,9 @@ cyg_fb_linear_move_block_32_impl(void* f
         dest    = (cyg_uint32*)(((cyg_uint8*)dest)   + (height * stride8));
         width <<= 2;
         for ( ; height; height--) {
-            __builtin_memcpy(dest, source, width);
             source   = (cyg_uint32*)(((cyg_uint8*)source) - stride8);
             dest     = (cyg_uint32*)(((cyg_uint8*)dest) - stride8);
+            __builtin_memcpy(dest, source, width);
         }
         return;
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-09 11:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-09 11:44 fix framebuffer block move support Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).