diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-18 15:38:37 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-11-29 11:20:33 +0000 |
commit | d1801c23fae3777c7c59e084894a3410f7a1f932 (patch) | |
tree | 263906b86120ed712a9e02590871734d3bc888a8 /src/cairo-type3-glyph-surface.c | |
parent | f0804d4856496a46d0b2270d5815856bf63b4cf8 (diff) | |
download | cairo-d1801c23fae3777c7c59e084894a3410f7a1f932.tar.gz |
Mark if(status) as being unlikely.
The error paths should be hit very rarely during normal operation, so mark
them as being unlikely so gcc may emit better code.
Diffstat (limited to 'src/cairo-type3-glyph-surface.c')
-rw-r--r-- | src/cairo-type3-glyph-surface.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cairo-type3-glyph-surface.c b/src/cairo-type3-glyph-surface.c index 6f9eb43e4..7106040fa 100644 --- a/src/cairo-type3-glyph-surface.c +++ b/src/cairo-type3-glyph-surface.c @@ -96,7 +96,7 @@ _cairo_type3_glyph_surface_emit_image (cairo_type3_glyph_surface_t *surface, } else { image_mask = _cairo_image_surface_clone (image, CAIRO_FORMAT_A1); status = cairo_surface_status (&image->base); - if (status) + if (unlikely (status)) return status; } @@ -196,7 +196,7 @@ _cairo_type3_glyph_surface_paint (void *abstract_surface, pattern = (const cairo_surface_pattern_t *) source; status = _cairo_surface_acquire_source_image (pattern->surface, &image, &image_extra); - if (status) + if (unlikely (status)) goto fail; status = _cairo_type3_glyph_surface_emit_image_pattern (surface, @@ -282,7 +282,7 @@ _cairo_type3_glyph_surface_show_glyphs (void *abstract_surface, /* We require the matrix to be invertable. */ ctm_inverse = scaled_font->ctm; status = cairo_matrix_invert (&ctm_inverse); - if (status) + if (unlikely (status)) return CAIRO_INT_STATUS_IMAGE_FALLBACK; cairo_matrix_multiply (&new_ctm, &scaled_font->ctm, &ctm_inverse); @@ -357,7 +357,7 @@ _cairo_type3_glyph_surface_emit_fallback_image (cairo_type3_glyph_surface_t *sur CAIRO_SCALED_GLYPH_INFO_METRICS | CAIRO_SCALED_GLYPH_INFO_SURFACE, &scaled_glyph); - if (status) + if (unlikely (status)) return status; image = scaled_glyph->surface; @@ -419,7 +419,7 @@ _cairo_type3_glyph_surface_analyze_glyph (void *abstract_surface, status = _cairo_meta_surface_replay (scaled_glyph->meta_surface, &surface->base); - if (status) + if (unlikely (status)) goto cleanup; status2 = _cairo_pdf_operators_flush (&surface->pdf_operators); |