[path-fixed] Avoid extra indirection when iterating already flat paths.

Perform a plain iteration rather than a flattening one if the path
knows it doesn't have any curves.
This commit is contained in:
M Joonas Pihlaja 2008-09-12 19:32:12 +03:00
parent 0c0f4862c5
commit 6acb822393

View file

@ -930,6 +930,15 @@ _cairo_path_fixed_interpret_flat (const cairo_path_fixed_t *path,
{
cpf_t flattener;
if (!path->has_curve_to) {
return _cairo_path_fixed_interpret (path, dir,
move_to,
line_to,
NULL,
close_path,
closure);
}
flattener.tolerance = tolerance;
flattener.move_to = move_to;
flattener.line_to = line_to;