scene: add support for damage tracking #3117
Conversation
299fbb2
to
862b1dd
Compare
862b1dd
to
1f394a2
Compare
1f394a2
to
e06ef74
Compare
e06ef74
to
67552d8
Compare
This is ready for review. |
67552d8
to
69f24da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if any compositor that doesn't already use wlr_output_layout will use the scene graph API. It seems like some integration there could save almost every compositor some boilerplate.
7304a26
to
790f3c5
Compare
Yes, likely, but I'd prefer to keep this as a separate patch (feel free to submit a PR built on top of this one!). One still unanswered question is how we should plug existing wlroots modules to the scene-graph. Should the scene-graph add support for |
Would this support |
Yes, of course. output-layout and the scene-graph will both stay optional and compositors will still be able to use one without the other. |
790f3c5
to
0379c42
Compare
635aaa9
to
eb5eaa9
Compare
eb5eaa9
to
700a6e3
Compare
e34c13a
to
7f64d90
Compare
Indeed, must've missed something in a refactoring. Fixed in "scene: fix wlr_scene_render_output offset". |
Here is a MWE for another issue I'm seeing. Run on DRM backend, move the (invisible) mouse cursor to generate redraws, notice the flickering rectangle, and click to exit. I'm still not very confident in my understanding of double-buffering and damage, but it looks like... maybe existing bits of scene aren't ending up being rendered to one of the buffers when a new output is created? I'm not actually sure whether the problem is specific to the scene-graph code. |
When providing non-zero layout-local coordinates to wlr_scene_render_output, the viewport should be translated by the given values. However the viewport was translated by the opposite values: when giving 42,42 the viewport's position would be set to -42,-42.
These allow describing an output's viewport inside the scene-graph.
This allows us to get damage tracking for free™.
7f64d90
to
7a01d98
Compare
Indeed, what you're seeing is a |
Not sure whether this belongs here or there, but with #3175 applied, I still get the behavior when the scene_output is created after the initial output_commit (MWE). |
I've updated this branch to call |
It's possible that I missed that push. I'll give it a full recheck and report back. |
Guess this one was PEBKAC - sorry about that! (I'm still trying to track down another issue with what looks like the wrong regions being damaged on my second monitor, but I don't have anything too useful yet.) |
LGTM! |
Introduce
wlr_scene_output
to have per-output state in the scene-graph.I've decided to not make
wlr_scene_output
awlr_scene_node
to make a clear cut between elements that are rendered on screen and viewports in the scene.Depends on: #1966Cage patch: cage-kiosk/cage#203