Bug 434631

Summary: wp_viewporter support
Product: [Plasma] kwin Reporter: Robert Mader <robert.mader>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: hsantanna, kde, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=437115
Latest Commit: Version Fixed In:

Description Robert Mader 2021-03-19 17:46:30 UTC
This is a feature request for support of the wp_viewporter protocol[1]. There is some preexisting work pending[2] which unfortunately did not yet make it mainline yet.

Context:
While there's many interesting use-cases for the protocol (Xwayland among them), the main reason for the request is an experimental Firefox backend I'm working on[3]. It makes use of subsurfaces and viewports in order to offload certain work like scrolling from the browser to the Wayland compositor. Similar approaches in DirectComposition and CoreAnimation have been proven to offer significant power savings and are used by Firefox (and others) for a while now.

There is now a working demo client which makes use of Webrender, using that technology[4]. All compositors but Weston so far have shown deficits to run it, therefore I'm now trying to give compositor devs headsups so things are in place once the new backend is production ready :)

1: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/stable/viewporter/viewporter.xml
2: https://phabricator.kde.org/D26171
3: https://bugzilla.mozilla.org/show_bug.cgi?id=1699754
4: https://bugzilla.mozilla.org/show_bug.cgi?id=1695500
Comment 1 Robert Mader 2021-03-20 17:10:09 UTC
FTR, the new FF backend can already be tested quite easily - if you want to give it a go to check if it runs well on KWin:
```
git clone https://github.com/servo/webrender.git
cd webrender/example-compositor/compositor
cargo run native [large|small|scroll] swap 1300 520
```
Comment 2 Robert Mader 2021-05-17 13:32:52 UTC
Initial support for this landed in Firefox nightly (https://bugzilla.mozilla.org/show_bug.cgi?id=1699985)

You can turn it on by setting `gfx.webrender.compositor.force-enabled` to `true` using the Wayland backend.
Comment 3 Robert Mader 2021-05-17 23:43:29 UTC
Err, looks like it's already supported. Sorry, never mind. And awesome!
Comment 4 David Edmundson 2021-05-18 08:38:37 UTC
It is, yeah. 
I had left this open to explicitly test firefox/webrenderer which we never got round to do doing, but we can reopen if we find specific issues.