projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Recognise .GIF and .gIf (ie. upper and mixed case extensions) in the target file...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
layer_pastecanvas.cpp
diff --git
a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp
b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp
index
747f770
..
edc3d0b
100644
(file)
--- a/
synfig-core/trunk/src/synfig/layer_pastecanvas.cpp
+++ b/
synfig-core/trunk/src/synfig/layer_pastecanvas.cpp
@@
-85,7
+85,8
@@
Layer_PasteCanvas::Layer_PasteCanvas():
origin(0,0),
depth(0),
zoom(0),
origin(0,0),
depth(0),
zoom(0),
- time_offset(0)
+ time_offset(0),
+ extra_reference(false)
{
children_lock=false;
muck_with_time_=true;
{
children_lock=false;
muck_with_time_=true;
@@
-103,6
+104,7
@@
Layer_PasteCanvas::~Layer_PasteCanvas()
set_sub_canvas(0);
//if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root()))
set_sub_canvas(0);
//if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root()))
+ //if(extra_reference)
// canvas->unref();
}
// canvas->unref();
}
@@
-186,7
+188,8
@@
Layer_PasteCanvas::set_sub_canvas(etl::handle<synfig::Canvas> x)
if(canvas && muck_with_time_)
remove_child(canvas.get());
if(canvas && muck_with_time_)
remove_child(canvas.get());
- if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root()))
+ // if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root()))
+ if (extra_reference)
canvas->unref();
child_changed_connection.disconnect();
canvas->unref();
child_changed_connection.disconnect();
@@
-209,7
+212,12
@@
Layer_PasteCanvas::set_sub_canvas(etl::handle<synfig::Canvas> x)
add_child(canvas.get());
if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root()))
add_child(canvas.get());
if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root()))
+ {
canvas->ref();
canvas->ref();
+ extra_reference = true;
+ }
+ else
+ extra_reference = false;
if(canvas)
on_canvas_set();
if(canvas)
on_canvas_set();
@@
-401,7
+409,10
@@
Layer_PasteCanvas::accelerated_render(Context context,Surface *surface,int quali
// the area we're about to blit is transparent, so it doesn't
// matter whether we use 'straight' or 'straight onto' here
// the area we're about to blit is transparent, so it doesn't
// matter whether we use 'straight' or 'straight onto' here
- apen.set_blend_method(Color::BLEND_STRAIGHT);
+ if (blend_method == Color::BLEND_ALPHA_BRIGHTEN)
+ apen.set_blend_method(blend_method);
+ else
+ apen.set_blend_method(Color::BLEND_STRAIGHT);
/* This represents the area we're pasting into the tile,
* within the tile as a whole. Areas (A), (B), (C) and (D)
/* This represents the area we're pasting into the tile,
* within the tile as a whole. Areas (A), (B), (C) and (D)