mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: fix glyph cache, enable it by default
This commit is contained in:
parent
0ed4709167
commit
2edfcb50fb
|
@ -238,8 +238,6 @@ void xf_Glyph_Draw(rdpContext* context, rdpGlyph* glyph, int x, int y)
|
||||||
|
|
||||||
xf_glyph = (xfGlyph*) glyph;
|
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);
|
XSetStipple(xfi->display, xfi->gc, xf_glyph->pixmap);
|
||||||
XSetTSOrigin(xfi->display, xfi->gc, x, y);
|
XSetTSOrigin(xfi->display, xfi->gc, x, y);
|
||||||
XFillRectangle(xfi->display, xfi->drawing, xfi->gc, x, y, glyph->cx, glyph->cy);
|
XFillRectangle(xfi->display, xfi->drawing, xfi->gc, x, y, glyph->cx, glyph->cy);
|
||||||
|
|
|
@ -92,8 +92,6 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
|
||||||
{
|
{
|
||||||
case GLYPH_FRAGMENT_USE:
|
case GLYPH_FRAGMENT_USE:
|
||||||
|
|
||||||
printf("GLYPH_FRAGMENT_USE\n");
|
|
||||||
|
|
||||||
if (index + 2 > (int) length)
|
if (index + 2 > (int) length)
|
||||||
{
|
{
|
||||||
/* at least one byte need to follow */
|
/* 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:
|
case GLYPH_FRAGMENT_ADD:
|
||||||
|
|
||||||
printf("GLYPH_FRAGMENT_ADD\n");
|
|
||||||
|
|
||||||
if (index + 3 > (int) length)
|
if (index + 3 > (int) length)
|
||||||
{
|
{
|
||||||
/* at least two bytes need to follow */
|
/* at least two bytes need to follow */
|
||||||
|
@ -153,15 +149,13 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("GLYPH_FRAGMENT_NOP\n");
|
|
||||||
|
|
||||||
update_process_glyph(context, data, &index, &x, &y, cacheId, ulCharInc, flAccel);
|
update_process_glyph(context, data, &index, &x, &y, cacheId, ulCharInc, flAccel);
|
||||||
index++;
|
index++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opWidth > 1)
|
if (opWidth > 0 && opHeight > 0)
|
||||||
Glyph_EndDraw(context, opX, opY, opWidth, opHeight, bgcolor, fgcolor);
|
Glyph_EndDraw(context, opX, opY, opWidth, opHeight, bgcolor, fgcolor);
|
||||||
else
|
else
|
||||||
Glyph_EndDraw(context, bkX, bkY, bkWidth, bkHeight, bgcolor, fgcolor);
|
Glyph_EndDraw(context, bkX, bkY, bkWidth, bkHeight, bgcolor, fgcolor);
|
||||||
|
|
|
@ -109,6 +109,7 @@ rdpSettings* settings_new(void* instance)
|
||||||
settings->refresh_rect = true;
|
settings->refresh_rect = true;
|
||||||
settings->suppress_output = true;
|
settings->suppress_output = true;
|
||||||
|
|
||||||
|
settings->glyph_cache = true;
|
||||||
settings->glyphSupportLevel = GLYPH_SUPPORT_NONE;
|
settings->glyphSupportLevel = GLYPH_SUPPORT_NONE;
|
||||||
settings->glyphCache[0].cacheEntries = 254;
|
settings->glyphCache[0].cacheEntries = 254;
|
||||||
settings->glyphCache[0].cacheMaximumCellSize = 4;
|
settings->glyphCache[0].cacheMaximumCellSize = 4;
|
||||||
|
|
|
@ -280,9 +280,9 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||||
if (settings->ntlm_version != 2)
|
if (settings->ntlm_version != 2)
|
||||||
settings->ntlm_version = 1;
|
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)
|
else if (strcmp("--no-osb", argv[index]) == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue