xserver: Branch 'server-1.19-branch' - 3 commits
Adam Jackson
ajax at kemper.freedesktop.org
Thu Feb 23 20:05:03 UTC 2017
configure.ac | 2 +-
dix/pixmap.c | 31 ++++++++++++++++++++++++-------
miext/damage/damage.c | 10 ++++++++++
present/present.c | 4 ----
4 files changed, 35 insertions(+), 12 deletions(-)
New commits:
commit 04c72d3c30623e360fd0bd37ed559915b93467f4
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Tue Feb 7 17:38:23 2017 +0900
damage: Validate source pictures bound to windows before unwrapping
The lower layers also do this, but no damage may be reported there,
since we unwrap before calling down.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit 38696ea56854e055c31bd2730adfc7c39aa115b0)
diff --git a/configure.ac b/configure.ac
index b0daff9..770c3e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1844,7 +1844,7 @@ if test "x$XNEST" = xyes; then
if test "x$have_xnest" = xno; then
AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
fi
- XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
+ XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $RENDER_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB"
XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
AC_SUBST([XNEST_LIBS])
AC_SUBST([XNEST_SYS_LIBS])
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index d6a3614..2fae03f 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -34,6 +34,7 @@
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/libxfont2.h>
#include "mi.h"
+#include "mipict.h"
#include "regionstr.h"
#include "globals.h"
#include "gcstruct.h"
@@ -499,6 +500,15 @@ damageComposite(CARD8 op,
if (BOX_NOT_EMPTY(box))
damageDamageBox(pDst->pDrawable, &box, pDst->subWindowMode);
}
+ /*
+ * Validating a source picture bound to a window may trigger other
+ * composite operations. Do it before unwrapping to make sure damage
+ * is reported correctly.
+ */
+ if (pSrc->pDrawable && WindowDrawable(pSrc->pDrawable->type))
+ miCompositeSourceValidate(pSrc);
+ if (pMask && pMask->pDrawable && WindowDrawable(pMask->pDrawable->type))
+ miCompositeSourceValidate(pMask);
unwrap(pScrPriv, ps, Composite);
(*ps->Composite) (op,
pSrc,
commit 5c1dd4eba833ecf4ea789c8319b4e25ea1e1fab9
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Feb 1 18:35:57 2017 +0900
present: Allow flipping with PRIME slave outputs
Works fine now.
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
(cherry picked from commit 542d9f6807ac06b70f564ccab10af69fa21a1221)
diff --git a/present/present.c b/present/present.c
index ef89045..aa9c041 100644
--- a/present/present.c
+++ b/present/present.c
@@ -144,10 +144,6 @@ present_check_flip(RRCrtcPtr crtc,
if (!screen_priv->info->flip)
return FALSE;
- /* Fail to flip if we have slave outputs */
- if (screen->output_slaves)
- return FALSE;
-
/* Make sure the window hasn't been redirected with Composite */
window_pixmap = screen->GetWindowPixmap(window);
if (window_pixmap != screen->GetScreenPixmap(screen) &&
commit 10f8cf3572297764c6b50ac1f01b3ee195b1a453
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Feb 1 18:35:56 2017 +0900
prime: Sync shared pixmap from root window instead of screen pixmap
The screen pixmap doesn't receive updates while there's a Present flip
window.
[1.19: Squashed in a6566f9e to avoid intermediate regression - ajax]
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
(cherry picked from commit b5b292896f647c85f03f53b20b2f03c0e94de428)
(cherry picked from commit a6566f9e4dbf9ea9568a14e22cb5d004e10dbd4d)
diff --git a/dix/pixmap.c b/dix/pixmap.c
index 49267a1..b67a2e8 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -172,6 +172,14 @@ PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave)
return spix;
}
+static void
+PixmapDirtyDamageDestroy(DamagePtr damage, void *closure)
+{
+ PixmapDirtyUpdatePtr dirty = closure;
+
+ dirty->damage = NULL;
+}
+
Bool
PixmapStartDirtyTracking(PixmapPtr src,
PixmapPtr slave_dst,
@@ -195,10 +203,10 @@ PixmapStartDirtyTracking(PixmapPtr src,
dirty_update->dst_x = dst_x;
dirty_update->dst_y = dst_y;
dirty_update->rotation = rotation;
- dirty_update->damage = DamageCreate(NULL, NULL,
+ dirty_update->damage = DamageCreate(NULL, PixmapDirtyDamageDestroy,
DamageReportNone,
TRUE, src->drawable.pScreen,
- src->drawable.pScreen);
+ dirty_update);
if (rotation != RR_Rotate_0) {
RRTransformCompute(x, y,
@@ -233,7 +241,8 @@ PixmapStartDirtyTracking(PixmapPtr src,
RegionUnion(damageregion, damageregion, &dstregion);
RegionUninit(&dstregion);
- DamageRegister(&src->drawable, dirty_update->damage);
+ DamageRegister(screen->root ? &screen->root->drawable : &src->drawable,
+ dirty_update->damage);
xorg_list_add(&dirty_update->ent, &screen->pixmap_dirty_list);
return TRUE;
}
@@ -246,7 +255,8 @@ PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst)
xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) {
if (ent->src == src && ent->slave_dst == slave_dst) {
- DamageDestroy(ent->damage);
+ if (ent->damage)
+ DamageDestroy(ent->damage);
xorg_list_del(&ent->ent);
free(ent);
}
@@ -260,6 +270,7 @@ PixmapDirtyCopyArea(PixmapPtr dst,
RegionPtr dirty_region)
{
ScreenPtr pScreen = dirty->src->drawable.pScreen;
+ DrawablePtr src = pScreen->root ? &pScreen->root->drawable : &dirty->src->drawable;
int n;
BoxPtr b;
GCPtr pGC;
@@ -267,7 +278,13 @@ PixmapDirtyCopyArea(PixmapPtr dst,
n = RegionNumRects(dirty_region);
b = RegionRects(dirty_region);
- pGC = GetScratchGC(dirty->src->drawable.depth, pScreen);
+ pGC = GetScratchGC(src->depth, pScreen);
+ if (pScreen->root) {
+ ChangeGCVal subWindowMode;
+
+ subWindowMode.val = IncludeInferiors;
+ ChangeGC(NullClient, pGC, GCSubwindowMode, &subWindowMode);
+ }
ValidateGC(&dst->drawable, pGC);
while (n--) {
@@ -278,7 +295,7 @@ PixmapDirtyCopyArea(PixmapPtr dst,
w = dst_box.x2 - dst_box.x1;
h = dst_box.y2 - dst_box.y1;
- pGC->ops->CopyArea(&dirty->src->drawable, &dst->drawable, pGC,
+ pGC->ops->CopyArea(src, &dst->drawable, pGC,
dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h,
dirty->dst_x + dst_box.x1,
dirty->dst_y + dst_box.y1);
@@ -301,7 +318,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap,
int error;
src = CreatePicture(None,
- &dirty->src->drawable,
+ &pScreen->root->drawable,
format,
CPSubwindowMode,
&include_inferiors, serverClient, &error);
More information about the xorg-commit
mailing list