| 740 | } |
| 741 | |
| 742 | void |
| 743 | RedrawThreadWorker::test_snapshot (const UpdateSnapshotCallback *update_snapshot) |
| 744 | { |
| 745 | checkpoint (); |
| 746 | |
| 747 | if (mp_redraw_thread->num_workers () > 0) { |
| 748 | if (m_test_count == 0) { |
| 749 | |
| 750 | m_test_count = 100; // TODO: make variable? |
| 751 | |
| 752 | tl::Clock c = tl::Clock::current (); |
| 753 | if ((c - m_clock).seconds () > update_interval * 0.001) { |
| 754 | if (update_snapshot) { |
| 755 | update_snapshot->trigger (); |
| 756 | } |
| 757 | transfer (); |
| 758 | mp_redraw_thread->wakeup_checked (); |
| 759 | m_clock = c; |
| 760 | } |
| 761 | |
| 762 | } else { |
| 763 | --m_test_count; |
| 764 | } |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | void |
| 769 | RedrawThreadWorker::draw_cell (bool drawing_context, int level, const db::CplxTrans &trans, const db::Box &box, const db::Box &box_for_label, bool empty_cell, const std::string &txt, lay::Bitmap *opt_bitmap) |
nothing calls this directly
no test coverage detected