libliftoff icon indicating copy to clipboard operation
libliftoff copied to clipboard

Prioritize layers that get updated more frequently

Open mupuf opened this issue 6 years ago • 2 comments

When using damages to perform composition, we can easily prevent doing any work for regions that did not change.

This means that if we have to chose between putting a layer on a plane which is seldom updated, or one that is updated all the time, we should choose the latter as it would lead to the least amount of blits.

One thing to consider is that if the layer is partially under another one, we will need to have the top layer also allocated to a plane in order to bring this benefit.

Thoughts?

mupuf avatar Oct 06 '19 20:10 mupuf

Note to self: "updated" can mean that the FB_ID is changed, but can also mean that CRTC_{X,Y,W,H} is changed. In both cases, we want to put the layer on a plane.

emersion avatar Oct 12 '19 11:10 emersion

We also need to figure out when the priority of a layer changes, to re-allocate planes (taking priority into account). However we don't want to re-allocate too often.

Maybe we could detect when the priority ordering between layers changes (e.g. when a layer gains a priority higher than the next layer). I'm a little bit worried about back-and-forth situations where we needlessly reallocate.

emersion avatar Oct 19 '19 08:10 emersion