[cairo-commit] src/cairo-surface-observer.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Aug 20 08:35:51 PDT 2011
src/cairo-surface-observer.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit c3e990ea7ddc59d73d27d65420062855de265b72
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Aug 20 16:29:00 2011 +0100
observer: correct classification of aligned paths
We were misclassifying rectilinear paths as aligned strokes, which is
bogus until we analyse the offset path.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c
index 432e0d2..15190e9 100644
--- a/src/cairo-surface-observer.c
+++ b/src/cairo-surface-observer.c
@@ -201,14 +201,13 @@ classify_path (const cairo_path_fixed_t *path,
if (path->fill_is_empty)
classify = 0;
else if (_cairo_path_fixed_fill_is_rectilinear (path))
- classify = 1;
+ classify = path->fill_maybe_region ? 1 : 2;
} else {
if (_cairo_path_fixed_stroke_is_rectilinear (path))
- classify = 1;
+ classify = 2;
}
- if (classify == 1 && ! path->fill_maybe_region)
- classify = 2;
- classify = 3 + path->has_curve_to != 0;
+ if (classify == -1)
+ classify = 3 + (path->has_curve_to != 0);
return classify;
}
More information about the cairo-commit
mailing list