Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-window management of resizing #53

Open
timholy opened this issue Aug 6, 2013 · 0 comments
Open

Per-window management of resizing #53

timholy opened this issue Aug 6, 2013 · 0 comments

Comments

@timholy
Copy link
Member

timholy commented Aug 6, 2013

Right now our resizing design is the following:

  • window-resizing triggers canvas callbacks
  • canvases are expected to call Tk.update() when finished so that the results are rendered to the screen.

That means that if you resize a window that has 9 canvases in it, then you get---you guessed it---9 calls to Tk.update() for a single change in the window size. Not only does this hammer performance, but it leads to amusing but distracting tearing artifacts as canvases sequentially redraw.

We need to switch to a design that registers canvases with windows. Any issues with a synchronous approach? The idea would be that the window resize() function is the only one registered as a callback, and this function calls each canvas's .resize() and .draw() functions in a loop. At the end, there's a single call to Tk.update().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant