Hi all,

I have an application which works in triple buffering mode and flips buffers
with DSFLIP_ONSYNC flag (DSFLIP_WAIT flag is not used) - it's based on
df_andi scheme. If time of rendering one animation frame is less than time
between two VSyncs, it's possible to achieve following situation:
- buffer number 1 contains already rendered animation frame and it's already
displayed on the screen,
- next animation frame is rendering in buffer number 2 and when it's ready
Flip is calling - it returns immediatelly, physical buffers flip will be
performed on next VSync, application starts drawing on buffer number 3,
- next animation frame is rendering in buffer number 3 and when it's ready
Flip is calling - it returns immediatelly, physical buffers flip will be
performed on next VSync. Note that none VSync comes yet, so buffer number 1
is still visible,
- application starts to render next animation frame in buffer number 1,
which is still displaying.
Result: tearing is visible on the screen.

There can be few methods for solving this issue, so the question is: what is
the better method to fix it according to DirectFB design? Does 2nd flip
should be blocking in this case and wait for VSync (even without DSFLIP_WAIT
flag set)? Or maybe 1st flip should be skipped in this case and 2nd flip
should switch drawing buffer to number 2 instead of buffer 1? Or maybe
application should handle such case itself - but how?

Cheers,
Mike
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to