summaryrefslogtreecommitdiff
path: root/src/cairo-path-fixed-private.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-12-19 21:34:16 -0800
committerCarl Worth <cworth@cworth.org>2006-12-22 17:59:20 -0800
commitba531642f79d492ecbad8f086f1e44b56e157e36 (patch)
treeff4ff528262e06116606b59e7dc213ee2f3b6eb9 /src/cairo-path-fixed-private.h
parentb1189118532a1fe93e126843af739809d38a62bd (diff)
downloadcairo-ba531642f79d492ecbad8f086f1e44b56e157e36.tar.gz
Add optimization for rectilinear stroke
This custom stroking code allows backends to use optimized region-based drawing operations for rectilinear strokes. This results in a 5-25x performance improvement when drawing rectilinear shapes: image-rgb box-outline-stroke-100 0.18 -> 0.01: 25.58x speedup ████████████████████████▋ image-rgba box-outline-stroke-100 0.18 -> 0.01: 25.57x speedup ████████████████████████▋ xlib-rgb box-outline-stroke-100 0.49 -> 0.06: 8.67x speedup ███████▋ xlib-rgba box-outline-stroke-100 0.22 -> 0.04: 5.39x speedup ████▍ In other words, using cairo_stroke instead of cairo_fill to draw the same shape was 5-15x slower before, but is 1.2-2x faster now.
Diffstat (limited to 'src/cairo-path-fixed-private.h')
-rw-r--r--src/cairo-path-fixed-private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h
index 8e0d530c3..12ca6186c 100644
--- a/src/cairo-path-fixed-private.h
+++ b/src/cairo-path-fixed-private.h
@@ -68,7 +68,8 @@ struct _cairo_path_fixed {
cairo_point_t last_move_point;
cairo_point_t current_point;
- unsigned int has_current_point : 1;
+ unsigned int has_current_point : 1;
+ unsigned int has_curve_to : 1;
};
#endif /* CAIRO_PATH_FIXED_PRIVATE_H */