diff --git a/plugins/SlicerT/SlicerTView.cpp b/plugins/SlicerT/SlicerTView.cpp index 2668018c8..5edbc06c9 100644 --- a/plugins/SlicerT/SlicerTView.cpp +++ b/plugins/SlicerT/SlicerTView.cpp @@ -265,6 +265,8 @@ void SlicerTView::paintEvent(QPaintEvent* pe) void SlicerTView::resizeEvent(QResizeEvent* re) { + printf("-------------- resize event start ----------------\n"); + auto t1 = std::chrono::high_resolution_clock::now(); m_y1 = height() - s_bottomBoxOffset; // left box @@ -285,6 +287,9 @@ void SlicerTView::resizeEvent(QResizeEvent* re) int waveFormHeight = height() - s_bottomBoxHeight - s_topBarHeight - s_sampleBoxHeight; m_wf->resize(width(), waveFormHeight); + printf("Full resize Event: %i\n", + std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - t1)); + printf("\n\n"); } } // namespace gui diff --git a/plugins/SlicerT/SlicerTWaveform.cpp b/plugins/SlicerT/SlicerTWaveform.cpp index 17fab42e2..c5041bfc7 100644 --- a/plugins/SlicerT/SlicerTWaveform.cpp +++ b/plugins/SlicerT/SlicerTWaveform.cpp @@ -100,11 +100,14 @@ void SlicerTWaveform::resizeEvent(QResizeEvent* event) /* m_seekerHeight = m_height * 0.33f; */ m_editorWidth = m_width; m_editorHeight = m_height - m_seekerHeight - s_middleMargin - s_seekerVerMargin; + auto t1 = std::chrono::high_resolution_clock::now(); m_seeker = QPixmap(m_seekerWidth, m_seekerHeight); m_seekerWaveform = QPixmap(m_seekerWidth, m_seekerHeight); m_editorWaveform = QPixmap(m_editorWidth, m_editorHeight - s_arrowHeight); m_sliceEditor = QPixmap(m_width, m_editorHeight); + printf("Resize Pixmaps: %i\n", + std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - t1)); updateUI(); } void SlicerTWaveform::drawSeekerWaveform() @@ -268,10 +271,23 @@ void SlicerTWaveform::isPlaying(float current, float start, float end) // this should only be called if one of the waveforms has to update void SlicerTWaveform::updateUI() { + auto t1 = std::chrono::high_resolution_clock::now(); drawSeekerWaveform(); + printf("Draw seeker waveform: %i\n", + std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - t1)); + t1 = std::chrono::high_resolution_clock::now(); drawEditorWaveform(); + printf("Draw editor waveform: %i\n", + std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - t1)); + t1 = std::chrono::high_resolution_clock::now(); drawSeeker(); + printf("Draw seeker UI: %i\n", + std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - t1)); + t1 = std::chrono::high_resolution_clock::now(); drawEditor(); + printf("Draw editor UI: %i\n", + std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - t1)); + t1 = std::chrono::high_resolution_clock::now(); update(); }