Do I need wl_frame_callback at all?
Martin Stransky
stransky at redhat.com
Wed Nov 20 11:15:53 UTC 2019
On 11/20/19 12:12 PM, Scott Anderson wrote:
> On 21/11/19 12:03 am, Martin Stransky wrote:
>> Hi guys,
>>
>> what happens and is it a correct behavior when application does not
>> use wl_frame_callback at all and just do the drawing
>> (wl_surface_commit) whatever it has a data do draw?
>>
>> I know it may be sub-optimal to draw more frequently but I'd need to
>> cache the visual data elsewhere otherwise so it easier for me to just
>> put it at compositor instead to store it offscreen and then copy it to
>> wl_buffer when wl_frame_callback comes.
>>
>> Thanks,
>> ma.
>
> Hi
>
> It's perfectly legal in the protocol to commit whenever you want to. The
> frame event is just a suggestion. Nothing is stopping anyone from
> rendering and committing at 1000 frames per second, other than people
> asking you to stop being so wasteful.
>
> Wayland uses the "mailbox" model (this is Vulkan terminology), so the
> compositor will just use whatever the current commit is at the time it
> does its composition.
So do you mean in this scenario:
-- composition
---- commit A
---- commit B
---- commit C
-- composition
only 'commit C' is painted and A/B are lost?
Martin
> Scott
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
--
Martin Stransky
Software Engineer / Red Hat, Inc
More information about the wayland-devel
mailing list