Mir

Code review comment for lp:~kdub/mir/compositor-double-start-stop

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Andreas, Alexandros, Kevin and I are all agreed that calling start twice is a precondition violation, so lets take that as our premise.

Ideally preconditions are the responsibility of the calling code so my first inclination would be to fix that.

But as existing code is hitting this condition then a better diagnostic is the least we can do. We can certainly provide better information than "error during eglMakeCurrent"!

In DBusScreen::setScreenPowerMode() it looks as though start() will be called whenever 'mode == "on"' - regardless of the existing mode.

As Alexandros comments though it would be good to understand what the client code is intending - if the compositor really needs to be stopped when reconfiguring the display then it probably shouldn't be client code responsibility.

« Back to merge proposal