diff options
author | Phil Blundell <pb@reciva.com> | 2004-07-20 14:33:42 +0000 |
---|---|---|
committer | Phil Blundell <pb@reciva.com> | 2004-07-20 14:33:42 +0000 |
commit | 07e6011106dcfa0ab69861aa7dcbb88382625c16 (patch) | |
tree | 70fc4e8dc0957ef6e58551e07de9bf83a9299233 /hw | |
parent | 797114414096d7bf7ed0d73a878d0cffef262301 (diff) |
Select optimized
16bpp shadow copy functions if screen is 16bpp. Select -YX versions for
90 and 270 rotations if architecture is ARM.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/kdrive/fbdev/fbdev.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 44a95d19e..599aff104 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -391,13 +391,44 @@ fbdevSetShadow (ScreenPtr pScreen) KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; FbdevScrPriv *scrpriv = screen->driver; + FbdevPriv *priv = screen->card->driver; ShadowUpdateProc update; ShadowWindowProc window; + int useYX = 0; + +#ifdef __arm__ + /* Use variant copy routines that always read left to right in the + shadow framebuffer. Reading vertical strips is exceptionally + slow on XScale due to cache effects. */ + useYX = 1; +#endif window = fbdevWindowLinear; update = 0; if (scrpriv->randr) - update = shadowUpdateRotatePacked; + if (priv->var.bits_per_pixel == 16) { + switch (scrpriv->randr) { + case RR_Rotate_90: + if (useYX) + update = shadowUpdateRotate16_90YX; + else + update = shadowUpdateRotate16_90; + break; + case RR_Rotate_180: + update = shadowUpdateRotate16_180; + break; + case RR_Rotate_270: + if (useYX) + update = shadowUpdateRotate16_270YX; + else + update = shadowUpdateRotate16_270; + break; + default: + update = shadowUpdateRotate16; + break; + } + } else + update = shadowUpdateRotatePacked; else update = shadowUpdatePacked; return KdShadowSet (pScreen, scrpriv->randr, update, window); |