Merge pull request #216 from jsorg71/master
glyph index working with --gdi sw and --glyph-cache
This commit is contained in:
commit
1e8ec21221
@ -308,7 +308,7 @@ struct _GLYPH_INDEX_ORDER
|
||||
sint32 x;
|
||||
sint32 y;
|
||||
uint32 cbData;
|
||||
uint8* data;
|
||||
uint8 data[256];
|
||||
};
|
||||
typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER;
|
||||
|
||||
|
@ -168,7 +168,16 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
|
||||
|
||||
void update_gdi_glyph_index(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index)
|
||||
{
|
||||
rdpGlyphCache* glyph_cache;
|
||||
|
||||
glyph_cache = context->cache->glyph;
|
||||
update_process_glyph_fragments(context, glyph_index->data, glyph_index->cbData,
|
||||
glyph_index->cacheId, glyph_index->ulCharInc, glyph_index->flAccel,
|
||||
glyph_index->backColor, glyph_index->foreColor, glyph_index->x, glyph_index->y,
|
||||
glyph_index->bkLeft, glyph_index->bkTop,
|
||||
glyph_index->bkRight - glyph_index->bkLeft, glyph_index->bkBottom - glyph_index->bkTop,
|
||||
glyph_index->opLeft, glyph_index->opTop,
|
||||
glyph_index->opRight - glyph_index->opLeft, glyph_index->opBottom - glyph_index->opTop);
|
||||
}
|
||||
|
||||
void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index)
|
||||
@ -265,7 +274,8 @@ void glyph_cache_put(rdpGlyphCache* glyph_cache, uint32 id, uint32 index, rdpGly
|
||||
if (prevGlyph != NULL)
|
||||
{
|
||||
xfree(prevGlyph->aj);
|
||||
Glyph_Free(glyph_cache->context, prevGlyph);
|
||||
/* hack jsorg71 */
|
||||
//Glyph_Free(glyph_cache->context, prevGlyph);
|
||||
xfree(prevGlyph);
|
||||
}
|
||||
|
||||
|
@ -330,6 +330,11 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
|
||||
stream_write_uint16(s, 1); /* maximumOrderLevel (2 bytes) */
|
||||
stream_write_uint16(s, 0); /* numberFonts (2 bytes) */
|
||||
stream_write_uint16(s, orderFlags); /* orderFlags (2 bytes) */
|
||||
|
||||
/* hack jsorg71 */
|
||||
settings->order_support[NEG_FAST_INDEX_INDEX] = 0;
|
||||
settings->order_support[NEG_FAST_GLYPH_INDEX] = 0;
|
||||
|
||||
stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */
|
||||
stream_write_uint16(s, 0); /* textFlags (2 bytes) */
|
||||
stream_write_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */
|
||||
|
@ -136,16 +136,18 @@ uint8 BMF_BPP[] =
|
||||
|
||||
INLINE void update_read_coord(STREAM* s, sint32* coord, boolean delta)
|
||||
{
|
||||
sint8 byte;
|
||||
sint8 lsi8;
|
||||
sint16 lsi16;
|
||||
|
||||
if (delta)
|
||||
{
|
||||
stream_read_uint8(s, byte);
|
||||
*coord += byte;
|
||||
stream_read_uint8(s, lsi8);
|
||||
*coord += lsi8;
|
||||
}
|
||||
else
|
||||
{
|
||||
stream_read_uint16(s, *coord);
|
||||
stream_read_uint16(s, lsi16);
|
||||
*coord = lsi16;
|
||||
}
|
||||
}
|
||||
|
||||
@ -927,7 +929,7 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX
|
||||
if (orderInfo->fieldFlags & ORDER_FIELD_22)
|
||||
{
|
||||
stream_read_uint8(s, glyph_index->cbData);
|
||||
stream_get_mark(s, glyph_index->data);
|
||||
memcpy(glyph_index->data, s->p, glyph_index->cbData);
|
||||
stream_seek(s, glyph_index->cbData);
|
||||
}
|
||||
}
|
||||
@ -1325,6 +1327,7 @@ void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac
|
||||
void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, uint16 flags)
|
||||
{
|
||||
int i;
|
||||
sint16 lsi16;
|
||||
GLYPH_DATA* glyph;
|
||||
|
||||
stream_read_uint8(s, cache_glyph_order->cacheId); /* cacheId (1 byte) */
|
||||
@ -1336,8 +1339,10 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord
|
||||
cache_glyph_order->glyphData[i] = glyph;
|
||||
|
||||
stream_read_uint16(s, glyph->cacheIndex);
|
||||
stream_read_uint16(s, glyph->x);
|
||||
stream_read_uint16(s, glyph->y);
|
||||
stream_read_uint16(s, lsi16);
|
||||
glyph->x = lsi16;
|
||||
stream_read_uint16(s, lsi16);
|
||||
glyph->y = lsi16;
|
||||
stream_read_uint16(s, glyph->cx);
|
||||
stream_read_uint16(s, glyph->cy);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user