From 9073e7ceb628ed8404896bd1901e4262d77a170f Mon Sep 17 00:00:00 2001 From: "Johnson Y. Yan" Date: Fri, 26 Nov 2010 11:58:08 +0100 Subject: [truetype] Better multi-threading support. * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone references. --- ChangeLog | 7 +++++++ src/truetype/ttinterp.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 76be75a85..f81527da9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-26 Johnson Y. Yan + + [truetype] Better multi-threading support. + + * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone + references. + 2010-11-23 John Tytgat * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index 34cd25879..f55b8eeab 100644 --- 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 */ -- cgit v1.2.1