mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 03:07:58 +02:00
[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:
parent
0c0f4862c5
commit
6acb822393
1 changed files with 9 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue