Skip to content

Conversation

Ottatop
Copy link
Collaborator

@Ottatop Ottatop commented Sep 19, 2025

This PR implements ext-image-capture-source and ext-image-copy-capture. Most importantly, this enables window capture.

The git version of xdg-desktop-portal-wlr is recommended for pipewire window capture until they make a new release.

Todos:

  • Cursor sessions
  • Dedup with the wlr-screencopy impl somewhat Ok lowkey I'm looking to remove this sometime in the future so I'm not gonna bother
  • Check xwayland window capture
  • Fix damage when the output is scaled
  • Check if it works when the output is transformed
  • Probably don't render decorations when capturing windows
  • Make window capture work when the window isn't visible
    • Given that this doesn't work in sway I'm pushing this off
  • Investigate optimizations for output capture
    • Update: let's not overcomplicate this for now
    • The current wlr-screencopy impl works by copying the results of the next frame that will be displayed on an output. This requires minimal overhead. However, the current impl of copy-capture renders new frames from scratch for each active capture session, similar to what Niri does. I believe this is required for toplevel capture, but it may be worthwhile to port the copying parts of the wlr-screencopy impl when doing output capture. Or roll that in when deduping.
  • Left an empty file in there
  • Stop sessions when output/window disappears
  • Final cleanup and perf testing
  • Probably a bunch of other stuff

@Ottatop Ottatop mentioned this pull request Sep 4, 2025
18 tasks
@Ottatop Ottatop marked this pull request as draft September 19, 2025 05:51
@Ottatop Ottatop force-pushed the image-copy-capture branch 2 times, most recently from ec7b9d4 to c729366 Compare September 20, 2025 09:34
@Ottatop Ottatop force-pushed the image-copy-capture branch 4 times, most recently from 62f1150 to 5b5f6b6 Compare October 10, 2025 03:24
@Ottatop Ottatop force-pushed the image-copy-capture branch from 4c8066c to 73902d2 Compare October 10, 2025 04:16
@Ottatop Ottatop marked this pull request as ready for review October 10, 2025 04:28
@Ottatop Ottatop merged commit 0ae63ff into main Oct 10, 2025
4 checks passed
@Ottatop Ottatop deleted the image-copy-capture branch October 10, 2025 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant