[cairo] [PATCH 3/4] _clip_get_single_path() does not skip boxes anymore
Taekyun Kim
podain77 at gmail.com
Tue Jul 5 00:17:56 PDT 2011
From: Taekyun Kim <tkq.kim at samsung.com>
This function is used for reducing paint to fill with NULL clip.
So this function should return NULL unless clip contains exactly
one single path.
In _cairo_image_surface_fill(), this function is also used for
eliminating clip if filling path and clip path are identical.
This also requires that clip must contain a single path.
---
src/cairo-image-surface.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 92223fc..fe01737 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -3230,20 +3230,10 @@ _clip_and_composite_trapezoids (cairo_image_surface_t *dst,
static cairo_clip_path_t *
_clip_get_single_path (cairo_clip_t *clip)
{
- cairo_clip_path_t *iter = clip->path;
- cairo_clip_path_t *path = NULL;
+ if (clip->path->prev == NULL)
+ return clip->path;
- do {
- if ((iter->flags & CAIRO_CLIP_PATH_IS_BOX) == 0) {
- if (path != NULL)
- return FALSE;
-
- path = iter;
- }
- iter = iter->prev;
- } while (iter != NULL);
-
- return path;
+ return NULL;
}
/* high level image interface */
--
1.7.1
More information about the cairo
mailing list