summaryrefslogtreecommitdiffstats
path: root/src/helper/pixbuf-ops.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-09-13 21:14:45 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-09-13 21:14:45 +0000
commit0697088a2e3fbb3f7777db721e8c5e4661311dbe (patch)
treef7171656bbb4330a5aef0c30b01981d64196993d /src/helper/pixbuf-ops.cpp
parentUse g_match_info_free instead of g_match_info_unref (diff)
downloadinkscape-0697088a2e3fbb3f7777db721e8c5e4661311dbe.tar.gz
inkscape-0697088a2e3fbb3f7777db721e8c5e4661311dbe.zip
Improve the functions which create GdkPixbuf from Cairo surface
and vice versa. Simplifies some code. Also introduce proper refcounting into svg_preview_cache.cpp and fix its users. (bzr r12512)
Diffstat (limited to 'src/helper/pixbuf-ops.cpp')
-rw-r--r--src/helper/pixbuf-ops.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 75c002c57..a51a62f42 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -146,12 +146,7 @@ GdkPixbuf *sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*
// render items
drawing.render(ct, final_bbox, Inkscape::DrawingItem::RENDER_BYPASS_CACHE);
- pixbuf = gdk_pixbuf_new_from_data(cairo_image_surface_get_data(surface),
- GDK_COLORSPACE_RGB, TRUE,
- 8, width, height, cairo_image_surface_get_stride(surface),
- ink_cairo_pixbuf_cleanup,
- surface);
- convert_pixbuf_argb32_to_normal(pixbuf);
+ pixbuf = ink_pixbuf_create_from_cairo_surface(surface);
}
else
{