Avoid deep copy of image data when getting pixmaps in SNIs

Authored by davidedmundson on Apr 30 2017, 4:33 PM.



We get the data as a QByteArray we can just ref the original data,
rather than doing a deep copy of the data.

Might save a few cycles when we have an SNI animating.

Test Plan

Ran an app that I know uses xembedsniproxy which always sends data as an image
Still had an icon in the system tray as before

Diff Detail

R120 Plasma Workspace
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Apr 30 2017, 4:33 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 30 2017, 4:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
markg accepted this revision.Apr 30 2017, 11:41 PM
markg added a subscriber: markg.
markg added inline comments.

Unrelated to your commit, i know.

Is there a reason why this is done at runtime?

// convert.. with qFromLittleEndian for instance

Just curious.


Very smart! I didn't even know that was possible.
The cast should change to a C++ style cast though.

This revision is now accepted and ready to land.Apr 30 2017, 11:41 PM
This revision was automatically updated to reflect the committed changes.