Skip to content
Commit f1491e00 authored by David Edmundson's avatar David Edmundson
Browse files

Treat input RGB buffers as premultiplied

Summary:
Currently the server treats incoming buffers as not premultiplied.

KWayland::Client sends data that is ARGB32 and ARGB32_Premultiplied as
the same
WL_SHM_FORMAT_ARGB8888.

According to a post on wayland-devel by Fredrik Höglund, all RGB data
should be treated as premultiplied, which matches what Qt is doing.

Client now performs a conversion rather than sending
mismatched data,

Note: This commit will still breaks a bunch of tests in
kwin as it compares the server output to a fixed
QImage with a format.

Test Plan:
Existing tests pass

Modified surface test to check the pixel data relative to the output
QImage format
not the input format (i.e both input from ARGB32 and
ARGB32_Premultiplied) should
both end up in a QImage with format Premultiplied with premultiplied
values.

The existing test was confirming that data was corrupted, checking that
even though
the output format was not pre-multiplied, the data was.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, #frameworks

Tags: #plasma_on_wayland, #frameworks

Differential Revision: https://phabricator.kde.org/D7460
parent 9b564c40
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