xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Apr 26 09:15:48 PDT 2010


 exa/exa_unaccel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b557571dbff3d9a615e03cad904d46b8af9153a0
Author: Jerome Glisse <jglisse at redhat.com>
Date:   Mon Apr 26 16:01:48 2010 +0200

    exa: avoid calling non existent SourceValidate callback
    
    In unaccel path we were unconditionaly calling the SourceValidate
    callback but in some case it could be NULL. Check if we have a
    valid callback before calling it.
    
    Signed-off-by: Jerome Glisse <jglisse at redhat.com>
    Acked-by: Michel Dänzer <michel at daenzer.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index db9ce9f..8fc9317 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -462,9 +462,11 @@ ExaSrcValidate(DrawablePtr pDrawable,
     REGION_UNION(pScreen, dst, dst, &reg);
     REGION_UNINIT(pScreen, &reg);
 
-    swap(pExaScr, pScreen, SourceValidate);
-    pScreen->SourceValidate(pDrawable, x, y, width, height);
-    swap(pExaScr, pScreen, SourceValidate);
+    if (pExaScr->SourceValidate) {
+        swap(pExaScr, pScreen, SourceValidate);
+        pScreen->SourceValidate(pDrawable, x, y, width, height);
+        swap(pExaScr, pScreen, SourceValidate);
+    }
 }
 
 static Bool
commit 0e6e75b04eaca311962390533acc03d0ac5ece83
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Apr 26 09:14:22 2010 -0700

    Revert "exa: avoid calling non existent SourceValidate callback"
    
    This reverts commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad.
    
    This one checked pScreen->SourceValidate instead of
    pExaScr->SourceValidate which would cause a segfault when
    pExaScr->SourceValidate was NULL.

diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index 8159f2f..db9ce9f 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -462,11 +462,9 @@ ExaSrcValidate(DrawablePtr pDrawable,
     REGION_UNION(pScreen, dst, dst, &reg);
     REGION_UNINIT(pScreen, &reg);
 
-    if (pScreen->SourceValidate) {
-        swap(pExaScr, pScreen, SourceValidate);
-        pScreen->SourceValidate(pDrawable, x, y, width, height);
-        swap(pExaScr, pScreen, SourceValidate);
-    }
+    swap(pExaScr, pScreen, SourceValidate);
+    pScreen->SourceValidate(pDrawable, x, y, width, height);
+    swap(pExaScr, pScreen, SourceValidate);
 }
 
 static Bool


More information about the xorg-commit mailing list