update to x11perf 1.7.0
This commit is contained in:
parent
05823bf282
commit
4b69692ae6
22 changed files with 7440 additions and 5807 deletions
|
@ -23,6 +23,7 @@ SOFTWARE.
|
|||
|
||||
#include "x11perf.h"
|
||||
#include <stdio.h>
|
||||
#include "bitmaps.h"
|
||||
|
||||
static char **charBuf;
|
||||
static XFontStruct *font, *bfont;
|
||||
|
@ -65,6 +66,8 @@ InitText(XParms xp, Parms p, int64_t reps)
|
|||
XChangeGC(xp->d, xp->fggc, GCFont, &gcv);
|
||||
XChangeGC(xp->d, xp->bggc, GCFont, &gcv);
|
||||
|
||||
SetFillStyle(xp, p);
|
||||
|
||||
charsPerLine = p->objects;
|
||||
charsPerLine = (charsPerLine + 3) & ~3;
|
||||
p->objects = charsPerLine;
|
||||
|
@ -406,8 +409,21 @@ InitAAText(XParms xp, Parms p, int64_t reps)
|
|||
{
|
||||
char ch;
|
||||
XRenderColor color;
|
||||
FcValue value;
|
||||
int v_len;
|
||||
FcPattern *pat;
|
||||
FcPattern *match;
|
||||
FcResult result;
|
||||
|
||||
aafont = XftFontOpenName (xp->d, DefaultScreen (xp->d), p->font);
|
||||
pat = FcNameParse((FcChar8 *) p->font);
|
||||
match = XftFontMatch(xp->d, DefaultScreen(xp->d), pat, &result);
|
||||
FcPatternDestroy(pat);
|
||||
if (p->bfont) {
|
||||
FcPatternDel(match, XFT_RENDER);
|
||||
FcPatternAddBool(match, XFT_RENDER, False);
|
||||
}
|
||||
|
||||
aafont = XftFontOpenPattern (xp->d, match);
|
||||
|
||||
if (aafont == NULL)
|
||||
{
|
||||
|
@ -415,6 +431,22 @@ InitAAText(XParms xp, Parms p, int64_t reps)
|
|||
p->font);
|
||||
return 0;
|
||||
}
|
||||
if (FcPatternGet(aafont->pattern, FC_FAMILY, 0, &value) != FcResultMatch ||
|
||||
value.type != FcTypeString)
|
||||
{
|
||||
printf("Could not load font '%s', benchmark omitted\n",
|
||||
p->font);
|
||||
XftFontClose (xp->d, aafont);
|
||||
return 0;
|
||||
}
|
||||
v_len = strlen((char *) value.u.s);
|
||||
if (strncmp((char *) value.u.s, p->font, v_len) != 0 || p->font[v_len] != ':') {
|
||||
printf("Could not load font '%s' (found %s), benchmark omitted\n",
|
||||
p->font,
|
||||
(char *) value.u.s);
|
||||
XftFontClose (xp->d, aafont);
|
||||
return 0;
|
||||
}
|
||||
|
||||
aadraw = XftDrawCreate (xp->d, xp->w,
|
||||
xp->vinfo.visual,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue