xserver: Branch 'master' - 2 commits
Tilman Sauerbeck
tilman at kemper.freedesktop.org
Mon Apr 14 04:02:38 PDT 2008
exa/exa.c | 53 ++++++++++++++++++++++++++++++++---------------------
exa/exa_render.c | 3 +++
2 files changed, 35 insertions(+), 21 deletions(-)
New commits:
commit f133d85778462134f366389bde7673bff7845fa8
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Mon Apr 14 11:43:51 2008 +0200
EXA: Update pixmaps' accel_blocked field in ModifyPixmapHeader.
diff --git a/exa/exa.c b/exa/exa.c
index cbe66e8..81dc3e2 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -224,6 +224,30 @@ exaLog2(int val)
return bits - 1;
}
+static void
+exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
+ int w, int h, int bpp)
+{
+ pExaPixmap->accel_blocked = 0;
+
+ if (pExaScr->info->maxPitchPixels) {
+ int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8;
+
+ if (pExaPixmap->fb_pitch > max_pitch)
+ pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
+ }
+
+ if (pExaScr->info->maxPitchBytes &&
+ pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes)
+ pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
+
+ if (w > pExaScr->info->maxX)
+ pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH;
+
+ if (h > pExaScr->info->maxY)
+ pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT;
+}
+
/**
* exaCreatePixmap() creates a new pixmap.
*
@@ -339,25 +363,8 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
REGION_NULL(pScreen, &pExaPixmap->validSys);
REGION_NULL(pScreen, &pExaPixmap->validFB);
- /* Check whether this pixmap can be used for acceleration. */
- pExaPixmap->accel_blocked = 0;
-
- if (pExaScr->info->maxPitchPixels) {
- int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8;
-
- if (pExaPixmap->fb_pitch > max_pitch)
- pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
- }
-
- if (pExaScr->info->maxPitchBytes &&
- pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes)
- pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
-
- if (w > pExaScr->info->maxX)
- pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH;
-
- if (h > pExaScr->info->maxY)
- pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT;
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ w, h, bpp);
return pPixmap;
}
@@ -373,12 +380,16 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
if (!pPixmap)
return FALSE;
+ pExaScr = ExaGetScreenPriv(pPixmap->drawable.pScreen);
pExaPixmap = ExaGetPixmapPriv(pPixmap);
- if (pExaPixmap)
+ if (pExaPixmap) {
pExaPixmap->sys_ptr = pPixData;
- pExaScr = ExaGetScreenPriv(pPixmap->drawable.pScreen);
+ exaSetAccelBlock(pExaScr, pExaPixmap,
+ width, height, bitsPerPixel);
+ }
+
if (pExaScr->info->ModifyPixmapHeader) {
ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
commit bb8868540f017b121d698da45e552ffb55a57cea
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date: Mon Apr 14 09:58:49 2008 +0200
EXA: Teach exaCompositeFallbackPictDesc() about x8r8g8b8.
diff --git a/exa/exa_render.c b/exa/exa_render.c
index da81401..1d7b897 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -51,6 +51,9 @@ static void exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n)
case PICT_a8r8g8b8:
snprintf(format, 20, "ARGB8888");
break;
+ case PICT_x8r8g8b8:
+ snprintf(format, 20, "XRGB8888");
+ break;
case PICT_r5g6b5:
snprintf(format, 20, "RGB565 ");
break;
More information about the xorg-commit
mailing list