diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-07-13 22:21:37 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-07-13 22:21:37 +0000 |
| commit | 0d6be77f2af241e47d0df3f19619db85ca8127e7 (patch) | |
| tree | 510d535eb41530772c79218ece39023d85d42c93 /src/display/cairo-utils.cpp | |
| parent | Fix crashes during offscreen rendering, part 1 (diff) | |
| parent | Fix crashes in print preview (diff) | |
| download | inkscape-0d6be77f2af241e47d0df3f19619db85ca8127e7.tar.gz inkscape-0d6be77f2af241e47d0df3f19619db85ca8127e7.zip | |
Merge from trunk to pull in fix for LP #806105
(bzr r10347.1.13)
Diffstat (limited to 'src/display/cairo-utils.cpp')
| -rw-r--r-- | src/display/cairo-utils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/display/cairo-utils.cpp b/src/display/cairo-utils.cpp index 90f65c33e..8b75f09a6 100644 --- a/src/display/cairo-utils.cpp +++ b/src/display/cairo-utils.cpp @@ -345,6 +345,18 @@ ink_cairo_surface_create_for_argb32_pixbuf(GdkPixbuf *pb) return pbs; } +/** @brief Cleanup function for GdkPixbuf. + * This function should be passed as the GdkPixbufDestroyNotify parameter + * to gdk_pixbuf_new_from_data when creating a GdkPixbuf backed by + * a Cairo surface. + */ +void +ink_cairo_pixbuf_cleanup(guchar *pixels, void *data) +{ + cairo_surface_t *surface = reinterpret_cast<cairo_surface_t*>(data); + cairo_surface_destroy(surface); +} + /** @brief Create an exact copy of a surface. * Creates a surface that has the same type, content type, dimensions and contents * as the specified surface. */ |
