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/cairoint.h | |
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/cairoint.h')
-rw-r--r-- | src/cairoint.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cairoint.h b/src/cairoint.h index fe58ff848..e1451ab8b 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -1603,16 +1603,12 @@ _cairo_surface_create_similar_scratch (cairo_surface_t *other, int width, int height); -/* Note: the color_pattern argument is optional - if provided it will reuse - * that pattern instead of creating a very short-lived fresh solid pattern - */ cairo_private cairo_surface_t * _cairo_surface_create_similar_solid (cairo_surface_t *other, cairo_content_t content, int width, int height, - const cairo_color_t *color, - cairo_pattern_t *color_pattern); + const cairo_color_t *color); cairo_private void _cairo_surface_init (cairo_surface_t *surface, |