Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Prioritize layers that get updated more frequently #22

Open
mupuf opened this issue Oct 6, 2019 · 2 comments
Open

Prioritize layers that get updated more frequently #22

mupuf opened this issue Oct 6, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@mupuf
Copy link

mupuf commented Oct 6, 2019

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?

@emersion
Copy link
Owner

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
Copy link
Owner

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 added a commit that referenced this issue Nov 15, 2019
Keep track of the number of layer updates per 60 page-flips.

We could implement a more fine-grained tracking, for instance with a sliding
window. However it's a lot more complex than the current solution and the gains
are not clear. I'd prefer to keep the current solution and experiment with other
solutions once we have a good test-bed.

References: #22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants