[basic-win32] Increase performance of Uniscribe code
authorDavid E. Hollingsworth <deh@curl.com>
Thu, 13 Aug 2009 12:55:50 +0000 (15:55 +0300)
committerTor Lillqvist <tml@iki.fi>
Thu, 13 Aug 2009 12:55:50 +0000 (15:55 +0300)
commitea608c0bd7721d3019bed7ef2472289b1ea6fa53
treecfe86a154afca88cebdb117584c5afcfc70c1b8e
parentb4f10583ea84d02ed0278fc2cb2846aaf075864d
[basic-win32] Increase performance of Uniscribe code

A few weeks ago I reported a performance issue regarding the use of
Uniscribe in the win32 basic shaper.

It turns out that the issue was with the use of Uniscribe's
SCRIPT_CACHE.  Despite the name, this value is for caching
per-font-plus-size values, not per-script values.  See:

  http://msdn.microsoft.com/en-us/library/dd317726(VS.85).aspx

Since shaping occurs on runs containing a single font, we only need
one SCRIPT_CACHE in uniscribe_shape.  I'm including a patch below that
does this.  With the patch applied, the time for one of my tests went
from 20s to .3s.
modules/basic/basic-win32.c