aboutsummaryrefslogtreecommitdiff
path: root/libXft/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-10-25 19:53:22 +0200
committermarha <marha@users.sourceforge.net>2014-10-25 19:53:22 +0200
commitd6d5581d5fba846c8476ad4d593da662306765d7 (patch)
tree7a864e15d2c5007b7c3298487a59f11f15c55c75 /libXft/src
parenta14858a22f164b5accc4bd192a5d3de21d88e3d1 (diff)
downloadvcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.tar.gz
vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.tar.bz2
vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.zip
libXft mesa xserver pixman xkeyboard-config git update 25 Oct 2014
xserver commit 16a32c53f6e9ad1f3284d4596edfa33e9efb740e xkeyboard-config commit 0d4c3d9d891536aa1ec4f1fff5e3df51cfd2718d pixman commit 594e6a6c93e92fcfb495e987aec5617f6c37f467 libXft commit e8a83226bc10afb587f6f34daac44d2ef809c85e mesa commit 13862812dc910a4ef57cb72cb9fe777ce3c14515
Diffstat (limited to 'libXft/src')
-rw-r--r--libXft/src/xftdpy.c4
-rw-r--r--libXft/src/xftdraw.c71
-rw-r--r--libXft/src/xftint.h1
3 files changed, 47 insertions, 29 deletions
diff --git a/libXft/src/xftdpy.c b/libXft/src/xftdpy.c
index c5b756e25..62b1ccfaf 100644
--- a/libXft/src/xftdpy.c
+++ b/libXft/src/xftdpy.c
@@ -106,6 +106,10 @@ _XftDisplayInfoGet (Display *dpy, FcBool createIfNecessary)
if (major < 0 || (major == 0 && minor <= 2))
info->use_free_glyphs = FcFalse;
+ info->hasSolid = FcFalse;
+ if (major > 0 || (major == 0 && minor >= 10))
+ info->hasSolid = FcTrue;
+
pf.type = PictTypeDirect;
pf.depth = 32;
pf.direct.redMask = 0xff;
diff --git a/libXft/src/xftdraw.c b/libXft/src/xftdraw.c
index 186bcb876..dfa97fbfc 100644
--- a/libXft/src/xftdraw.c
+++ b/libXft/src/xftdraw.c
@@ -333,39 +333,52 @@ XftDrawSrcPicture (XftDraw *draw, _Xconst XftColor *color)
* Pick one to replace at random
*/
i = (unsigned int) rand () % XFT_NUM_SOLID_COLOR;
- /*
- * Recreate if it was for the wrong screen
- */
- if (info->colors[i].screen != draw->screen && info->colors[i].pict)
- {
- XRenderFreePicture (dpy, info->colors[i].pict);
- info->colors[i].pict = 0;
- }
- /*
- * Create picture if necessary
- */
- if (!info->colors[i].pict)
- {
- Pixmap pix;
- XRenderPictureAttributes pa;
- pix = XCreatePixmap (dpy, RootWindow (dpy, draw->screen), 1, 1,
- info->solidFormat->depth);
- pa.repeat = True;
- info->colors[i].pict = XRenderCreatePicture (draw->dpy,
- pix,
- info->solidFormat,
- CPRepeat, &pa);
- XFreePixmap (dpy, pix);
+ if (info->hasSolid) {
+ /*
+ * Free any existing entry
+ */
+ if (info->colors[i].pict)
+ XRenderFreePicture (dpy, info->colors[i].pict);
+ /*
+ * Create picture
+ */
+ info->colors[i].pict = XRenderCreateSolidFill (draw->dpy, &color->color);
+ } else {
+ if (info->colors[i].screen != draw->screen && info->colors[i].pict)
+ {
+ XRenderFreePicture (dpy, info->colors[i].pict);
+ info->colors[i].pict = 0;
+ }
+ /*
+ * Create picture if necessary
+ */
+ if (!info->colors[i].pict)
+ {
+ Pixmap pix;
+ XRenderPictureAttributes pa;
+
+ pix = XCreatePixmap (dpy, RootWindow (dpy, draw->screen), 1, 1,
+ info->solidFormat->depth);
+ pa.repeat = True;
+ info->colors[i].pict = XRenderCreatePicture (draw->dpy,
+ pix,
+ info->solidFormat,
+ CPRepeat, &pa);
+ XFreePixmap (dpy, pix);
+ }
+ /*
+ * Set to the new color
+ */
+ info->colors[i].color = color->color;
+ info->colors[i].screen = draw->screen;
+ XRenderFillRectangle (dpy, PictOpSrc,
+ info->colors[i].pict,
+ &color->color, 0, 0, 1, 1);
}
- /*
- * Set to the new color
- */
info->colors[i].color = color->color;
info->colors[i].screen = draw->screen;
- XRenderFillRectangle (dpy, PictOpSrc,
- info->colors[i].pict,
- &color->color, 0, 0, 1, 1);
+
return info->colors[i].pict;
}
diff --git a/libXft/src/xftint.h b/libXft/src/xftint.h
index 165897767..c06ac3cba 100644
--- a/libXft/src/xftint.h
+++ b/libXft/src/xftint.h
@@ -245,6 +245,7 @@ typedef struct _XftDisplayInfo {
XExtCodes *codes;
FcPattern *defaults;
FcBool hasRender;
+ FcBool hasSolid;
XftFont *fonts;
XRenderPictFormat *solidFormat;
unsigned long glyph_memory;