summaryrefslogtreecommitdiff
path: root/pixman/pixman-glyph.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-01-12 08:28:32 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-01-27 14:04:15 +0000
commit520230914bbb56473b872f2ef7dc59092f426415 (patch)
treeb33984db43cf688f7eca077f22cc534ba0c4a9c6 /pixman/pixman-glyph.c
parentb283c864a3de039f9213adaf402c6597db12d0c4 (diff)
downloadpixman-520230914bbb56473b872f2ef7dc59092f426415.tar.gz
Always return a valid function from lookup_composite()
We never expect to fail to find the appropriate function as the general_composite_rect should always match. So if somehow we fallthrough the search, emit a _pixman_log_error() and return a dummy function. Note that we remove some conditionals and a level of indentation hence a large amount of code movement. This also reveals that in a few places we are duplicating stack variables that can be eliminated later. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'pixman/pixman-glyph.c')
-rw-r--r--pixman/pixman-glyph.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/pixman/pixman-glyph.c b/pixman/pixman-glyph.c
index 6d2c8bb..5a271b6 100644
--- a/pixman/pixman-glyph.c
+++ b/pixman/pixman-glyph.c
@@ -463,16 +463,13 @@ pixman_composite_glyphs_no_mask (pixman_op_t op,
{
glyph_format = glyph_img->common.extended_format_code;
glyph_flags = glyph_img->common.flags;
-
+
_pixman_implementation_lookup_composite (
get_implementation(), op,
src->common.extended_format_code, src->common.flags,
glyph_format, glyph_flags | extra,
dest_format, dest_flags,
&implementation, &func);
-
- if (!func)
- goto out;
}
info.src_x = src_x + composite_box.x1 - dest_x;
@@ -582,9 +579,6 @@ add_glyphs (pixman_glyph_cache_t *cache,
mask_format, info.mask_flags,
dest_format, dest_flags,
&implementation, &func);
-
- if (!func)
- goto out;
}
glyph_box.x1 = glyphs[i].x - glyph->origin_x + off_x;