[meego-commits] 15360: Changes to Trunk/xorg-x11-server

Peter Zhu no_reply at build.meego.com
Tue Mar 29 02:50:11 UTC 2011


Hi,
I have made the following changes to xorg-x11-server in project Trunk. Please review and accept ASAP.

Thank You,
Peter Zhu

[This message was auto-generated]

---

Request #15360:

  submit:   Trunk:Testing/xorg-x11-server(r3) -> Trunk/xorg-x11-server


Message:
    Move to Trunk

State:   new          2011-03-28T19:50:06 peter
Comment: None



changes files:
--------------
--- xorg-x11-server.changes
+++ xorg-x11-server.changes
@@ -0,0 +1,8 @@
+* Mon Mar 28 2011 Li Peng <peng.li at intel.com> - 1.9.0
+- Fix the error in patch porting 
+  Suppress-exposures-and-implicit-painting-for-some-re.patch
+  (BMC #14890)
+
+* Thu Mar 24 2011 Li Peng <peng.li at intel.com> - 1.9.0
+- Fix the flickering issue when mcompositor flips the compsiting on and off
+

new:
----
  Suppress-exposures-and-implicit-painting-for-some-re.patch

spec files:
-----------
--- xorg-x11-server.spec
+++ xorg-x11-server.spec
@@ -33,6 +33,7 @@
 Patch13:     bg-none-root-2.patch
 Patch14:     Replace-malloc-with-calloc-to-initialize-the-buffers.patch
 Patch15:     GetTimeInMillis-Use-CLOCK_MONOTONIC_COARSE.patch
+Patch16:     Suppress-exposures-and-implicit-painting-for-some-re.patch
 Requires:   libdrm >= 2.4.0
 BuildRequires:  pkgconfig(xorg-macros)
 BuildRequires:  pkgconfig(scrnsaverproto)
@@ -201,6 +202,8 @@
 %patch14 -p1
 # GetTimeInMillis-Use-CLOCK_MONOTONIC_COARSE.patch
 %patch15 -p1
+# Suppress-exposures-and-implicit-painting-for-some-re.patch
+%patch16 -p1
 # >> setup
 # << setup
 

other changes:
--------------

++++++ Suppress-exposures-and-implicit-painting-for-some-re.patch (new)
--- Suppress-exposures-and-implicit-painting-for-some-re.patch
+++ Suppress-exposures-and-implicit-painting-for-some-re.patch
+From d7e4c32a152c12bf91a3c81f260ab86374c7c6c5 Mon Sep 17 00:00:00 2001
+From: Li Peng <peng.li at intel.com>
+Date: Mon, 28 Mar 2011 16:48:19 +0800
+Subject: [PATCH] Suppress exposures and implicit painting for some requests
+
+This is hand-crafted to avoid flickering when mcompositor flips the
+compsiting on and off.
+
+From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh at bitplanet.net>
+Port to xserver 1.9.0 by Li Peng <peng.li at intel.com>
+
+Signed-off-by: Li Peng <peng.li at intel.com>
+---
+ Xext/shape.c        |   12 +++++++++---
+ composite/compext.c |    7 ++++++-
+ dix/window.c        |   20 ++++++++++++++++++++
+ include/window.h    |    4 ++++
+ mi/miexpose.c       |   15 ++++++++++-----
+ 5 files changed, 49 insertions(+), 9 deletions(-)
+
+diff --git a/Xext/shape.c b/Xext/shape.c
+index ac95328..a86f201 100644
+--- a/Xext/shape.c
++++ b/Xext/shape.c
+@@ -337,9 +337,15 @@ ProcShapeRectangles (ClientPtr client)
+ 	return BadValue;
+     }
+ 
+-    return RegionOperate (client, pWin, (int)stuff->destKind,
+-			  destRgn, srcRgn, (int)stuff->op,
+-			  stuff->xOff, stuff->yOff, createDefault);
++    PushSuppressExposure();
++
++    rc = RegionOperate (client, pWin, (int)stuff->destKind,
++	    		destRgn, srcRgn, (int)stuff->op,
++			stuff->xOff, stuff->yOff, createDefault);
++
++    PopSuppressExposure();
++
++    return rc;
+ }
+ 
+ #ifdef PANORAMIX
+diff --git a/composite/compext.c b/composite/compext.c
+index 30d9dc2..3819844 100644
+--- a/composite/compext.c
++++ b/composite/compext.c
+@@ -151,12 +151,17 @@ ProcCompositeRedirectWindow (ClientPtr client)
+ {
+     WindowPtr	pWin;
+     REQUEST(xCompositeRedirectWindowReq);
++    int rc;
+ 
+     REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
+     VERIFY_WINDOW(pWin, stuff->window, client,
+ 		  DixSetAttrAccess|DixManageAccess|DixBlendAccess);
+ 
+-    return compRedirectWindow (client, pWin, stuff->update);
++    PushSuppressExposure();
++    rc = compRedirectWindow (client, pWin, stuff->update);
++    PopSuppressExposure();
++
++    return rc;
+ }
+ 
+ static int
+diff --git a/dix/window.c b/dix/window.c
+index 1913030..403c149 100644
+--- a/dix/window.c
++++ b/dix/window.c
+@@ -3674,6 +3674,26 @@ WindowParentHasDeviceCursor(WindowPtr pWin,
+     return FALSE;
+ }
+ 
++static int suppress_count;
++
++Bool
++SuppressExposures(void)
++{
++    return suppress_count > 0;
++}
++
++void
++PushSuppressExposure(void)
++{
++    suppress_count++;
++}
++
++void
++PopSuppressExposure(void)
++{
++    suppress_count--;
++}
++
+ #ifndef NOLOGOHACK
+ static void
+ DrawLogo(WindowPtr pWin)
+diff --git a/include/window.h b/include/window.h
+index 6fb2f8c..04ca025 100644
+--- a/include/window.h
++++ b/include/window.h
+@@ -266,4 +266,8 @@ extern _X_EXPORT void DisableMapUnmapEvents(
+ extern _X_EXPORT void EnableMapUnmapEvents(
+     WindowPtr /* pWin */ );
+ 
++extern _X_EXPORT Bool SuppressExposures(void);
++extern _X_EXPORT void PushSuppressExposure(void);
++extern _X_EXPORT void PopSuppressExposure(void);
++
+ #endif /* WINDOW_H */
+diff --git a/mi/miexpose.c b/mi/miexpose.c
+index 94258b8..35c14b9 100644
+--- a/mi/miexpose.c
++++ b/mi/miexpose.c
+@@ -497,15 +497,20 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
+ 	    /* miPaintWindow doesn't clip, so we have to */
+ 	    RegionIntersect(prgn, prgn, &pWin->clipList);
+ 	}
+-	if (prgn && !RegionNil(prgn))
+-	    miPaintWindow(pWin, prgn, PW_BACKGROUND);
+-	if (clientInterested && exposures && !RegionNil(exposures))
+-	    miSendExposures(pWin, exposures,
+-			    pWin->drawable.x, pWin->drawable.y);
++
++	if (!SuppressExposures()) {
++	    if (prgn && !RegionNil(prgn))
++		miPaintWindow(pWin, prgn, PW_BACKGROUND);
++	    if (clientInterested && exposures && !RegionNil(exposures))
++		miSendExposures(pWin, exposures,
++				pWin->drawable.x, pWin->drawable.y);
++	}
++
+ 	if (exposures == &expRec)
+ 	{
+ 	    RegionUninit(exposures);
+ 	}
++
+ 	else if (exposures && exposures != prgn && exposures != other_exposed)
+ 	    RegionDestroy(exposures);
+ 	if (prgn)
+-- 
+1.7.2.2
+

++++++ xorg-x11-server.yaml
--- xorg-x11-server.yaml
+++ xorg-x11-server.yaml
@@ -24,6 +24,7 @@
     - bg-none-root-2.patch
     - Replace-malloc-with-calloc-to-initialize-the-buffers.patch
     - GetTimeInMillis-Use-CLOCK_MONOTONIC_COARSE.patch
+    - Suppress-exposures-and-implicit-painting-for-some-re.patch
 
 Requires:
     - libdrm >= 2.4.0




More information about the MeeGo-commits mailing list