Find a file
Adam Jackson ef42bc7f67 fb: Fix memcpy abuse
The memcpy fast path implicitly assumes that the copy walks
left-to-right.  That's not something memcpy guarantees, and newer glibc
on some processors will indeed break that assumption.  Since we walk a
line at a time, check the source and destination against the width of
the blit to determine whether we can be sloppy enough to allow memcpy.
(Having done this, we can remove the check for !reverse as well.)

On an Intel Core i7-2630QM with an NVIDIA GeForce GTX 460M running in
NoAccel, the broken code and various fixes for -copywinwin{10,100,500}
gives (edited to fit in 80 columns):

1: Disable the fastpath entirely
2: Replace memcpy with memmove
3: This fix
4: The code before this fix

  1            2                 3                 4           Operation
------   ---------------   ---------------   ---------------   ------------
258000   269000 (  1.04)   544000 (  2.11)   552000 (  2.14)   Copy 10x10
 21300    23000 (  1.08)    43700 (  2.05)    47100 (  2.21)   Copy 100x100
   960      962 (  1.00)     1990 (  2.09)     1990 (  2.07)   Copy 500x500

So it's a modest performance hit, but correctness demands it, and it's
probably worth keeping the 2x speedup from having the fast path in the
first place.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit e32cc0b4c8)
2011-10-18 09:13:25 -07:00
composite composite: Support updating an arbitrary subtree 2011-01-05 11:57:31 -08:00
config config: handle device change event properly 2011-03-28 12:18:21 -07:00
damageext Set DamageSetReportAfterOp to true for the damage extension 2010-11-10 15:51:27 -08:00
dbe Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo 2011-05-13 23:36:28 -07:00
dix dixfonts: Don't overwrite local c variable until new_closure is safely initialized. 2011-10-09 01:36:54 -07:00
doc man: refactor common code in the man pages makefiles 2011-01-18 15:11:10 -08:00
exa EXA/mixed: Update sys_pitch in MPH even when there's no system memory copy. 2011-08-10 15:00:47 -07:00
fb fb: Fix memcpy abuse 2011-10-18 09:13:25 -07:00
glx glx: Remove a few lingering traces of __GLXscreen.GLXVersion 2011-07-16 13:19:27 -07:00
hw XQuartz: pbproxy: Add missing AM_OBJCFLAGS 2011-10-09 01:37:31 -07:00
include input: add POINTER_NORAW to avoid generation of raw events (#30068) 2011-07-09 14:28:28 -07:00
m4 Add macro for detecting thread local storage support. 2011-01-08 08:42:49 -08:00
mi input: add POINTER_NORAW to avoid generation of raw events (#30068) 2011-07-09 14:28:28 -07:00
miext rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value 2011-04-27 18:57:06 -07:00
os os: Silence warnings when building with clang 2011-05-11 12:26:53 -07:00
randr randr: Compare all the bytes in RRPostPendingProperties 2011-08-04 22:56:58 -07:00
record Only free pContext once when AddResource fails in ProcRecordCreateContext 2011-05-13 23:35:43 -07:00
render render: fix memory leaks in ProcRenderCompositeGlyphs 2011-04-04 17:27:12 +03:00
test test: don't test for double alignment on i386. (#36986) 2011-06-11 10:05:43 -07:00
Xext Xext: Fix buggy checks. 2011-06-29 21:38:33 -07:00
xfixes xorg: remove unused pointer values all over the server 2011-04-04 17:27:12 +03:00
Xi input: Only release SD buttons for explicit floating/reattachment (#36146) 2011-06-20 15:33:16 +10:00
xkb XkbAddGeomProperty: Fix checks for malloc failure 2011-04-07 08:36:57 +10:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac configure.ac: Bump version to 1.10.4 2011-08-18 23:49:27 -07:00
COPYING Add asprintf() implementation for platforms without it 2010-12-07 11:10:35 -08:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am remove dolt 2010-09-30 17:44:59 -07:00
manpages.am man: refactor common code in the man pages makefiles 2011-01-18 15:11:10 -08:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: use PKG_CONFIG variable rather than executable name 2010-01-07 12:57:23 -08:00
xorg-server.pc.in config: declare xserver private dependencies in xorg-server.pc 2010-06-22 11:34:47 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage