summaryrefslogtreecommitdiff
path: root/src/cairo-types-private.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-03-30 15:24:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-03-30 15:28:37 +0100
commit1c76e3e9ad1437662bf91ed1d21c4bda8fd50fb4 (patch)
treee1ac787cf1625a2eeb69ecb544524435ebfd70b4 /src/cairo-types-private.h
parentd2ec151e490b227e7f3d6879bf7a893577dfefa5 (diff)
scaled-font: Optimize cairo_scaled_font_lookup()
By tracking which fields of information are already available on the scaled_glyph we can more efficiently determine if we already have the requested fields. This reduces from about 6 conditionals to one, and reduces the function overhead by ~20% -- which has a measurable improvement on glyph benchmarks.
Diffstat (limited to 'src/cairo-types-private.h')
-rw-r--r--src/cairo-types-private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index f3d14b319..0b8f4dbbc 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -415,6 +415,7 @@ typedef struct _cairo_scaled_glyph {
int16_t x_advance; /* device-space rounded X advance */
int16_t y_advance; /* device-space rounded Y advance */
+ unsigned int has_info;
cairo_image_surface_t *surface; /* device-space image */
cairo_path_fixed_t *path; /* device-space outline */
cairo_surface_t *recording_surface; /* device-space recording-surface */