* 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.
This commit is contained in:
Øyvind Kolås 2007-10-16 19:14:52 +00:00
parent a7fb3a78d2
commit 1a80c688fe
2 changed files with 23 additions and 8 deletions

View File

@ -1,7 +1,13 @@
2007-10-15 Øyvind Kolås <pippin@o-hand.com> 2007-10-16 Øyvind Kolås <pippin@o-hand.com>
* 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 <pippin@o-hand.com>
* clutter/clutter-main.c: (clutter_do_event): allow motion events * 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. as the bubbling phase.
2007-10-16 Emmanuele Bassi <ebassi@openedhand.com> 2007-10-16 Emmanuele Bassi <ebassi@openedhand.com>

View File

@ -86,12 +86,21 @@ tc_clear ()
static void static void
tc_get (tc_area *area, int width, int height) tc_get (tc_area *area, int width, int height)
{ {
int slice_height = MIN (height + TC_ROUND - 1, TC_HEIGHT) & ~(TC_ROUND - 1); int slice_height;
tc_slice *slice = slices + slice_height / TC_ROUND; tc_slice *slice;
area->w = width; area->w = width;
area->h = height; 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); width = MIN (width, TC_WIDTH);
if (!slice->name || slice->avail < 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); cogl_texture_bind (CGL_TEXTURE_2D, match->name);
/* We might even want to use mipmapping instead of CGL_LINEAR here /* We might even want to use mipmapping instead of CGL_LINEAR here
* that should allow rerendering of glyphs to look nice even at scales * that should allow rerendering of glyphs to look nice even at scales
* far below 50%. * far below 50%.
*/ */
cogl_texture_set_filters (CGL_TEXTURE_2D, CGL_LINEAR, CGL_NEAREST); cogl_texture_set_filters (CGL_TEXTURE_2D, CGL_LINEAR, CGL_NEAREST);
cogl_texture_image_2d (CGL_TEXTURE_2D, cogl_texture_image_2d (CGL_TEXTURE_2D,