Skip to content
Commit 1fb44b5b authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

effects/screenshot: Prepare for versioned dbus interface

On Wayland, when the compositor sends a screenshot to the requesting
app, it encodes the screenshot as a PNG image and sends the encoded data
over the pipe. The requesting app (Spectacle) then needs to decode the
data.

The issue is that encoding PNG images is not cheap. This is the main
reason why Spectacle is shown with a huge delay after you press the
PrtScr key.

In order to fix the latency issue, we need to transfer raw image data.
Unfortunately, the current dbus api of the screenshot is too cluttered
and the best option at the moment is to start with a clean slate.

This change prepares the screenshot effect for versioned dbus interface.
Most of existing dbus logic was moved out in a separate class. In order
to schedule screen shots, the screenshot effect got some new API.

    QFuture<QImage> scheduleScreenShot(window, flags)
    QFuture<QImage> scheduleScreenShot(area, flags)
    QFuture<QImage> scheduleScreenShot(screen, flags)

If a dbus i...
parent 38996d97
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment