How double buffering works in Wayland / Weston?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How double buffering works in Wayland / Weston?

3,749 Views
prasannakumar_m
Contributor II

I am having a iMX6Q platform. In that weston uses framebuffer back end. Weston's framebuffer back end does not support double buffering or vsync.

I have 2 questions in this case:

  1. How double buffering is implemented?
  2. How tearing is avoided?

Thanks in advance for the help.

4 Replies

1,925 Views
mtx512
Contributor V

For framebuffer backend you can enable double buffering with:


export FB_MULTI_BUFFER=2


Change to 3 for triple buffering.

1,925 Views
prasannakumar_m
Contributor II

Thanks for the info. Weston calls FBIO_WAITFORVSYNC and FBIOPAN_DISPLAY ioctls.

I guess weston is modified to support double buffering as upstream wayland / weston does not support double buffering with framebuffer backend. Is it so?

0 Kudos

1,925 Views
mtx512
Contributor V

This done by using  eglSwapBuffers in the weston code base (possibly gl-renderer.c). The vivante library libGAL-wl.so contains the string FB_MULTI_BUFFER and therefore must contain the code to switch between front & back buffers.

1,925 Views
prasannakumar_m
Contributor II

Makes sense.

Thanks for the reply. It helps a lot :smileyhappy:.

0 Kudos