summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-image.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-09-17 16:57:02 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-09-17 16:57:02 +0000
commit909d0457495fa1d5f3cfe7065fd68d4021c0d291 (patch)
tree33cb19d99eafde178bcc0b08316fba1568ed5fb7 /src/display/drawing-image.cpp
parentupdate to trunk (diff)
parentFix for Bug #1217602 (Measure Path fails with XML too deep error) by dave m. (diff)
downloadinkscape-909d0457495fa1d5f3cfe7065fd68d4021c0d291.tar.gz
inkscape-909d0457495fa1d5f3cfe7065fd68d4021c0d291.zip
Update to trunk
(bzr r11950.1.140)
Diffstat (limited to 'src/display/drawing-image.cpp')
-rw-r--r--src/display/drawing-image.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/display/drawing-image.cpp b/src/display/drawing-image.cpp
index bdb7c15b0..46f066b8e 100644
--- a/src/display/drawing-image.cpp
+++ b/src/display/drawing-image.cpp
@@ -22,7 +22,7 @@ namespace Inkscape {
DrawingImage::DrawingImage(Drawing &drawing)
: DrawingItem(drawing)
, _pixbuf(NULL)
- , _surface(NULL)
+ , _surface(NULL) // this is owned by _pixbuf!
, _style(NULL)
, _new_surface(NULL)
{}
@@ -33,7 +33,6 @@ DrawingImage::~DrawingImage()
sp_style_unref(_style);
if (_pixbuf) {
if (_new_surface) cairo_surface_destroy(_new_surface);
- cairo_surface_destroy(_surface);
g_object_unref(_pixbuf);
}
}
@@ -47,10 +46,10 @@ DrawingImage::setARGB32Pixbuf(GdkPixbuf *pb)
}
if (_pixbuf != NULL) {
g_object_unref(_pixbuf);
- cairo_surface_destroy(_surface);
+ // unrefing the pixbuf also destroys surface
}
_pixbuf = pb;
- _surface = pb ? ink_cairo_surface_create_for_argb32_pixbuf(pb) : NULL;
+ _surface = pb ? ink_cairo_surface_get_for_pixbuf(pb) : NULL;
_markForUpdate(STATE_ALL, false);
}
@@ -207,7 +206,7 @@ unsigned DrawingImage::_renderItem(DrawingContext &ct, Geom::IntRect const &/*ar
int orgstride = cairo_image_surface_get_stride(_surface);
int newstride = cairo_image_surface_get_stride(_new_surface);
- cairo_surface_flush(_surface);
+ //cairo_surface_flush(_surface);
cairo_surface_flush(_new_surface);
for(int y=0; y<newheight; y++) {