[truetype] Better multi-threading support.

* src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
references.
This commit is contained in:
Johnson Y. Yan 2010-11-26 11:58:08 +01:00 committed by Werner Lemberg
parent ed7d1a59ff
commit 9073e7ceb6
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2010-11-26 Johnson Y. Yan <yinsen_yan@foxitsoftware.com>
[truetype] Better multi-threading support.
* src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
references.
2010-11-23 John Tytgat <John.Tytgat@esko.com>
* src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand

View File

@ -595,6 +595,12 @@
exec->storage = size->storage;
exec->twilight = size->twilight;
/* In case of multi-threading it can happen that the old size object */
/* no longer exists, thus we must clear all glyph zone references. */
ft_memset( &exec->zp0, 0, sizeof ( exec->zp0 ) );
exec->zp1 = exec->zp0;
exec->zp2 = exec->zp0;
}
/* XXX: We reserve a little more elements on the stack to deal safely */