ref: 9073e7ceb628ed8404896bd1901e4262d77a170f
parent: ed7d1a59ff7f1ef2c8c69cd7fd0aa68ec07c2db8
author: Johnson Y. Yan <[email protected]>
date: Fri Nov 26 06:58:08 EST 2010
[truetype] Better multi-threading support. * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone references.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-26 Johnson Y. Yan <[email protected]>
+
+ [truetype] Better multi-threading support.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone
+ references.
+
2010-11-23 John Tytgat <[email protected]>
* src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -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 */