diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-09-14 11:09:15 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-09-14 11:09:15 +0000 |
| commit | f62ab958909134854a42a4654d296988bc724b67 (patch) | |
| tree | 08498b78a0fe1b5e94490a95fe876175e9c179d9 /src/display/drawing-image.cpp | |
| parent | Merged from trunk (r12488). (diff) | |
| parent | fix windows build (diff) | |
| download | inkscape-f62ab958909134854a42a4654d296988bc724b67.tar.gz inkscape-f62ab958909134854a42a4654d296988bc724b67.zip | |
Merged from trunk (r12517).
(bzr r11608.1.121)
Diffstat (limited to 'src/display/drawing-image.cpp')
| -rw-r--r-- | src/display/drawing-image.cpp | 9 |
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++) { |
