From 1f43d218cc24358a0379535ed517c23011633c31 Mon Sep 17 00:00:00 2001 From: Thomas Winischhofer Date: Thu, 20 Oct 2005 21:45:40 +0000 Subject: [PATCH] EXA: The "optimization" for using a fill operation instead of 1x1 copies checked the destination drawable's dimensions (!) instead of the tile's. Really.... --- exa/exa.c | 6 +++--- exa/exa_accel.c | 6 +++--- exa/exa_migration.c | 6 +++--- hw/xfree86/exa/exa.c | 6 +++--- hw/xfree86/exa/exa_accel.c | 6 +++--- hw/xfree86/exa/exa_migration.c | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index c8e57e440..4d2014d44 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -428,7 +428,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (w > 32767 || h > 32767) return NullPixmap; - + if (!pScrn->vtSema || pExaScr->swappedOut) { pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); } else { @@ -1225,7 +1225,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, STRACE; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - + if (pDrawable->width > pExaScr->info->card.maxX || pDrawable->height > pExaScr->info->card.maxY || tileWidth > pExaScr->info->card.maxX || @@ -1237,7 +1237,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ - if (pDrawable->width == 1 && pDrawable->height == 1) { + if (tileWidth == 1 && tileHeight == 1) { CARD32 pixel; exaDrawableUseMemory(&pTile->drawable); diff --git a/exa/exa_accel.c b/exa/exa_accel.c index c8e57e440..4d2014d44 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -428,7 +428,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (w > 32767 || h > 32767) return NullPixmap; - + if (!pScrn->vtSema || pExaScr->swappedOut) { pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); } else { @@ -1225,7 +1225,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, STRACE; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - + if (pDrawable->width > pExaScr->info->card.maxX || pDrawable->height > pExaScr->info->card.maxY || tileWidth > pExaScr->info->card.maxX || @@ -1237,7 +1237,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ - if (pDrawable->width == 1 && pDrawable->height == 1) { + if (tileWidth == 1 && tileHeight == 1) { CARD32 pixel; exaDrawableUseMemory(&pTile->drawable); diff --git a/exa/exa_migration.c b/exa/exa_migration.c index c8e57e440..4d2014d44 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c @@ -428,7 +428,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (w > 32767 || h > 32767) return NullPixmap; - + if (!pScrn->vtSema || pExaScr->swappedOut) { pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); } else { @@ -1225,7 +1225,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, STRACE; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - + if (pDrawable->width > pExaScr->info->card.maxX || pDrawable->height > pExaScr->info->card.maxY || tileWidth > pExaScr->info->card.maxX || @@ -1237,7 +1237,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ - if (pDrawable->width == 1 && pDrawable->height == 1) { + if (tileWidth == 1 && tileHeight == 1) { CARD32 pixel; exaDrawableUseMemory(&pTile->drawable); diff --git a/hw/xfree86/exa/exa.c b/hw/xfree86/exa/exa.c index c8e57e440..4d2014d44 100644 --- a/hw/xfree86/exa/exa.c +++ b/hw/xfree86/exa/exa.c @@ -428,7 +428,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (w > 32767 || h > 32767) return NullPixmap; - + if (!pScrn->vtSema || pExaScr->swappedOut) { pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); } else { @@ -1225,7 +1225,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, STRACE; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - + if (pDrawable->width > pExaScr->info->card.maxX || pDrawable->height > pExaScr->info->card.maxY || tileWidth > pExaScr->info->card.maxX || @@ -1237,7 +1237,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ - if (pDrawable->width == 1 && pDrawable->height == 1) { + if (tileWidth == 1 && tileHeight == 1) { CARD32 pixel; exaDrawableUseMemory(&pTile->drawable); diff --git a/hw/xfree86/exa/exa_accel.c b/hw/xfree86/exa/exa_accel.c index c8e57e440..4d2014d44 100644 --- a/hw/xfree86/exa/exa_accel.c +++ b/hw/xfree86/exa/exa_accel.c @@ -428,7 +428,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (w > 32767 || h > 32767) return NullPixmap; - + if (!pScrn->vtSema || pExaScr->swappedOut) { pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); } else { @@ -1225,7 +1225,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, STRACE; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - + if (pDrawable->width > pExaScr->info->card.maxX || pDrawable->height > pExaScr->info->card.maxY || tileWidth > pExaScr->info->card.maxX || @@ -1237,7 +1237,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ - if (pDrawable->width == 1 && pDrawable->height == 1) { + if (tileWidth == 1 && tileHeight == 1) { CARD32 pixel; exaDrawableUseMemory(&pTile->drawable); diff --git a/hw/xfree86/exa/exa_migration.c b/hw/xfree86/exa/exa_migration.c index c8e57e440..4d2014d44 100644 --- a/hw/xfree86/exa/exa_migration.c +++ b/hw/xfree86/exa/exa_migration.c @@ -428,7 +428,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) if (w > 32767 || h > 32767) return NullPixmap; - + if (!pScrn->vtSema || pExaScr->swappedOut) { pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth); } else { @@ -1225,7 +1225,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, STRACE; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - + if (pDrawable->width > pExaScr->info->card.maxX || pDrawable->height > pExaScr->info->card.maxY || tileWidth > pExaScr->info->card.maxX || @@ -1237,7 +1237,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ - if (pDrawable->width == 1 && pDrawable->height == 1) { + if (tileWidth == 1 && tileHeight == 1) { CARD32 pixel; exaDrawableUseMemory(&pTile->drawable);