[effects/screenshot] Upload data to xpixmap in chunks
ClosedPublic

Authored by zzag on May 23 2019, 8:27 PM.

Details

Summary

xcb_put_image doesn't handle big images well. Contrary to XPutImage, the
caller must manually split the data in such a way that each xcb_put_image
request doesn't exceed the maximum request length. Not doing so will result
in libxcb shutting down the connection.

CCBUG: 338489
CCBUG: 388182

Test Plan

Take a screenshot of an active fullscreen client on a 4K monitor.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.May 23 2019, 8:27 PM
Restricted Application added a project: KWin. · View Herald TranscriptMay 23 2019, 8:27 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.May 23 2019, 8:27 PM
zzag added a comment.May 23 2019, 8:27 PM

I'm targeting 5.16.X.

zzag edited the test plan for this revision. (Show Details)May 23 2019, 8:33 PM
zzag added a comment.May 23 2019, 8:39 PM
This comment was removed by zzag.
zzag updated this revision to Diff 58558.May 23 2019, 9:02 PM
  • Fix coding style: align references to right
zzag updated this revision to Diff 58559.May 23 2019, 9:18 PM

Reword a comment.

davidedmundson accepted this revision.Mon, May 27, 12:39 PM
davidedmundson added a subscriber: davidedmundson.

Makes sense and the low level part matches Qt's implementation.

++

This revision is now accepted and ready to land.Mon, May 27, 12:39 PM
This revision was automatically updated to reflect the committed changes.