Mir

Changing scale, formFactor or DPI in display configuration causes renderer teardown/recreate unnecessarily

Bug #1556142 reported by Gerry Boland on 2016-03-11
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Chris Halse Rogers
mir (Ubuntu)
Undecided
Unassigned

Bug Description

DisplayConfiguration contains the properties scale, form factor and dpi, which is information graphical toolkits can use when drawing their UIs.

However if the shell changes any of these values, it causes the server MultiThreadedCompositor to tear down the renderer, release the GL context, create a new GL context and build a new renderer. This can result in a UI flicker.

It would be nice to avoid this unnecessary tear-down/recreate cycle for DisplayConfiguration changes that don't require it.

However then, need an API to allow QtMir detect those properties changed. Currently QtMir only checks for DisplayConfiguration change when the compositor restarts, because no notification API was available.

Related branches

Daniel van Vugt (vanvugt) wrote :

Yeah, seems to be an ongoing issue. A while back I reported the same bug for screen rotation, which Cemil fixed. However scale, formFactor and DPI are all features that have been added since then. So more fixing is required.

Changed in mir:
importance: Undecided → Medium
status: New → Triaged
Gerry Boland (gerboland) wrote :

We need this for lp:1545088, raising priority

Changed in mir:
importance: Medium → High
Chris Halse Rogers (raof) wrote :

I'm in poking around in display configuration at the moment, I'll fix this while I'm there.

Changed in mir:
assignee: nobody → Chris Halse Rogers (raof)
Changed in mir:
milestone: none → 0.25.0
status: Triaged → In Progress
Daniel van Vugt (vanvugt) wrote :

According to raof's branch only part of the final fix has landed so far. Still in progress.

Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.25.0

Changed in mir:
status: In Progress → Fix Committed
Daniel van Vugt (vanvugt) wrote :

Almost there. Two branches down, one to go.

Changed in mir:
status: Fix Committed → In Progress
Changed in mir:
milestone: 0.25.0 → 0.26.0
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.26.0

Changed in mir:
status: In Progress → Fix Committed
Gerry Boland (gerboland) wrote :

Question on this work: QtMir checks for changes in the display configuration whenever the compositor is stopped and restarted. With this fix, how can I as a nested shell identify display configuration changes? Something equivalent to mir_connection_set_display_config_change_callback that clients have.

Gerry Boland (gerboland) wrote :

Ah sorry, I see you added an interface exactly for that. Plz ignore

Gerry Boland (gerboland) wrote :

So mir::graphics::Display gained a method:

+ virtual bool apply_if_configuration_preserves_display_buffers(DisplayConfiguration const& conf) const = 0;

which means the only way I as qtmir can notice this is by subclassing this, but I don't see how.

So my original question remains

Changed in mir:
status: Fix Committed → In Progress
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision 3821, scheduled for release in mir, milestone 0.26.0

Changed in mir:
status: In Progress → Fix Committed
Daniel van Vugt (vanvugt) wrote :

Still at least one more branch pending.

Changed in mir:
status: Fix Committed → In Progress
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.26.0

Changed in mir:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (7.2 KiB)

This bug was fixed in the package mir - 0.26.0+17.04.20170126.3-0ubuntu1

---------------
mir (0.26.0+17.04.20170126.3-0ubuntu1) zesty; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.26.0 (https://launchpad.net/mir/+milestone/0.26.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI bumped to 43
      . mircommon ABI unchanged at 7
      . mirplatform ABI unchanged at 14
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI unchanged at 11
      . mirclientplatform ABI unchanged at 5
      . mirinputplatform ABI unchanged at 6
      . mircore ABI unchanged at 1
    - Enhancements:
      . New/improved toolkit APIs: MirInputConfig and related functions,
        MirWindow and related functions, DisplayConfig and related functions,
        MirScreencastSpec and related functions,
      . Support for configuring input configuration
      . Introduce toolkit extension mechanism for platform specific APIs.
      . Toolkit extensions for: mesa_drm_auth, set_gbm_device and
        window_coordinate_translation
      . Screencasting to a specific MirBuffer.
      . Add DisplayConfigurationController::base_configuration() so downstreams
        can get the base configuration. (Weirdly they can already set it.).
      . x11 platform: allow adjustable scale parameter.
      . Added EDID support: client API, server logging and in mirout.
      . mirout: Add newer attributes only available in the new display
        config API: scaling factor, subpixel arrangement and form factor.
      . mirout: Log the orientation and logical size of each output too.
      . Replace the mir::Server-overridable Reports with Observers.
      . Add xkbcommon to mirclient.pc Requires.private.
      . Deprecate legacy toolkit APIs that will be removed in Mir 1.0
      . Introduced 'client-side vsync', which dramatically reduces latency
        from the client to the screen (particularly for nested servers like
        Unity8).
    - Bugs fixed:
      . [performance] Restore support for better-than-triple buffering by
        default. (LP: #1240909)
      . Frame rate is artificially low on Diamondville Intel Atom systems due
        to aggressive power management (LP: #1388490)
      . [testsfail] failure in CI in
        AndroidInputReceiverSetup.slow_raw_input_doesnt_cause_frameskipping
        (LP: #1394369)
      . [trusted prompt sessions] Can't open two prompt sessions at the same
        time (LP: #1494197)
      . Changing scale, formFactor or DPI in display configuration causes
        renderer teardown/recreate unnecessarily (LP: #1556142)
      . [testsfail] ApplicationNotRespondingDetection.failure_to_pong_is_
        noticed (LP: #1570327)
      . CI failure in TestClientInput.receives_one_touch_event_per_frame
        (LP: #1570698)
      . Mir-on-X mouse input is jerky/stuttery compared to Mir-on-KMS
        (LP: #1576600)
      . [regression] Two fingers in mir_proving_server now resizes/moves app
        windows (two finger apps unusable) (LP: #1586311)
      . Pointer/cursor input lag in unity8 session (LP: #1591328)
      . PointerConfinement.test_we_update_our_confined_region_on_a_resize
      ...

Read more...

Changed in mir (Ubuntu):
status: New → Fix Released
Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers