diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-06-19 21:06:07 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-06-19 21:06:07 -0400 |
commit | ff1371a0a7494f986385730a82823cbf56790d5b (patch) | |
tree | d4e0ac9818bd745b9a007f98695dcba66019c7ad /src/cairo-pattern.c | |
parent | 240cb59fe8706b1b0d3aae4a4ed3d13472033d1d (diff) |
[cairo-surface] Remove optional pattern argument from create_similar_solid()
This was added in 41c6eebcd1fab94fd3a91d09f1ef6ee0d8c7a044, to avoid
allocating short-lived patterns. However, this was error prune as the
color information was duplicated in the pattern and could get out of
sync. Indeed, it was out of sync before this commit in the call from
cairo-clip.c.
By allocating the solid pattern on the stack we fix the original problem
without creating new ones.
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r-- | src/cairo-pattern.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index 0ac047c82..7c942650c 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -1488,8 +1488,7 @@ _cairo_pattern_acquire_surface_for_solid (cairo_solid_pattern_t *pattern, surface = _cairo_surface_create_similar_solid (dst, pattern->content, 1, 1, - &pattern->color, - &pattern->base); + &pattern->color); if (surface->status) { status = surface->status; goto UNLOCK; |