26 #ifndef __SYNFIG_ASYNCRENDERER_H
27 #define __SYNFIG_ASYNCRENDERER_H
32 #include <sigc++/signal.h>
33 #include <sigc++/trackable.h>
34 #include <sigc++/connection.h>
36 #include <synfig/target_scanline.h>
37 #include <synfig/target_tile.h>
38 #include <synfig/target_cairo.h>
39 #include <synfig/target_cairo_tile.h>
40 #include <synfig/surface.h>
41 #include <glibmm/main.h>
42 #include <ETL/ref_count>
43 #include <glibmm/thread.h>
44 #include <glibmm/dispatcher.h>
52 #ifdef SINGLE_THREADED
53 # define single_threaded() App::single_threaded
65 sigc::signal<void> signal_finished_;
67 sigc::signal<void> signal_success_;
70 std::list<sigc::connection> activity_connection_list;
73 etl::handle<synfig::Target> target;
80 synfig::ProgressCallback *cb;
82 sigc::signal<void> signal_stop_;
84 Glib::Thread* render_thread;
85 Glib::Dispatcher signal_done_;
87 sigc::connection done_connection;
89 Glib::TimeVal start_time;
90 Glib::TimeVal finish_time;
97 AsyncRenderer(etl::handle<synfig::Target> target,synfig::ProgressCallback *cb=0);
104 #ifdef SINGLE_THREADED
105 void rendering_progress();
118 void render_target();