On Wed, Jun 14, 2023 at 7:13 PM Daniel Stone <dan...@fooishbar.org> wrote:

> Hi Joe,
>
> On Wed, 14 Jun 2023 at 21:33, Joe M <brainsna...@yahoo.com> wrote:
>
>> Thanks Daniel. Do you know if wl_output instances are decoupled from each
>> other, when it comes to display refresh?
>>
>
> Yep, absolutely.
>
>
>> The wl_output geometry info hints that each output can be thought of as a
>> region in a larger compositor canvas, given the logical x/y fields in the
>> geometry. Is the compositor able to handle the repaint scheduling in a
>> refresh-aware way?
>>
>
> Yes.
>
>
>> I'm trying to get a better understanding of how these pieces interact to
>> maximize draw time but still hit the glass every frame. The various blog
>> posts and documentation out there are pretty clear when it comes to drawing
>> to a single physical display, but less so when multiple displays are in use.
>>
>
> Per-output repaint cycles are taken as a given. You can assume that every
> compositor does this, and any compositor which doesn't do this is so
> hopelessly broken as to not be worth considering.
>

You can use the wp_presentation extension API to get real-time measurements
about how long elapsed between the moment you submit an updated buffer and
when it hits the glass. If you work backward from that number, you can
figure out how long beforehand to start your drawing so that you can get
minimally stale rendered contends but not drop any frames.


> Cheers,
> Daniel
>

Reply via email to