AbstractWaylandOutput and output device consolidation
Closed, ResolvedPublic

Description

With AbstractOutput all backends have a common parent class and Wayland session ones the subclass AbstractWaylandOutput. The later one includes all the necessary functionality for creation of KWayland::Server::OutputDeviceInterface objects.

Goal 1: Let all backends use the AbstractWaylandOutput functions instead of the alternative code path in WaylandServer::syncOutputsToWayland.
D23473 D23477 D23478 D23479 D23485

Goal 2: Make sure an output device always exists for an output. Remove unnecessary checks.
D23486

Goal 3: Single source of truth for data in output device objects (remove data duplication in AbstractWaylandOutput).
D23489 D23493 D23495 D23496 D23546

Goal 4: Improve robustness of basic output functionality
D23591 D23600 D23602

Related Objects

Mentioned In
D24112: [platforms/drm] Disable transformations
R108:df3c1de8484e: [platforms/drm] Rework enablement and dpms switching
R108:732610bd8fba: [platforms/drm] Early platform and outputs teardown
R108:5cc626c10261: Remove outputs handling alternative
R108:331f5d7da7b9: Get output physical size from output device
R108:dbb2cede087a: Get output pixel size from output device
R127:ce5e25a4b63c: [server] Cache current mode
R108:819609a8a6b4: Get output position and scale from output device interface
R108:0bcfb4d609ea: Rely on output device existence
D19860: Software rotation: orient the screen regardless of whether drm accepted it
R108:edb200f6bcd5: [platforms/x11/windowed] Create output devices
R108:d960be4b3f39: [platforms/fbdev] Create output device
R108:cd6b69a4d2db: [platforms/virtual] Create output devices
R108:f013a4369c2e: [platforms/wayland] Create output devices
Mentioned Here
D23602: [platforms/drm] Early platform and outputs teardown
D23600: [platforms/drm] Rework enablement and dpms switching
D23546: Get name and refresh rate from output device
D23591: [platforms/drm] Disable orientation sensor for now
D23496: Get output physical size from output device
D23495: Get output pixel size from output device
D23493: [server] Cache current mode
D23489: Get output position and scale from output device interface
D23486: Rely on output device existence
D23485: Remove outputs handling alternative
D23477: [platforms/virtual] Create output devices
D23478: [platforms/fbdev] Create output device
D23479: [platforms/x11/windowed] Create output devices
D23473: [platforms/wayland] Create output devices

Does hwcomposer platform also need similar change?

romangg added a comment.EditedAug 27 2019, 8:23 AM

Does hwcomposer platform also need similar change?

It already calls handleOutputs() so I ignored it, but thinking about it again it also doesn't create the output device yet, so yes. Scratch this: it does indeed create the output device already in the HwcomposerOutput constructor. So no changes needed.

romangg updated the task description. (Show Details)Aug 30 2019, 11:50 PM

Added Goal 4.

ognarb added a subscriber: ognarb.Sep 27 2019, 1:30 PM
mart added a subscriber: mart.Oct 18 2019, 8:25 AM
romangg moved this task from Backlog to Work In Progress on the KWin board.Oct 21 2019, 8:23 AM
romangg closed this task as Resolved.Dec 11 2019, 3:42 AM
romangg moved this task from Work In Progress to Done on the KWin board.

What needs to be done still:

  • Switched off monitors not being part of logical space
  • Replication
  • Check if atomic configuration is correct and otherwise send failed event back

Priority from top to down. Will be split out into new tasks. This task as a first step of overall improvement is done.