Author: Carlos Lopez <[email protected]>
Date: Sat Jul 14 11:05:52 2012 +0200
Layer_Bitmap: map the cairo_surface_t to CairoSurface at the right moment.
Unmap it properly.
---
synfig-core/src/synfig/layer_bitmap.cpp | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/synfig-core/src/synfig/layer_bitmap.cpp
b/synfig-core/src/synfig/layer_bitmap.cpp
index 70e58ae..1bf6175 100644
--- a/synfig-core/src/synfig/layer_bitmap.cpp
+++ b/synfig-core/src/synfig/layer_bitmap.cpp
@@ -555,7 +555,6 @@ Layer_Bitmap::accelerated_cairorender(Context context,
cairo_surface_t *out_surf
{
CairoSurface cout_surface(out_surface);
- cout_surface.map_cairo_image();
int interp=c;
if(quality>=10)
@@ -582,11 +581,14 @@ Layer_Bitmap::accelerated_cairorender(Context context,
cairo_surface_t *out_surf
if(cairosurface.get_w()==renddesc.get_w() &&
cairosurface.get_h()==renddesc.get_h() && gamma_adjust==1.0f)
{
if(cb && !cb->amount_complete(0,100)) return false;
- cout_surface=cairosurface;
+ {
+ cout_surface.map_cairo_image();
+ cout_surface=cairosurface;
+ cout_surface.unmap_cairo_image();
+ }
if(cb && !cb->amount_complete(100,100)) return false;
return true;
}
- //cout_surface.set_wh(renddesc.get_w(),renddesc.get_h());
}
else
{
@@ -672,6 +674,8 @@ Layer_Bitmap::accelerated_cairorender(Context context,
cairo_surface_t *out_surf
//start drawing at the start of the bitmap (either origin or corner of
input...)
//and get other info
+
+ cout_surface.map_cairo_image();
CairoSurface::alpha_pen pen(cout_surface.get_pen(x_start,y_start));
pen.set_alpha(get_amount());
pen.set_blend_method(get_blend_method());
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl