Restore paint-panel timing.
authorCarl Hetherington <cth@carlh.net>
Sun, 12 May 2019 20:19:59 +0000 (21:19 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 12 May 2019 20:19:59 +0000 (21:19 +0100)
src/wx/film_viewer.h
src/wx/gl_video_view.cc
src/wx/simple_video_view.cc

index b897282..450111b 100644 (file)
@@ -101,6 +101,10 @@ public:
                return _state_timer;
        }
 
+       StateTimer& state_timer () {
+               return _state_timer;
+       }
+
        int gets () const {
                return _gets;
        }
index 39d418c..39532ab 100644 (file)
@@ -69,9 +69,11 @@ static void
 void
 GLVideoView::paint ()
 {
+        _viewer->state_timer().set("paint-panel");
        _canvas->SetCurrent (*_context);
        wxPaintDC dc (_canvas);
        draw ();
+       _viewer->state_timer().unset();
 }
 
 void
index 524106b..0a0fce2 100644 (file)
@@ -46,6 +46,7 @@ SimpleVideoView::SimpleVideoView (FilmViewer* viewer, wxWindow* parent)
 void
 SimpleVideoView::paint ()
 {
+        _viewer->state_timer().set("paint-panel");
        wxPaintDC dc (_panel);
 
 #ifdef DCPOMATIC_VARIANT_SWAROOP
@@ -117,6 +118,7 @@ SimpleVideoView::paint ()
                dc.SetBrush (*wxTRANSPARENT_BRUSH);
                dc.DrawRectangle (inter_position.x, inter_position.y + (panel_size.GetHeight() - out_size.height) / 2, inter_size.width, inter_size.height);
        }
+        _viewer->state_timer().unset();
 }
 
 void