[do not merge] Surface state refactor#3143
Conversation
df98a70 to
4bd4111
Compare
74c6e43 to
0446b45
Compare
0446b45 to
48da88d
Compare
|
The design overall looks good to me! As mentioned on IRC maybe it's not worth it to have two separate interfaces, maybe both can be merged. Maybe it's possible to re-use
While this is correct from a protocol conformance point-of-view, this isn't great because this forces clients to re-render. For instance foot has optimizations for this particular case. Maybe the client's
Excellent!
Hm, why is that? It's pretty handy to be able to figure out what changed in a particular commit. For instance, if the sub-surface order hasn't changed, no need to re-arrange the scene-graph on parent commit.
Yeah, there is a bit too much magic going on in the functions computing damage. I'm not sure this should stay as-is, especially around the sub-surface logic. |
Making
Hmm, how so? I don't really see why would that change make clients re-render.
Well, a buffer isn't a difference between two objects, so it's not relative. Absolute/relative state could be renamed to surface-local/commit-local state respectively though, and
Yes, the only
Fair point. I originally thought that change would make state squashing simpler, but actually it doesn't really add much complexity so I guess it could be left. |
48da88d to
beabcc3
Compare
|
Merged extension interfaces, returned |
|
This needs a rebase, now that the first part of this PR has been merged in #3169.
See the discussion in #2705 (comment), and the comment a bit below with a performance comparison table. "Immediate release" means the compositor uploads the shm buffer to the GPU on commit and then releases the buffer.
Right, I think that would make sense. We just need a way to make the buffer non-sticky. |
|
Closed by accident. As for buffer thing, none of that absolute/relative state matters anymore now that |
b408c60 to
f004186
Compare
|
Rebased on top of master, removed outdated info from the description. |
b9f20bc to
787c60c
Compare
|
Rebased against #3191. |
This is a prerequisite for next commits.
787c60c to
0408fbd
Compare
|
Closing as an outdated part of #3151. |
Also see individual commits.
State squashing
(The term
squashingis taken from Git, but maybe another word would fit here better.)"Squashing" refers to an action of combining a state with the state right before it in the queue. The older state becomes a "sum" of two states, and the newer state becomes empty.
Changes
wlr_surface.cachedis replaced withwlr_surface.stateswhich also includeswlr_surface.currentandwlr_surface.pendingIt makes squashing easier, removing potential corner cases with
wlr_surface.{current,pending}.Data structure
The following data structure is maintained:
When a state is cached, a column of
cachedn+1states is added right before the last one (pending).When a surface extension is added, a row of
extensionk+1states is added. Note that rows have undefined order;wlr_surface_state::extensionsmust be treated as an unordered set.