summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--exa/exa.c4
-rw-r--r--hw/xfree86/loader/misym.c3
-rw-r--r--hw/xfree86/xaa/Makefile.am1
-rw-r--r--hw/xfree86/xaa/xaaInit.c8
-rw-r--r--miext/cw/cw.c24
-rw-r--r--miext/cw/cw.h4
-rwxr-xr-xmiext/damage/damage.c10
8 files changed, 19 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac
index 14c4ccbda..fde6a8955 100644
--- a/configure.ac
+++ b/configure.ac
@@ -853,10 +853,6 @@ AC_DEFINE(DAMAGE,1,[Support Damage extension])
DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la'
DAMAGE_INC='-I$(top_srcdir)/damageext'
MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
-dnl damage (may) need the composite wrapper when composite is enabled
-if test "$COMPOSITE" = yes; then
- MIEXT_DAMAGE_LIB="$MIEXT_DAMAGE_LIB "'$(top_builddir)/miext/cw/libcw.la'
-fi
MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage'
AC_DEFINE(XINPUT, 1, [Support X Input extension])
diff --git a/exa/exa.c b/exa/exa.c
index e9f42df45..dd27d5e89 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -668,10 +668,6 @@ exaDriverInit (ScreenPtr pScreen,
}
#endif
-#ifdef COMPOSITE
- miDisableCompositeWrapper(pScreen);
-#endif
-
#ifdef MITSHM
/* Re-register with the MI funcs, which don't allow shared pixmaps.
* Shared pixmaps are almost always a performance loss for us, but this
diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c
index 46d6a024d..78ae10e02 100644
--- a/hw/xfree86/loader/misym.c
+++ b/hw/xfree86/loader/misym.c
@@ -208,9 +208,6 @@ _X_HIDDEN void *miLookupTab[] = {
#ifdef RENDER
SYMFUNC(miGlyphExtents)
#endif
-#ifdef COMPOSITE
- SYMFUNC(miDisableCompositeWrapper)
-#endif
#ifdef DAMAGE
SYMFUNC(DamageDamageRegion)
#endif
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index 5d529b118..6ed8303a4 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -9,6 +9,7 @@ MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaStipple.c
POLYSEG = s-xaaLine.c s-xaaDashLine.c
libxaa_la_LDFLAGS = -avoid-version
+libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
module_LTLIBRARIES = libxaa.la
libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 1542fc26e..79a0e4ceb 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -227,6 +227,14 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS)
miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4);
+#ifdef COMPOSITE
+ /* Initialize the composite wrapper. This needs to happen after the
+ * wrapping above (so it comes before us), but before all other extensions,
+ * so it doesn't confuse them. (particularly damage).
+ */
+ miInitializeCompositeWrapper(pScreen);
+#endif
+
return TRUE;
}
diff --git a/miext/cw/cw.c b/miext/cw/cw.c
index f60f8cf28..69502711a 100644
--- a/miext/cw/cw.c
+++ b/miext/cw/cw.c
@@ -50,7 +50,6 @@ int cwWindowIndex;
#ifdef RENDER
int cwPictureIndex;
#endif
-static Bool cwDisabled[MAXSCREENS];
static unsigned long cwGeneration = 0;
extern GCOps cwGCOps;
@@ -619,9 +618,9 @@ void
miInitializeCompositeWrapper(ScreenPtr pScreen)
{
cwScreenPtr pScreenPriv;
-
- if (cwDisabled[pScreen->myNum])
- return;
+#ifdef RENDER
+ Bool has_render = GetPictureScreenIfSet(pScreen) != NULL;
+#endif
if (cwGeneration != serverGeneration)
{
@@ -631,7 +630,8 @@ miInitializeCompositeWrapper(ScreenPtr pScreen)
cwGCIndex = AllocateGCPrivateIndex();
cwWindowIndex = AllocateWindowPrivateIndex();
#ifdef RENDER
- cwPictureIndex = AllocatePicturePrivateIndex();
+ if (has_render)
+ cwPictureIndex = AllocatePicturePrivateIndex();
#endif
cwGeneration = serverGeneration;
}
@@ -640,8 +640,10 @@ miInitializeCompositeWrapper(ScreenPtr pScreen)
if (!AllocateWindowPrivate(pScreen, cwWindowIndex, 0))
return;
#ifdef RENDER
- if (!AllocatePicturePrivate(pScreen, cwPictureIndex, 0))
- return;
+ if (has_render) {
+ if (!AllocatePicturePrivate(pScreen, cwPictureIndex, 0))
+ return;
+ }
#endif
pScreenPriv = (cwScreenPtr)xalloc(sizeof(cwScreenRec));
if (!pScreenPriv)
@@ -661,17 +663,11 @@ miInitializeCompositeWrapper(ScreenPtr pScreen)
SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap);
#ifdef RENDER
- if (GetPictureScreen (pScreen))
+ if (has_render)
cwInitializeRender(pScreen);
#endif
}
-_X_EXPORT 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 09cfc7828..69abbbfed 100644
--- a/miext/cw/cw.h
+++ b/miext/cw/cw.h
@@ -169,7 +169,3 @@ cwFiniRender (ScreenPtr pScreen);
void
miInitializeCompositeWrapper(ScreenPtr pScreen);
-
-/* Must be called before miInitializeCompositeWrapper */
-void
-miDisableCompositeWrapper(ScreenPtr pScreen);
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 6f1ee2894..d93074758 100755
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -1831,16 +1831,6 @@ DamageSetup (ScreenPtr pScreen)
if (!pScrPriv)
return FALSE;
-#ifdef COMPOSITE
- /* This is a kludge to ensure wrapping order with the composite wrapper.
- * If it's done from compinit.c, then DamageSetup may be called before the
- * extension init phase, so that cw will be higher in the wrapping chain and
- * rewrite drawables before damage gets to it, causing confusion.
- */
- if (!noCompositeExtension)
- miInitializeCompositeWrapper (pScreen);
-#endif
-
pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0;