diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-09-18 02:32:23 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-09-18 02:32:23 +0000 |
commit | 0b7441b19a1a5df91aca6b1a02944afb636bc523 (patch) | |
tree | 0a25c1625195951134d0e8967fc06b15fd05b56e | |
parent | 64e7db2698ee48af92594c16d72e33c16372c9d7 (diff) |
Break EXA ABI while we still can. Add coordinates to the UploadToScreen
hook so we can upload a subset of a pixmap, and convert the current
drivers to respect that. Use this support to directly UploadToScreen in
exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR
programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches
hot). I would have bumped major version, only I can't tell what the
EXA_VERSION_* is supposed to be doing as opposed to the module version.
-rw-r--r-- | src/radeon_exa_funcs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index 545202d..65ba4ce 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -206,15 +206,14 @@ FUNC_NAME(RADEONDoneCopy)(PixmapPtr pDst) } static Bool -FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, char *src, int src_pitch) +FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, + char *src, int src_pitch) { #if X_BYTE_ORDER == X_BIG_ENDIAN || defined(ACCEL_CP) RINFO_FROM_SCREEN(pDst->drawable.pScreen); #endif CARD8 *dst = pDst->devPrivate.ptr; unsigned int dst_pitch = exaGetPixmapPitch(pDst); - unsigned int w = pDst->drawable.width; - unsigned int h = pDst->drawable.height; unsigned int bpp = pDst->drawable.bitsPerPixel; #ifdef ACCEL_CP unsigned int hpass; @@ -229,12 +228,16 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, char *src, int src_pitch) TRACE; + if (bpp < 8) + return FALSE; + #ifdef ACCEL_CP if (info->directRenderingEnabled) { CARD8 *buf; int cpp = bpp / 8; ACCEL_PREAMBLE(); + dst += (x * cpp) + (y * dst_pitch); RADEON_SWITCH_TO_2D(); while ((buf = RADEONHostDataBlit(pScrn, cpp, w, dst_pitch, &buf_pitch, @@ -268,6 +271,7 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, char *src, int src_pitch) OUTREG(RADEON_SURFACE_CNTL, swapper); #endif w *= bpp / 8; + dst += (x * bpp / 8) + (y * dst_pitch); while (h--) { memcpy(dst, src, w); |