kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=4c8af1fda8adc5aeec1f6a81e8e48333e84c30c1

commit 4c8af1fda8adc5aeec1f6a81e8e48333e84c30c1
Author: Kim Woelders <k...@woelders.dk>
Date:   Thu Jun 18 17:33:18 2015 +0200

    Require render version 0.11 before using XRenderCreateSolidFill().
    
    Apparently use of XRenderCreateSolidFill() may trigger high Xorg cpu
    usage (seen on Xorg 1.7.7 with render 0.10, driver unknown).
    Exact reason unknown, maybe a driver problem.
    
    Requiring render version >= 0.11 may just be a random way to avoid
    some brokenness in older Xorgs.
---
 src/x.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/x.c b/src/x.c
index 9e80bad..b13e98c 100644
--- a/src/x.c
+++ b/src/x.c
@@ -2103,8 +2103,11 @@ EPictureCreateSolid(EX_Window xwin, int argb, unsigned 
int a, unsigned int rgb)
    c.green = (unsigned short)(_G(rgb) * 0x101);
    c.blue = (unsigned short)(_B(rgb) * 0x101);
 
-#if RENDER_VERSION >= VERS(0, 10)
-   if (ExtVersion(XEXT_RENDER) >= VERS(0, 10))
+#if RENDER_VERSION >= VERS(0, 11)
+   /* Version 0.10 should be good but apparently sometimes isn't
+    * (or is it some broken driver?).
+    * Anyway, let's require 0.11 and avoid some trouble. */
+   if (ExtVersion(XEXT_RENDER) >= VERS(0, 11))
      {
        pict = XRenderCreateSolidFill(dpy, &c);
      }

-- 


Reply via email to