From: dooglus Date: Tue, 22 Jan 2008 12:30:25 +0000 (+0000) Subject: Pass the current 'time' value when optimizing layers. We're going to need it in... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3e363592f62521ca3e0338f474deb1eb253f9e74;p=synfig.git Pass the current 'time' value when optimizing layers. We're going to need it in a following commit. git-svn-id: http://svn.voria.com/code@1417 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp index 24760ab..967bc60 100644 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ b/synfig-core/trunk/src/synfig/canvas.cpp @@ -1016,7 +1016,7 @@ Canvas::get_meta_data_keys()const refer to "motion blur", they mean either of these two layers. */ void -synfig::optimize_layers(Context context, Canvas::Handle op_canvas, bool seen_motion_blur_in_parent) +synfig::optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur_in_parent) { Context iter; @@ -1112,7 +1112,7 @@ synfig::optimize_layers(Context context, Canvas::Handle op_canvas, bool seen_mot Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas)); Canvas::Handle paste_sub_canvas = paste_canvas->get_sub_canvas(); if(paste_sub_canvas) - optimize_layers(paste_sub_canvas->get_context(),sub_canvas,motion_blurred); + optimize_layers(time, paste_sub_canvas->get_context(),sub_canvas,motion_blurred); // \todo: uncommenting the following breaks the rendering of at least examples/backdrop.sifz quite severely // #define SYNFIG_OPTIMIZE_PASTE_CANVAS diff --git a/synfig-core/trunk/src/synfig/canvas.h b/synfig-core/trunk/src/synfig/canvas.h index 590d162..43a562d 100644 --- a/synfig-core/trunk/src/synfig/canvas.h +++ b/synfig-core/trunk/src/synfig/canvas.h @@ -103,7 +103,7 @@ public: typedef std::list Children; - friend void synfig::optimize_layers(Context, Canvas::Handle, bool seen_motion_blur); + friend void synfig::optimize_layers(Time, Context, Canvas::Handle, bool seen_motion_blur); /* -- ** -- D A T A ------------------------------------------------------------- @@ -529,7 +529,7 @@ protected: virtual void get_times_vfunc(Node::time_set &set) const; }; // END of class Canvas -void optimize_layers(Context context, Canvas::Handle op_canvas, bool seen_motion_blur=false); +void optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur=false); }; // END of namespace synfig diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp index 8176e8b..23b86b3 100644 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ b/synfig-core/trunk/src/synfig/target_scanline.cpp @@ -173,7 +173,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); - optimize_layers(canvas->get_context(), op_canvas); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else context=canvas->get_context(); @@ -307,7 +307,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); - optimize_layers(canvas->get_context(), op_canvas); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else context=canvas->get_context(); diff --git a/synfig-core/trunk/src/synfig/target_tile.cpp b/synfig-core/trunk/src/synfig/target_tile.cpp index a46fa61..92665d2 100644 --- a/synfig-core/trunk/src/synfig/target_tile.cpp +++ b/synfig-core/trunk/src/synfig/target_tile.cpp @@ -357,7 +357,7 @@ synfig::Target_Tile::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); - optimize_layers(canvas->get_context(), op_canvas); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else context=canvas->get_context(); @@ -369,7 +369,7 @@ synfig::Target_Tile::render(ProgressCallback *cb) Canvas::Handle op_canvas(Canvas::create()); // Set the time that we wish to render canvas->set_time(t); - optimize_layers(canvas->get_context(), op_canvas); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else Context context; @@ -402,7 +402,7 @@ synfig::Target_Tile::render(ProgressCallback *cb) #ifdef SYNFIG_OPTIMIZE_LAYER_TREE Canvas::Handle op_canvas(Canvas::create()); - optimize_layers(canvas->get_context(), op_canvas); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); context=op_canvas->get_context(); #else context=canvas->get_context();