fragments = (BYTE*) malloc(size);
CopyMemory(fragments, data, size);
+
glyph_cache_fragment_put(glyph_cache, id, size, fragments);
index += 3;
{
rdpGlyph* glyph;
- WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCacheGet: id: %d index: %d", id, index);
+ WLog_DBG(TAG, "GlyphCacheGet: id: %d index: %d", id, index);
if (id > 9)
{
- WLog_ERR(TAG, "invalid glyph cache id: %d", id);
+ WLog_ERR(TAG, "invalid glyph cache id: %d", id);
return NULL;
}
if (index > glyphCache->glyphCache[id].number)
{
- WLog_ERR(TAG, "index %d out of range for cache id: %d", index, id);
+ WLog_ERR(TAG, "index %d out of range for cache id: %d", index, id);
return NULL;
}
glyph = glyphCache->glyphCache[id].entries[index];
if (!glyph)
- WLog_ERR(TAG, "no glyph found at cache index: %d in cache id: %d", index, id);
+ WLog_ERR(TAG, "no glyph found at cache index: %d in cache id: %d", index, id);
return glyph;
}
if (id > 9)
{
- WLog_ERR(TAG, "invalid glyph cache id: %d", id);
+ WLog_ERR(TAG, "invalid glyph cache id: %d", id);
return;
}
if (index > glyphCache->glyphCache[id].number)
{
- WLog_ERR(TAG, "invalid glyph cache index: %d in cache id: %d", index, id);
+ WLog_ERR(TAG, "invalid glyph cache index: %d in cache id: %d", index, id);
return;
}
- WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCachePut: id: %d index: %d", id, index);
+ WLog_DBG(TAG, "GlyphCachePut: id: %d index: %d", id, index);
prevGlyph = glyphCache->glyphCache[id].entries[index];
if (index > 255)
{
- WLog_ERR(TAG, "invalid glyph cache fragment index: %d", index);
+ WLog_ERR(TAG, "invalid glyph cache fragment index: %d", index);
return NULL;
}
fragment = glyphCache->fragCache.entries[index].fragment;
*size = (BYTE) glyphCache->fragCache.entries[index].size;
- WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCacheFragmentGet: index: %d size: %d", index, *size);
+ WLog_DBG(TAG, "GlyphCacheFragmentGet: index: %d size: %d", index, *size);
if (!fragment)
- WLog_ERR(TAG, "invalid glyph fragment at index:%d", index);
+ WLog_ERR(TAG, "invalid glyph fragment at index:%d", index);
return fragment;
}
if (index > 255)
{
- WLog_ERR(TAG, "invalid glyph cache fragment index: %d", index);
+ WLog_ERR(TAG, "invalid glyph cache fragment index: %d", index);
return;
}
- WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCacheFragmentPut: index: %d size: %d", index, size);
+ WLog_DBG(TAG, "GlyphCacheFragmentPut: index: %d size: %d", index, size);
prevFragment = glyphCache->fragCache.entries[index].fragment;
glyphCache->fragCache.entries[index].fragment = fragment;
glyphCache->fragCache.entries[index].size = size;
- if (!prevFragment)
+ if (prevFragment)
free(prevFragment);
}