FreeRDP
glyph.c File Reference
#include <stdio.h>
#include <winpr/crt.h>
#include <freerdp/freerdp.h>
#include <winpr/stream.h>
#include <freerdp/log.h>
#include <freerdp/cache/glyph.h>
#include "glyph.h"

Macros

#define TAG   FREERDP_TAG("cache.glyph")
 

Functions

static rdpGlyph * glyph_cache_get (rdpGlyphCache *glyph_cache, UINT32 id, UINT32 index)
 
static BOOL glyph_cache_put (rdpGlyphCache *glyph_cache, UINT32 id, UINT32 index, rdpGlyph *entry)
 
static const voidglyph_cache_fragment_get (rdpGlyphCache *glyph, UINT32 index, UINT32 *count)
 
static BOOL glyph_cache_fragment_put (rdpGlyphCache *glyph, UINT32 index, UINT32 count, const void *entry)
 
static UINT32 update_glyph_offset (const BYTE *data, UINT32 index, INT32 *x, INT32 *y, UINT32 ulCharInc, UINT32 flAccel)
 
static BOOL update_process_glyph (rdpContext *context, const BYTE *data, UINT32 cacheIndex, INT32 *x, INT32 *y, UINT32 cacheId, UINT32 flAccel, BOOL fOpRedundant, const RDP_RECT *bound)
 
static BOOL update_process_glyph_fragments (rdpContext *context, const BYTE *data, UINT32 length, UINT32 cacheId, UINT32 ulCharInc, UINT32 flAccel, UINT32 bgcolor, UINT32 fgcolor, INT32 x, INT32 y, INT32 bkX, INT32 bkY, INT32 bkWidth, INT32 bkHeight, INT32 opX, INT32 opY, INT32 opWidth, INT32 opHeight, BOOL fOpRedundant)
 
static BOOL update_gdi_glyph_index (rdpContext *context, GLYPH_INDEX_ORDER *glyphIndex)
 
static BOOL update_gdi_fast_index (rdpContext *context, const FAST_INDEX_ORDER *fastIndex)
 
static BOOL update_gdi_fast_glyph (rdpContext *context, const FAST_GLYPH_ORDER *fastGlyph)
 
static BOOL update_gdi_cache_glyph (rdpContext *context, const CACHE_GLYPH_ORDER *cacheGlyph)
 
static BOOL update_gdi_cache_glyph_v2 (rdpContext *context, const CACHE_GLYPH_V2_ORDER *cacheGlyphV2)
 
void glyph_cache_register_callbacks (rdpUpdate *update)
 
rdpGlyphCache * glyph_cache_new (rdpSettings *settings)
 
void glyph_cache_free (rdpGlyphCache *glyphCache)
 
CACHE_GLYPH_ORDER * copy_cache_glyph_order (rdpContext *context, const CACHE_GLYPH_ORDER *glyph)
 
void free_cache_glyph_order (rdpContext *context, CACHE_GLYPH_ORDER *glyph)
 
CACHE_GLYPH_V2_ORDER * copy_cache_glyph_v2_order (rdpContext *context, const CACHE_GLYPH_V2_ORDER *glyph)
 
void free_cache_glyph_v2_order (rdpContext *context, CACHE_GLYPH_V2_ORDER *glyph)
 

Macro Definition Documentation

#define TAG   FREERDP_TAG("cache.glyph")

FreeRDP: A Remote Desktop Protocol Implementation Glyph Cache

Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

CACHE_GLYPH_ORDER* copy_cache_glyph_order ( rdpContext *  context,
const CACHE_GLYPH_ORDER *  glyph 
)

FreeRDP: A Remote Desktop Protocol Implementation

Copyright 2018 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2018 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the call graph for this function:

Here is the caller graph for this function:

CACHE_GLYPH_V2_ORDER* copy_cache_glyph_v2_order ( rdpContext *  context,
const CACHE_GLYPH_V2_ORDER *  glyph 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void free_cache_glyph_order ( rdpContext *  context,
CACHE_GLYPH_ORDER *  glyph 
)

Here is the caller graph for this function:

void free_cache_glyph_v2_order ( rdpContext *  context,
CACHE_GLYPH_V2_ORDER *  glyph 
)

Here is the caller graph for this function:

const void * glyph_cache_fragment_get ( rdpGlyphCache *  glyph,
UINT32  index,
UINT32 count 
)
static

Here is the caller graph for this function:

BOOL glyph_cache_fragment_put ( rdpGlyphCache *  glyph,
UINT32  index,
UINT32  count,
const void entry 
)
static

Here is the caller graph for this function:

void glyph_cache_free ( rdpGlyphCache *  glyphCache)

Here is the caller graph for this function:

rdpGlyph * glyph_cache_get ( rdpGlyphCache *  glyph_cache,
UINT32  id,
UINT32  index 
)
static

Here is the caller graph for this function:

rdpGlyphCache* glyph_cache_new ( rdpSettings *  settings)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL glyph_cache_put ( rdpGlyphCache *  glyph_cache,
UINT32  id,
UINT32  index,
rdpGlyph *  entry 
)
static

Here is the caller graph for this function:

void glyph_cache_register_callbacks ( rdpUpdate *  update)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL update_gdi_cache_glyph ( rdpContext *  context,
const CACHE_GLYPH_ORDER *  cacheGlyph 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL update_gdi_cache_glyph_v2 ( rdpContext *  context,
const CACHE_GLYPH_V2_ORDER *  cacheGlyphV2 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL update_gdi_fast_glyph ( rdpContext *  context,
const FAST_GLYPH_ORDER *  fastGlyph 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL update_gdi_fast_index ( rdpContext *  context,
const FAST_INDEX_ORDER *  fastIndex 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL update_gdi_glyph_index ( rdpContext *  context,
GLYPH_INDEX_ORDER *  glyphIndex 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static UINT32 update_glyph_offset ( const BYTE data,
UINT32  index,
INT32 *  x,
INT32 *  y,
UINT32  ulCharInc,
UINT32  flAccel 
)
static

Here is the caller graph for this function:

static BOOL update_process_glyph ( rdpContext *  context,
const BYTE data,
UINT32  cacheIndex,
INT32 *  x,
INT32 *  y,
UINT32  cacheId,
UINT32  flAccel,
BOOL  fOpRedundant,
const RDP_RECT *  bound 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL update_process_glyph_fragments ( rdpContext *  context,
const BYTE data,
UINT32  length,
UINT32  cacheId,
UINT32  ulCharInc,
UINT32  flAccel,
UINT32  bgcolor,
UINT32  fgcolor,
INT32  x,
INT32  y,
INT32  bkX,
INT32  bkY,
INT32  bkWidth,
INT32  bkHeight,
INT32  opX,
INT32  opY,
INT32  opWidth,
INT32  opHeight,
BOOL  fOpRedundant 
)
static

Some Microsoft servers send erroneous high values close to the sint16 maximum in the OpRight field of the GlyphIndex, FastIndex and FastGlyph drawing orders, probably a result of applications trying to clear the text line to the very right end. One example where this can be seen is typing in notepad.exe within a RDP session to Windows XP Professional SP3. This workaround prevents resulting problems in the UI callbacks.

Some Microsoft servers send erroneous high values close to the sint16 maximum in the OpRight field of the GlyphIndex, FastIndex and FastGlyph drawing orders, probably a result of applications trying to clear the text line to the very right end. One example where this can be seen is typing in notepad.exe within a RDP session to Windows XP Professional SP3. This workaround prevents resulting problems in the UI callbacks.

Here is the call graph for this function:

Here is the caller graph for this function: