summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--pango/pangoft2-render.c20
2 files changed, 10 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index ed1a93f2..f78e26ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-09-18 Behdad Esfahbod <behdad@gnome.org>
+ * pango/pangoft2-render.c (pango_ft2_font_render_glyph): Remove a
+ couple of unnecessary static variables.
+
+2006-09-18 Behdad Esfahbod <behdad@gnome.org>
+
Bug 356194 – more pango_get_log_attrs problems
* pango/break.c (tailor_break): New function. Simply calls the
diff --git a/pango/pangoft2-render.c b/pango/pangoft2-render.c
index 30763d7b..473235fa 100644
--- a/pango/pangoft2-render.c
+++ b/pango/pangoft2-render.c
@@ -161,7 +161,7 @@ pango_ft2_font_render_glyph (PangoFont *font,
if (glyph_index & PANGO_GLYPH_UNKNOWN_FLAG)
{
- static PangoFT2RenderedGlyph *box;
+ PangoFT2RenderedGlyph *box;
PangoFontMetrics *metrics;
if (!font)
@@ -171,9 +171,6 @@ pango_ft2_font_render_glyph (PangoFont *font,
if (!metrics)
goto generic_box;
- /* this box gets cached, so don't bother with static'ing it.
- */
-
box = pango_ft2_font_render_box_glyph (PANGO_PIXELS (metrics->approximate_char_width),
PANGO_PIXELS (metrics->ascent + metrics->descent),
PANGO_PIXELS (metrics->ascent));
@@ -207,17 +204,10 @@ pango_ft2_font_render_glyph (PangoFont *font,
}
else
{
- static PangoFT2RenderedGlyph *box = NULL;
-
- generic_box:
- if (!box)
- {
- box = pango_ft2_font_render_box_glyph (PANGO_UNKNOWN_GLYPH_WIDTH,
- PANGO_UNKNOWN_GLYPH_HEIGHT,
- PANGO_UNKNOWN_GLYPH_HEIGHT);
- }
-
- return box;
+generic_box:
+ return pango_ft2_font_render_box_glyph (PANGO_UNKNOWN_GLYPH_WIDTH,
+ PANGO_UNKNOWN_GLYPH_HEIGHT,
+ PANGO_UNKNOWN_GLYPH_HEIGHT);
}
}