libfreerdp-core: fix glyph cache, enable it by default

This commit is contained in:
Marc-André Moreau 2011-12-14 17:08:22 -05:00
parent 0ed4709167
commit 2edfcb50fb
4 changed files with 4 additions and 11 deletions

View File

@ -238,8 +238,6 @@ void xf_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y)
xf_glyph = (xfGlyph*) glyph;
printf("Glyph_Draw: x:%d y:%d w:%d h:%d\n", x, y, glyph->cx, glyph->cy);
XSetStipple(xfi->display, xfi->gc, xf_glyph->pixmap);
XSetTSOrigin(xfi->display, xfi->gc, x, y);
XFillRectangle(xfi->display, xfi->drawing, xfi->gc, x, y, glyph->cx, glyph->cy);

View File

@ -92,8 +92,6 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
{
case GLYPH_FRAGMENT_USE:
printf("GLYPH_FRAGMENT_USE\n");
if (index + 2 > (int) length)
{
/* at least one byte need to follow */
@ -129,8 +127,6 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
case GLYPH_FRAGMENT_ADD:
printf("GLYPH_FRAGMENT_ADD\n");
if (index + 3 > (int) length)
{
/* at least two bytes need to follow */
@ -153,15 +149,13 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
break;
default:
printf("GLYPH_FRAGMENT_NOP\n");
update_process_glyph(context, data, &index, &x, &y, cacheId, ulCharInc, flAccel);
index++;
break;
}
}
if (opWidth > 1)
if (opWidth > 0 && opHeight > 0)
Glyph_EndDraw(context, opX, opY, opWidth, opHeight, bgcolor, fgcolor);
else
Glyph_EndDraw(context, bkX, bkY, bkWidth, bkHeight, bgcolor, fgcolor);

View File

@ -109,6 +109,7 @@ rdpSettings* settings_new(void* instance)
settings->refresh_rect = true;
settings->suppress_output = true;
settings->glyph_cache = true;
settings->glyphSupportLevel = GLYPH_SUPPORT_NONE;
settings->glyphCache[0].cacheEntries = 254;
settings->glyphCache[0].cacheMaximumCellSize = 4;

View File

@ -280,9 +280,9 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
if (settings->ntlm_version != 2)
settings->ntlm_version = 1;
}
else if (strcmp("--glyph-cache", argv[index]) == 0)
else if (strcmp("--no-glyph-cache", argv[index]) == 0)
{
settings->glyph_cache = true;
settings->glyph_cache = false;
}
else if (strcmp("--no-osb", argv[index]) == 0)
{