<table><tr><td style="">davidedmundson created this revision.<br />Restricted Application added projects: Plasma on Wayland, Frameworks.<br />Restricted Application added subscribers: Frameworks, plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7460" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Currently the server treats incoming buffers as not premultiplied.</p>
<p>KWayland::Client sends data that is ARGB32 and ARGB32_Premultiplied as the same<br />
WL_SHM_FORMAT_ARGB8888.</p>
<p>According to a post on wayland-devel by Fredrik Höglund, all RGB data<br />
should be treated as premultiplied, which matches what Qt is doing.</p>
<p>I've changed client to perform a conversion rather than sending<br />
mismatched data, but this commit will still breaks a bunch of tests in<br />
the stable kwin branch as it compares the server output to a fixed<br />
QImage with a format.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Existing tests pass</p>
<p>Modified surface test to check the pixel data relative to the output QImage format<br />
not the input format (i.e both input from ARGB32 and ARGB32_Premultiplied) should <br />
both end up in a QImage with format Premultiplied with premultiplied values.</p>
<p>The existing test was confirming that data was corrupted, checking that even though<br />
the output format was not pre-multiplied, the data was.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R127 KWayland</div></div></div><br /><div><strong>BRANCH</strong><div><div>mart/xdgforeign</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7460" rel="noreferrer">https://phabricator.kde.org/D7460</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/client/test_drag_drop.cpp<br />
autotests/client/test_shadow.cpp<br />
autotests/client/test_shm_pool.cpp<br />
autotests/client/test_wayland_seat.cpp<br />
autotests/client/test_wayland_subsurface.cpp<br />
autotests/client/test_wayland_surface.cpp<br />
src/client/buffer.h<br />
src/client/shm_pool.cpp<br />
src/server/buffer_interface.cpp</div></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, Frameworks, leezu, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein, lukas<br /></div>