~mir-team/mir/development-branch

Viewing all changes in revision 3712.

  • Committer: Tarmac
  • Author(s): Christopher James Halse Rogers
  • Date: 2016-09-21 06:15:45 UTC
  • mfrom: (3700.2.11 master)
  • Revision ID: tarmac-20160921061545-57nw7l0b8lb01ev3
Prevent unnecessary reinitialisation of the compositor on display configuration (round 1)

We currently need to tear down and reinitialise the compositor on display changes because (a) we have no way of adding or removing compositors short of a full teardown/rebuild cycle and, worse (b) because the compositor takes a non-owning reference to a DisplayBuffer and display configuration will frequently destroy all existing DisplayBuffers.

Add an interface to the platform's Display to check when a display configuration change will *not* destroy existing DisplayBuffers. If it will not, that avoids problem (b), so check if any new outputs have been enabled. If neither of those are the case we can safely apply the display configuration without reinitialising the compositor.

Follow up work will enable this in the various graphics platforms.

Fixes (part one): https://bugs.launchpad.net/mir/+bug/1556142.

Approved by mir-ci-bot, Cemil Azizoglu, Alan Griffiths.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: