summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-10-02 08:28:27 +0000
committerEric Anholt <anholt@freebsd.org>2005-10-02 08:28:27 +0000
commitecaa46380ed0a920186407b9294c5c60f75f1a13 (patch)
tree756b32993f2e0e3ccf2a221d4b686e52387069fc /hw
parent2c82429f8957ed0268c0e4e4fe5aed9093f33960 (diff)
Bugzilla #4616:
- Merge various fb/ bits of COMPOSITE support from xserver, which weren't necessary before due to cw hiding the issues. Fixes offset calculations for a number of operations, and may pull some fixes that cairo has wanted for XAA as well. - Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep cw from getting initialized from the damage code. While it would be cleaner to have each DDX initialize it if it needs it, we don't have control over all of them (e.g. nvidia). - Use the miDisableCompositeWrapper() to keep cw from getting set up for screens using EXA, because EXA is already aware of composite. Avoiding cw improved performance 0-35% on operations tested by ajax in x11perf.
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/exa/exa.c15
-rw-r--r--hw/xfree86/exa/exa_accel.c15
-rw-r--r--hw/xfree86/exa/exa_migration.c15
3 files changed, 24 insertions, 21 deletions
diff --git a/hw/xfree86/exa/exa.c b/hw/xfree86/exa/exa.c
index b7ba3b319..fb46f4449 100644
--- a/hw/xfree86/exa/exa.c
+++ b/hw/xfree86/exa/exa.c
@@ -31,6 +31,7 @@
#include "xf86str.h"
#include "xf86.h"
#include "exa.h"
+#include "cw.h"
#if DEBUG_MIGRATE
#define DBG_MIGRATE(a) ErrorF a
@@ -1232,19 +1233,17 @@ exaFillRegionTiled (DrawablePtr pDrawable,
{
int nbox = REGION_NUM_RECTS (pRegion);
BoxPtr pBox = REGION_RECTS (pRegion);
- int xRot = pDrawable->x + xoff;
- int yRot = pDrawable->y + yoff;
while (nbox--)
{
int height = pBox->y2 - pBox->y1;
- int dstY = pBox->y1 + yoff;
+ int dstY = pBox->y1;
int tileY;
- modulus (dstY - yRot, tileHeight, tileY);
+ tileY = (dstY - pDrawable->y) % tileHeight;
while (height > 0) {
int width = pBox->x2 - pBox->x1;
- int dstX = pBox->x1 + xoff;
+ int dstX = pBox->x1;
int tileX;
int h = tileHeight - tileY;
@@ -1252,7 +1251,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
h = height;
height -= h;
- modulus (dstX - xRot, tileWidth, tileX);
+ tileX = (dstX - pDrawable->x) % tileWidth;
while (width > 0) {
int w = tileWidth - tileX;
if (w > width)
@@ -1261,7 +1260,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
(*pExaScr->info->accel.Copy) (pPixmap,
tileX, tileY,
- dstX, dstY,
+ dstX + xoff, dstY + yoff,
w, h);
dstX += w;
tileX = 0;
@@ -1428,6 +1427,8 @@ exaDriverInit (ScreenPtr pScreen,
}
#endif
+ miDisableCompositeWrapper(pScreen);
+
/*
* Hookup offscreen pixmaps
*/
diff --git a/hw/xfree86/exa/exa_accel.c b/hw/xfree86/exa/exa_accel.c
index b7ba3b319..fb46f4449 100644
--- a/hw/xfree86/exa/exa_accel.c
+++ b/hw/xfree86/exa/exa_accel.c
@@ -31,6 +31,7 @@
#include "xf86str.h"
#include "xf86.h"
#include "exa.h"
+#include "cw.h"
#if DEBUG_MIGRATE
#define DBG_MIGRATE(a) ErrorF a
@@ -1232,19 +1233,17 @@ exaFillRegionTiled (DrawablePtr pDrawable,
{
int nbox = REGION_NUM_RECTS (pRegion);
BoxPtr pBox = REGION_RECTS (pRegion);
- int xRot = pDrawable->x + xoff;
- int yRot = pDrawable->y + yoff;
while (nbox--)
{
int height = pBox->y2 - pBox->y1;
- int dstY = pBox->y1 + yoff;
+ int dstY = pBox->y1;
int tileY;
- modulus (dstY - yRot, tileHeight, tileY);
+ tileY = (dstY - pDrawable->y) % tileHeight;
while (height > 0) {
int width = pBox->x2 - pBox->x1;
- int dstX = pBox->x1 + xoff;
+ int dstX = pBox->x1;
int tileX;
int h = tileHeight - tileY;
@@ -1252,7 +1251,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
h = height;
height -= h;
- modulus (dstX - xRot, tileWidth, tileX);
+ tileX = (dstX - pDrawable->x) % tileWidth;
while (width > 0) {
int w = tileWidth - tileX;
if (w > width)
@@ -1261,7 +1260,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
(*pExaScr->info->accel.Copy) (pPixmap,
tileX, tileY,
- dstX, dstY,
+ dstX + xoff, dstY + yoff,
w, h);
dstX += w;
tileX = 0;
@@ -1428,6 +1427,8 @@ exaDriverInit (ScreenPtr pScreen,
}
#endif
+ miDisableCompositeWrapper(pScreen);
+
/*
* Hookup offscreen pixmaps
*/
diff --git a/hw/xfree86/exa/exa_migration.c b/hw/xfree86/exa/exa_migration.c
index b7ba3b319..fb46f4449 100644
--- a/hw/xfree86/exa/exa_migration.c
+++ b/hw/xfree86/exa/exa_migration.c
@@ -31,6 +31,7 @@
#include "xf86str.h"
#include "xf86.h"
#include "exa.h"
+#include "cw.h"
#if DEBUG_MIGRATE
#define DBG_MIGRATE(a) ErrorF a
@@ -1232,19 +1233,17 @@ exaFillRegionTiled (DrawablePtr pDrawable,
{
int nbox = REGION_NUM_RECTS (pRegion);
BoxPtr pBox = REGION_RECTS (pRegion);
- int xRot = pDrawable->x + xoff;
- int yRot = pDrawable->y + yoff;
while (nbox--)
{
int height = pBox->y2 - pBox->y1;
- int dstY = pBox->y1 + yoff;
+ int dstY = pBox->y1;
int tileY;
- modulus (dstY - yRot, tileHeight, tileY);
+ tileY = (dstY - pDrawable->y) % tileHeight;
while (height > 0) {
int width = pBox->x2 - pBox->x1;
- int dstX = pBox->x1 + xoff;
+ int dstX = pBox->x1;
int tileX;
int h = tileHeight - tileY;
@@ -1252,7 +1251,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
h = height;
height -= h;
- modulus (dstX - xRot, tileWidth, tileX);
+ tileX = (dstX - pDrawable->x) % tileWidth;
while (width > 0) {
int w = tileWidth - tileX;
if (w > width)
@@ -1261,7 +1260,7 @@ exaFillRegionTiled (DrawablePtr pDrawable,
(*pExaScr->info->accel.Copy) (pPixmap,
tileX, tileY,
- dstX, dstY,
+ dstX + xoff, dstY + yoff,
w, h);
dstX += w;
tileX = 0;
@@ -1428,6 +1427,8 @@ exaDriverInit (ScreenPtr pScreen,
}
#endif
+ miDisableCompositeWrapper(pScreen);
+
/*
* Hookup offscreen pixmaps
*/