* Wed Aug 30 2006 Kristian Høgsberg <krh@redhat.com> - 1.1.1-33.fc6
- Update xorg-x11-server-1.1.1-offscreen-pixmaps.patch to evict pixmap when GLX_EXT_texture_from_pixmap is first used.
This commit is contained in:
parent
bdb7b59eb0
commit
ed663d805f
@ -1,104 +1,55 @@
|
||||
--- ./hw/xfree86/xaa/xaa.h.offscreen-pixmaps 2006-08-28 15:33:34.000000000 -0400
|
||||
+++ ./hw/xfree86/xaa/xaa.h 2006-08-28 15:33:36.000000000 -0400
|
||||
@@ -1373,6 +1373,9 @@
|
||||
);
|
||||
CARD32 *CPUToScreenTextureDstFormats;
|
||||
#endif /* RENDER */
|
||||
+
|
||||
+ unsigned int savedOffscreenDepths;
|
||||
+
|
||||
} XAAInfoRec, *XAAInfoRecPtr;
|
||||
|
||||
#define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE
|
||||
--- ./hw/xfree86/xaa/xaaInit.c.offscreen-pixmaps 2006-07-05 14:31:42.000000000 -0400
|
||||
+++ ./hw/xfree86/xaa/xaaInit.c 2006-08-28 15:31:03.000000000 -0400
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <xorg-config.h>
|
||||
#endif
|
||||
|
||||
+#include <string.h>
|
||||
#include "misc.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
@@ -20,6 +21,7 @@
|
||||
#include "xaawrap.h"
|
||||
#include "xf86fbman.h"
|
||||
#include "servermd.h"
|
||||
+#include "selection.h"
|
||||
|
||||
#define MAX_PREALLOC_MEM 65536 /* MUST be >= 1024 */
|
||||
|
||||
@@ -98,6 +100,49 @@
|
||||
+++ ./hw/xfree86/xaa/xaaInit.c 2006-08-30 16:47:29.000000000 -0400
|
||||
@@ -98,6 +98,30 @@
|
||||
xfree(infoRec);
|
||||
}
|
||||
|
||||
+static void
|
||||
+SelectionChangedCallback (CallbackListPtr *list,
|
||||
+ pointer xaaData, pointer callData)
|
||||
+void
|
||||
+XAAEvictPixmaps(void)
|
||||
+{
|
||||
+ static char atom_name[] = "_COMPIZ_GL_INCLUDE_INFERIORS";
|
||||
+ XAAScreenPtr pScreenPriv;
|
||||
+ XAAInfoRecPtr infoRec;
|
||||
+ ScreenPtr pScreen;
|
||||
+ int i;
|
||||
+
|
||||
+ SelectionInfoRec *info = callData;
|
||||
+ XAAInfoRecPtr infoRec = xaaData;
|
||||
+ ScreenPtr pScreen = infoRec->pScrn->pScreen;
|
||||
+ Atom atom;
|
||||
+ xf86MsgVerb(X_INFO, 3, "XAA: Evicting pixmaps\n");
|
||||
+
|
||||
+ atom = MakeAtom(atom_name, strlen(atom_name), 0);
|
||||
+ if (info->selection->selection != atom)
|
||||
+ return;
|
||||
+ for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
+ pScreen = screenInfo.screens[i];
|
||||
+ infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
||||
+
|
||||
+ pScreenPriv = pScreen->devPrivates[XAAScreenIndex].ptr;
|
||||
+ infoRec = pScreenPriv->AccelInfoRec;
|
||||
+
|
||||
+ if (info->kind == SelectionSetOwner && info->selection->window != None)
|
||||
+ {
|
||||
+ infoRec->savedOffscreenDepths = infoRec->offscreenDepths;
|
||||
+ infoRec->offscreenDepths = 0;
|
||||
+ infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
|
||||
+
|
||||
+ XAAMoveOutOffscreenPixmaps(pScreen);
|
||||
+ XAAInvalidatePixmapCache(pScreen);
|
||||
+
|
||||
+ xf86MsgVerb(X_INFO, 3, "'%s' selection grabbed; evicting pixmaps for screen %d\n",
|
||||
+ atom_name, pScreen->myNum);
|
||||
+ }
|
||||
+ else if (infoRec->savedOffscreenDepths > 0)
|
||||
+ {
|
||||
+ infoRec->Flags |= OFFSCREEN_PIXMAPS;
|
||||
+ infoRec->offscreenDepths = infoRec->savedOffscreenDepths;
|
||||
+
|
||||
+ if (!SwitchedOut) {
|
||||
+ xf86MsgVerb(X_INFO, 3, "'%s' selection released; pulling in pixmaps for screen %d\n",
|
||||
+ atom_name, pScreen->myNum);
|
||||
+
|
||||
+ XAAMoveInOffscreenPixmaps(pScreen);
|
||||
+ } else {
|
||||
+ xf86MsgVerb(X_INFO, 3, "'%s' selection released; will pull in pixmaps for screen %d when switched back in.\n",
|
||||
+ atom_name, pScreen->myNum);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
Bool
|
||||
XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
|
||||
@@ -228,11 +273,11 @@
|
||||
if(infoRec->Flags & MICROSOFT_ZERO_LINE_BIAS)
|
||||
miSetZeroLineBias(pScreen, OCTANT1 | OCTANT2 | OCTANT3 | OCTANT4);
|
||||
--- ./GL/glx/glxdri.c.offscreen-pixmaps 2006-08-30 16:46:45.000000000 -0400
|
||||
+++ ./GL/glx/glxdri.c 2006-08-30 16:45:52.000000000 -0400
|
||||
@@ -367,6 +367,19 @@
|
||||
int bpp;
|
||||
GLenum target, format, type;
|
||||
|
||||
+ AddCallback(&SelectionCallback, SelectionChangedCallback, infoRec);
|
||||
+ /* When the GLX_EXT_texture_from_pixmap is used, as it's
|
||||
+ * implemented here, we want to pull pixmap out of video memory
|
||||
+ * and into host memory. */
|
||||
+ {
|
||||
+ extern void XAAEvictPixmaps(void);
|
||||
+ static int evictedPixmaps;
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
static Bool
|
||||
XAACloseScreen (int i, ScreenPtr pScreen)
|
||||
{
|
||||
@@ -264,6 +309,9 @@
|
||||
|
||||
xfree ((pointer) pScreenPriv);
|
||||
|
||||
+ DeleteCallback(&SelectionCallback, SelectionChangedCallback,
|
||||
+ pScreenPriv->AccelInfoRec);
|
||||
+ if (!evictedPixmaps) {
|
||||
+ XAAEvictPixmaps();
|
||||
+ evictedPixmaps = TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
pixmap = (PixmapPtr) glxPixmap->pDraw;
|
||||
if (!glxPixmap->pDamage) {
|
||||
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
|
||||
|
@ -3,12 +3,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.1.1
|
||||
# NOTE: Now using the 'dist' tag as per http://fedoraproject.org/wiki/DistTag
|
||||
# For rawhide builds, bump the number /before/ the dist tag. For package
|
||||
# upgrades to officially released distribution releases, if the package
|
||||
# Version field above is not changing, append and/or bump a digit /after/
|
||||
# the dist tag. ie: 25%{?dist}.0 -> 25%{?dist}.1 ...
|
||||
Release: 32%{?dist}
|
||||
Release: 33%{?dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT/X11
|
||||
Group: User Interface/X
|
||||
@ -708,6 +703,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
%changelog
|
||||
* Wed Aug 30 2006 Kristian Høgsberg <krh@redhat.com> - 1.1.1-33.fc6
|
||||
- Update xorg-x11-server-1.1.1-offscreen-pixmaps.patch to evict pixmap
|
||||
when GLX_EXT_texture_from_pixmap is first used.
|
||||
|
||||
* Wed Aug 30 2006 Kristian Høgsberg <krh@redhat.com> - 1.1.1-32.fc6
|
||||
- Drop xorg-x11-server-1.1.0-gl-include-inferiors.patch now that
|
||||
compiz can uses the composite overlay window.
|
||||
|
Loading…
Reference in New Issue
Block a user