[PATCH] composite: Wrap GetSpans
Adam Jackson
ajax at redhat.com
Wed Oct 22 10:19:18 PDT 2014
GetSpans should flush composition from children to parent, just like
GetImage and SourceValidate. Fortunately no one is likely to have
noticed, since to hit this you're already deep into failure town.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
composite/compinit.c | 19 +++++++++++++++++++
composite/compint.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/composite/compinit.c b/composite/compinit.c
index be05aec..1a7f8a4 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -78,6 +78,7 @@ compCloseScreen(ScreenPtr pScreen)
pScreen->PositionWindow = cs->PositionWindow;
pScreen->GetImage = cs->GetImage;
+ pScreen->GetSpans = cs->GetSpans;
pScreen->SourceValidate = cs->SourceValidate;
free(cs);
@@ -168,6 +169,21 @@ compGetImage(DrawablePtr pDrawable,
}
static void
+compGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth,
+ int nspans, char *pdstStart)
+{
+ ScreenPtr pScreen = pDrawable->pScreen;
+ CompScreenPtr cs = GetCompScreen(pScreen);
+
+ pScreen->GetSpans = cs->GetSpans;
+ if (pDrawable->type == DRAWABLE_WINDOW)
+ compPaintChildrenToWindow((WindowPtr) pDrawable);
+ (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
+ cs->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = compGetSpans;
+}
+
+static void
compSourceValidate(DrawablePtr pDrawable,
int x, int y,
int width, int height, unsigned int subWindowMode)
@@ -449,6 +465,9 @@ compScreenInit(ScreenPtr pScreen)
cs->GetImage = pScreen->GetImage;
pScreen->GetImage = compGetImage;
+ cs->GetSpans = pScreen->GetSpans;
+ pScreen->GetSpans = compGetSpans;
+
cs->SourceValidate = pScreen->SourceValidate;
pScreen->SourceValidate = compSourceValidate;
diff --git a/composite/compint.h b/composite/compint.h
index 56b76c5..f06b846 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -168,6 +168,7 @@ typedef struct _CompScreen {
CompOverlayClientPtr pOverlayClients;
GetImageProcPtr GetImage;
+ GetSpansProcPtr GetSpans;
SourceValidateProcPtr SourceValidate;
} CompScreenRec, *CompScreenPtr;
--
1.9.3
More information about the xorg-devel
mailing list