Avoid copying buffer twice
ClosedPublic

Authored by jgrulich on Wed, Mar 25, 9:53 AM.

Details

Summary

Previously we copied frames first to a temporary QImage and then to PipeWire buffer. This shouldn't be
necessary as we can copy frames directly to PipeWire buffers which should be much more effecient.

BUG: 419209

Diff Detail

Repository
R838 Flatpak Support: KDE Portal for XDG Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jgrulich created this revision.Wed, Mar 25, 9:53 AM
Restricted Application added a project: Plasma. · View Herald TranscriptWed, Mar 25, 9:53 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
jgrulich requested review of this revision.Wed, Mar 25, 9:53 AM
zzag added a subscriber: zzag.Wed, Mar 25, 1:32 PM
zzag added inline comments.
src/screencaststream.cpp
549–563

Do we actually need an fbo?

meven added a subscriber: meven.Wed, Mar 25, 1:49 PM

Seems good to me

zzag accepted this revision.Wed, Mar 25, 1:55 PM
This revision is now accepted and ready to land.Wed, Mar 25, 1:55 PM
This revision was automatically updated to reflect the committed changes.
ahiemstra added inline comments.
src/screencaststream.cpp
549–563

The entire framebuffer is superfluous, it is never used. glGetTexImage() reads from the currently bound texture, which in this case is "texture" since you bind it at line 546.

zzag added inline comments.Thu, Mar 26, 11:36 AM
src/screencaststream.cpp
549–563