From 1a80c688fe9b63d19d4af02565072e94fe973b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Tue, 16 Oct 2007 19:14:52 +0000 Subject: [PATCH] * clutter/pango/pangoclutter-render.c: (tc_get): Provide for blank rows/columns of pixels between adjecant glyphs in the texture cache to avoid bilinear interpolation spillage at edges of glyphs. --- ChangeLog | 10 ++++++++-- clutter/pango/pangoclutter-render.c | 21 +++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a89fe50b..960fb418b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ -2007-10-15 Øyvind Kolås +2007-10-16 Øyvind Kolås + + * clutter/pango/pangoclutter-render.c: (tc_get): Provide for blank + rows/columns of pixels between adjecant glyphs in the texture cache to + avoid bilinear interpolation spillage at edges of glyphs. + +2007-10-16 Øyvind Kolås * clutter/clutter-main.c: (clutter_do_event): allow motion events - only delivered to stage to be chaugt in the capture phase as well + only delivered to stage to be caught in the capture phase as well as the bubbling phase. 2007-10-16 Emmanuele Bassi diff --git a/clutter/pango/pangoclutter-render.c b/clutter/pango/pangoclutter-render.c index 521576ff8..06f9127c7 100644 --- a/clutter/pango/pangoclutter-render.c +++ b/clutter/pango/pangoclutter-render.c @@ -86,12 +86,21 @@ tc_clear () static void tc_get (tc_area *area, int width, int height) { - int slice_height = MIN (height + TC_ROUND - 1, TC_HEIGHT) & ~(TC_ROUND - 1); - tc_slice *slice = slices + slice_height / TC_ROUND; + int slice_height; + tc_slice *slice; area->w = width; area->h = height; + /* Provide for blank rows/columns of pixels between adjecant glyphs in the + * texture cache to avoid bilinear interpolation spillage at edges of glyphs. + */ + width += 1; + height += 1; + + slice_height = MIN (height + TC_ROUND - 1, TC_HEIGHT) & ~(TC_ROUND - 1); + slice = slices + slice_height / TC_ROUND; + width = MIN (width, TC_WIDTH); if (!slice->name || slice->avail < width) @@ -118,10 +127,10 @@ tc_get (tc_area *area, int width, int height) cogl_texture_bind (CGL_TEXTURE_2D, match->name); - /* We might even want to use mipmapping instead of CGL_LINEAR here - * that should allow rerendering of glyphs to look nice even at scales - * far below 50%. - */ + /* We might even want to use mipmapping instead of CGL_LINEAR here + * that should allow rerendering of glyphs to look nice even at scales + * far below 50%. + */ cogl_texture_set_filters (CGL_TEXTURE_2D, CGL_LINEAR, CGL_NEAREST); cogl_texture_image_2d (CGL_TEXTURE_2D,