Pass the current 'time' value when optimizing layers. We're going to need it in...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 22 Jan 2008 12:30:25 +0000 (12:30 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 22 Jan 2008 12:30:25 +0000 (12:30 +0000)
git-svn-id: http://svn.voria.com/code@1417 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp
synfig-core/trunk/src/synfig/canvas.h
synfig-core/trunk/src/synfig/target_scanline.cpp
synfig-core/trunk/src/synfig/target_tile.cpp

index 24760ab..967bc60 100644 (file)
@@ -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
index 590d162..43a562d 100644 (file)
@@ -103,7 +103,7 @@ public:
 
        typedef std::list<Handle> 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
index 8176e8b..23b86b3 100644 (file)
@@ -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();
index a46fa61..92665d2 100644 (file)
@@ -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();