Do I need wl_frame_callback at all?

Scott Anderson scott.anderson at collabora.com
Wed Nov 20 11:12:03 UTC 2019


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.

Scott


More information about the wayland-devel mailing list