summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-10-09 11:57:18 -0400
committerAdam Jackson <ajax@nwnk.net>2019-10-30 16:26:01 +0000
commit516e75dbb6bbf97c7af9c2226242ffd9259fec11 (patch)
tree3f63330ec5a9e93e5b664cbfc0de863c62f228c5 /glx
parentff310903f34ac34c916ad74e919d1ac12aea4715 (diff)
dix: Call SourceValidate before GetImage
This ensures that any prep work for the drawable we're about to read from is already done before we call down to GetImage. This should be no functional change as most of the callers with a non-trivial SourceValidate are already wrapping GetImage and doing the equivalent thing, but we'll be simplifying that shortly. More importantly this ensures that if any of that prep work would generate events - like automatic compositing flushing rendering to a parent pixmap which then triggers damage - then it happens entirely before we start writing the GetImage reply header. Note that we do not do the same for GetSpans, but that's okay. The only way to get to GetSpans is through miCopyArea or miCopyPlane - where the callers must already call SourceValidate - or miGetImage - which this commit now protects with SourceValidate. Fixes: xorg/xserver#902 Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxdriswrast.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index 2858312de..c57d80db7 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -324,6 +324,7 @@ swrastGetImage(__DRIdrawable * draw,
ScreenPtr pScreen = pDraw->pScreen;
__GLXcontext *cx = lastGLContext;
+ pScreen->SourceValidate(pDraw, x, y, w, h, IncludeInferiors);
pScreen->GetImage(pDraw, x, y, w, h, ZPixmap, ~0L, data);
if (cx != lastGLContext) {
lastGLContext = cx;