Re: frame callbacks and sub_surfaces

2022-11-07 Thread Pekka Paalanen
On Sat, 5 Nov 2022 16:14:44 -0700
Joel Winarske  wrote:

> Okay thanks for the input.  I sorted it out, and it's working great.
> 
> My learning - Simply implement a frame callback for each sub surface and
> base surface, empty or otherwise.  No need for any other commit calls.
> 
> What is the recommended solution for counting frame rate with sub
> surfaces? 

Are you not usually interested about how many times you have re-drawn?
So you'd count have times you draw, subject to what whatever frame rate
throttling you choose to use.

> Does the base surface ever get occluded?

Anything could be occluded or off-screen at any time.

However, if parent surface is completely occluded/off-screen, then that
should not freeze any of its sub-surfaces that are visible, even if
they are in synchronized mode. So I think the implication of that is
that if any sub-surface is visible, then the parent surface should be
reporting frame callbacks and do everything else as if it was visible
too.

A good question, I wonder if anyone tests compositors for that...

I'm not sure if even Weston handles that correctly.

This is not explicitly mandated by the protocol specification IIRC, it's
more about compositors doing what would look right to an end user.


Thanks,
pq


pgpNhg2ESchqJ.pgp
Description: OpenPGP digital signature


Re: frame callbacks and sub_surfaces

2022-11-07 Thread Michel Dänzer
On 2022-11-07 10:27, Pekka Paalanen wrote:
> On Sat, 5 Nov 2022 16:14:44 -0700
> Joel Winarske  wrote:
> 
>> Does the base surface ever get occluded?
> 
> Anything could be occluded or off-screen at any time.
> 
> However, if parent surface is completely occluded/off-screen, then that
> should not freeze any of its sub-surfaces that are visible, even if
> they are in synchronized mode. So I think the implication of that is
> that if any sub-surface is visible, then the parent surface should be
> reporting frame callbacks and do everything else as if it was visible
> too.
> 
> A good question, I wonder if anyone tests compositors for that...
> 
> I'm not sure if even Weston handles that correctly.
> 
> This is not explicitly mandated by the protocol specification IIRC, it's
> more about compositors doing what would look right to an end user.

There's https://gitlab.freedesktop.org/wayland/wayland/-/issues/266 about this.


-- 
Earthling Michel Dänzer|  https://redhat.com
Libre software enthusiast  | Mesa and Xwayland developer



Re: frame callbacks and sub_surfaces

2022-11-07 Thread Joel Winarske
> There's https://gitlab.freedesktop.org/wayland/wayland/-/issues/266 about
this.

Thanks, yes I have that book marked.

@pq
I think this approach might better suit our use cases (CI health gate /
client regression testing):
https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/24

I would be happy to push this forward, seeing it hasn't moved much.

Joel