Commit b18a576
committed
Speed up canvas redraw for GTK3Agg backend.
Move `_render_figure()` call out of `on_draw_event` handler
in `FigureCanvasGTK3Agg` class and call it from overloaded
`draw()` method.
Fixes #12010
Gtk triggers `draw` event not only when actual plot redraw
required but also when any another widget drawn over canvas.
This makes application with embided plot unresponsive in cases
when popover or popup menu are drawn over plot.
You may try example provided in #12010.
Moving actual plot redraw out of `on_draw_event()` makes GUI
much more responsive.
This changes tested with:
* animation from examples/ directory
* interacive pan and zoom
* cursor widget with bliting
* calling draw_idle() to update interactive chart1 parent 21ec4fc commit b18a576
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
0 commit comments