summaryrefslogtreecommitdiff
path: root/miext/cw
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 /miext/cw
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 'miext/cw')
-rw-r--r--miext/cw/cw.c10
-rw-r--r--miext/cw/cw.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/miext/cw/cw.c b/miext/cw/cw.c
index 2b8010f50..4ebf8ab8a 100644
--- a/miext/cw/cw.c
+++ b/miext/cw/cw.c
@@ -48,6 +48,7 @@ int cwWindowIndex;
#ifdef RENDER
int cwPictureIndex;
#endif
+static Bool cwDisabled[MAXSCREENS];
static unsigned long cwGeneration = 0;
extern GCOps cwGCOps;
@@ -617,6 +618,9 @@ miInitializeCompositeWrapper(ScreenPtr pScreen)
{
cwScreenPtr pScreenPriv;
+ if (cwDisabled[pScreen->myNum])
+ return;
+
if (cwGeneration != serverGeneration)
{
cwScreenIndex = AllocateScreenPrivateIndex();
@@ -660,6 +664,12 @@ miInitializeCompositeWrapper(ScreenPtr pScreen)
#endif
}
+void
+miDisableCompositeWrapper(ScreenPtr pScreen)
+{
+ cwDisabled[pScreen->myNum] = TRUE;
+}
+
static Bool
cwCloseScreen (int i, ScreenPtr pScreen)
{
diff --git a/miext/cw/cw.h b/miext/cw/cw.h
index 1f8c400e2..67ce9cd31 100644
--- a/miext/cw/cw.h
+++ b/miext/cw/cw.h
@@ -164,5 +164,10 @@ void
cwFiniRender (ScreenPtr pScreen);
/* cw.c */
+
void
miInitializeCompositeWrapper(ScreenPtr pScreen);
+
+/* Must be called before miInitializeCompositeWrapper */
+void
+miDisableCompositeWrapper(ScreenPtr pScreen);