summaryrefslogtreecommitdiff
path: root/pango/pangoft2-render.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-09-18 20:56:45 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-09-18 20:56:45 +0000
commit43fa79404e3f90971dae6a99743d4edd70067b51 (patch)
tree735ba4525a39b1c94f17db20e833b5e2fd3e46e4 /pango/pangoft2-render.c
parenta3e5dbf6e73e9edea2b3f5bbcfd54d792b78f976 (diff)
downloadpango-43fa79404e3f90971dae6a99743d4edd70067b51.tar.gz
Remove a couple of unnecessary static variables.
2006-09-18 Behdad Esfahbod <behdad@gnome.org> * pango/pangoft2-render.c (pango_ft2_font_render_glyph): Remove a couple of unnecessary static variables.
Diffstat (limited to 'pango/pangoft2-render.c')
-rw-r--r--pango/pangoft2-render.c20
1 files changed, 5 insertions, 15 deletions
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);
}
}