Currently, the OpenGLBackend and the QPainterBackend have hooks to
indicate the start and the end of compositing cycle, but in both cases,
the hooks have different names. This change fixes that inconsistency.
In order to allow per screen rendering, we need the Compositor to be
able to drive rendering on each screen. Currently, it's not possible
because Scene::paint() paints all screen.
With this change, the Compositor will be able to ask the Scene to paint
only a screen with the specific id.
Listen to logind for resume notification and turn the outputs on when it
happens, much like we do when pressing a key.
This way laptops come back on when the lid opens.
BUG: 428424
They would override KScreen in case we were using a dock station that
brings 2 displays.
We'd get:
- udev: event for the first hotplughed screen
- kwin: process all screens properly (both)
- kscreen: would offer the right configuration for such displays
- udev: process the event for the second hotplug udev event
- kwin: restore the configuration
- kscreen: would think this is a conscious decision and embrace it as a
configuration
With this change we are only re-reading the configuration in case the
outputs changed.
At the moment, despite the protocol supporting it, we were not feeding
the EDIDs. KScreen was falling back to the output name so it didn't fail
horribly but it's still a good idea to provide all the data.
When dragging files on the desktop, the cursor image might be just too
big for the cursor plane, in which case we need to abandon hardware
cursors for a brief moment and use a software cursor. Once the files
have been dropped and the cursor image is small enough, we can go back
to using hw cursors.
BUG: 424589
Currently, if there is no pointer, only the hardware cursor will be
hidden. If the software cursor is forced, you are going to see a dead
immovable cursor.
If an output is rotated, we will compute a transform matrix for the
cursor plane to rotate its contents.
In order to compute that matrix we need the rect of the cursor in the
device-independent pixels, the scale factor and the output transform.
The problem is that we provide a rect of the cursor in the native
pixels. This may result in the cursor being partially or fully clipped.
CCBUG: 424589
If a cursor animation is driven purely by frame callbacks and kwin
uses hardware cursors, the cpu usage may spike to 100%.
This change addresses that issue by sending frame callbacks after a
compositing cycle has been performed.
Currently, flip output transformations in the software fallback code
path are equivalent to normal rotate output transformations.
This change implements flip output transformations according to the
wl_output spec.
Currently, when the DRM platform uses cursor planes, the cursor on
a rotated output may be cropped because the math behind the current
cursor transform matrix is off.
In order to fix the cropping issue, this change replaces the current
cursor transform matrix with the core part of the surface-to-buffer
matrix, which was written against the wl_output spec.
BUG: 427605
CCBUG: 427060
Currently, every time compositing is restarted, both the gbm and the egl
streams backend will re-obtain the EGLDisplay object.
This is wrong because the core assumption is that the EGL display doesn't
change once it has been obtained.
On some devices, the GPU nodes are also added as /dev/dri/cardX, they
are not useful for KMS purposes and does not have display resources.
If we encounter such cards, then skip them.
Every time Platform::supportsQpaContext() is called, we go through the
list of supported extensions and perform a string comparison op. This is
not really cheap.
This change replaces the remaining usages of the old connect syntax with
the new connect syntax.
Unfortunately, there are still places where we have to use SIGNAL() and
SLOT() macros, for example the stuff that deals with d-bus business.
Clazy was used to create this change. There were a few cases that needed
manual intervention, the majority of those cases were about resolving
ambiguity caused by overloaded signals.
Uses a setter and clear method pattern rather than having the code
repeated.
Instead of keeping a QPointer, now we are a QObject and we get notified
about destruction intention directly, so we can clear the pointer when
necessary.
Summary:
Notify the driver about the parts of the screen that will be repainted.
In some cases this can be benefitial. This is especially useful on lima
and panfrost devices (e.g. pinephone, pinebook, pinebook pro).
Test Plan:
Tested on a pinebook pro with a late mesa version.
Basically I implemented it, then it didn't work and I fixed it.
Maybe next step we want to look into our damage algorithm.