[cairo-commit] src/cairo-glitz-surface.c
ç½æ¶å Jinghua Luo
jinghua at kemper.freedesktop.org
Mon Jan 8 00:54:03 PST 2007
src/cairo-glitz-surface.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
New commits:
diff-tree 116ae23fc64a8477a116bd6f3b60c7b5404af1c5 (from aed4029a104d22cbd363ab9e365320980d22bc86)
Author: Jinghua Luo <sunmoon1997 at gmail.com>
Date: Mon Jan 8 16:51:28 2007 +0800
Glitz: position large glyph correctly.
I introduced this bug while fixing test glyph-cache-pressure
(commit 3b1d0d3519a7d0328f897927d3534f10750d30db). I also changed
GLYPH_CACHE_MAX_HEIGHT and GLYPH_CACHE_MAX_HEIGHT to 96, then we
still can cache at least 28 glyphes per font(512 ^ 2 / 96 ^ 2).
This make us not hit slow path too much and improve performance
a lot.
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index f5ca503..f492739 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -1684,8 +1684,8 @@ static const cairo_glitz_area_funcs_t _c
#define GLYPH_CACHE_TEXTURE_SIZE 512
#define GLYPH_CACHE_MAX_LEVEL 64
-#define GLYPH_CACHE_MAX_HEIGHT 72
-#define GLYPH_CACHE_MAX_WIDTH 72
+#define GLYPH_CACHE_MAX_HEIGHT 96
+#define GLYPH_CACHE_MAX_WIDTH 96
#define WRITE_VEC2(ptr, _x, _y) \
*(ptr)++ = (_x); \
@@ -2072,6 +2072,11 @@ _cairo_glitz_surface_old_show_glyphs (ca
if (status)
goto UNLOCK;
+ x_offset = scaled_glyphs[i]->surface->base.device_transform.x0;
+ y_offset = scaled_glyphs[i]->surface->base.device_transform.y0;
+ x1 = _cairo_lround (glyphs[i].x) + x_offset;
+ y1 = _cairo_lround (glyphs[i].y) + y_offset;
+
glitz_composite (_glitz_operator (op),
src->surface,
clone->surface,
More information about the cairo-commit
mailing list