[pango] Revert "[basic-win32] Increase performance of Uniscribe code"
- From: Tor Lillqvist <tml src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pango] Revert "[basic-win32] Increase performance of Uniscribe code"
- Date: Thu, 10 Sep 2009 15:50:34 +0000 (UTC)
commit 33bb108bd8c053de4ce37c6db26dd32ea20f46e2
Author: Tor Lillqvist <tml iki fi>
Date: Thu Sep 10 18:49:31 2009 +0300
Revert "[basic-win32] Increase performance of Uniscribe code"
Unfortunately this change breaks complex script shaping.
This reverts commit ea608c0bd7721d3019bed7ef2472289b1ea6fa53.
modules/basic/basic-win32.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c
index 60a8653..ecb139e 100644
--- a/modules/basic/basic-win32.c
+++ b/modules/basic/basic-win32.c
@@ -581,7 +581,7 @@ itemize_shape_and_place (PangoFont *font,
#endif
items[item].a.fRTL = analysis->level % 2;
- if ((*script_shape) (hdc, script_cache,
+ if ((*script_shape) (hdc, &script_cache[script],
wtext + items[item].iCharPos, itemlen,
G_N_ELEMENTS (iglyphs),
&items[item].a,
@@ -611,7 +611,7 @@ itemize_shape_and_place (PangoFont *font,
nglyphs, glyphs->log_clusters + ng,
char_offset);
- if ((*script_place) (hdc, script_cache, iglyphs, nglyphs,
+ if ((*script_place) (hdc, &script_cache[script], iglyphs, nglyphs,
visattrs, &items[item].a,
advances, offsets, &abc))
{
@@ -673,7 +673,7 @@ uniscribe_shape (PangoFont *font,
long wlen;
int i;
gboolean retval = TRUE;
- SCRIPT_CACHE script_cache;
+ SCRIPT_CACHE script_cache[100];
if (!pango_win32_font_select_font (font, hdc))
return FALSE;
@@ -684,10 +684,11 @@ uniscribe_shape (PangoFont *font,
if (retval)
{
- memset (&script_cache, 0, sizeof (script_cache));
+ memset (script_cache, 0, sizeof (script_cache));
retval = itemize_shape_and_place (font, hdc, wtext, wlen, analysis, glyphs, script_cache);
- if (script_cache)
- (*script_free_cache)(&script_cache);
+ for (i = 0; i < G_N_ELEMENTS (script_cache); i++)
+ if (script_cache[i])
+ (*script_free_cache)(&script_cache[i]);
}
if (retval)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]