+int MWindow::get_cpus(int out_w, int out_h)
+{
+ if( !out_w ) out_w = edl->session->output_w;
+ if( !out_h ) out_h = edl->session->output_h;
+ int cpus = out_w*out_h/0x80000 + 1;
+ if( cpus > preferences->processors )
+ cpus = preferences->processors;
+ return cpus;
+}
+int MWindow::get_cpus()
+{
+ return get_cpus(edl->session->output_w, edl->session->output_h);
+}
+
+void MWindow::draw_trackmovement()
+{
+ if( !redraw_tracks )
+ redraw_tracks = new DrawTrackMovement(this);
+ redraw_tracks->start();
+}
+
+DrawTrackMovement::DrawTrackMovement(MWindow *mwindow)
+ : Thread(1, 0, 0)
+{
+ this->mwindow = mwindow;
+}
+DrawTrackMovement::~DrawTrackMovement()
+{
+ join();
+}
+
+void DrawTrackMovement::run()
+{
+ mwindow->gui->lock_window("DrawTrackMovement::run");
+ mwindow->edl->tracks->update_y_pixels(mwindow->theme);
+ mwindow->gui->draw_trackmovement();
+ mwindow->gui->unlock_window();
+}
+