MCPcopy Create free account
hub / github.com/KLayout/klayout / test_snapshot

Method test_snapshot

src/laybasic/laybasic/layRedrawThreadWorker.cc:742–766  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740}
741
742void
743RedrawThreadWorker::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
768void
769RedrawThreadWorker::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)

Callers

nothing calls this directly

Calls 4

secondsMethod · 0.80
wakeup_checkedMethod · 0.80
currentFunction · 0.70
triggerMethod · 0.45

Tested by

no test coverage detected