OpenVG not-synchronized buffer options

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

OpenVG not-synchronized buffer options

590 Views
ioseph_martinez
NXP Employee
NXP Employee

Two options are available to draw into a surface without being synchronized with the DCU frame rate:

- Using pBuffer

- Using FBWS

eglSwapInteval is not supported from 0.4.0 to 0.6.0 so setting eglSwapInterval to 0 achieve this will not help. And if the user uses Pbuffer surface, the eglSwapInterval would not work even if it's supported, because in Pbuffer surface case the video sync is controlled by the application separately itself.

So, pBuffer can be used because is not linked to the windowing system (ie DCU) so they don't need to use eglSwapBuffers or eglSwapInterval.

Synchronization is done manually. This allows a lot of customization. For example:

(assume pBuffer are used, egl, openvg context and surfaces already initialized

draw()

{

     eglMakeCurrent(dsp, surf[current], surf[current], ctx[current]);

     //do all draw operations

     vgFinish()

     eglGetPbufferDimFSL(&pbd, dsp, surf[current]);

     bufferAdress = pbd.pByte;

     current = (current+1) % NUM_BUFFERS

     (you need to update the DCU layers now... or wait for vsync...)

}

In 0.6.0 release, you can configure FBWS to be single buffered to imitate the behavior of "interval = 0". See the example in tests/image/ovgmain.c.

FbdevInfo fb_info = {

        1,                           /* buf_count */

        FBDEV_VALUE_NOT_SPECIFIED,   /* x */

        FBDEV_VALUE_NOT_SPECIFIED,   /* y */

        FBDEV_VALUE_NOT_SPECIFIED,   /* width */

        FBDEV_VALUE_NOT_SPECIFIED,   /* height */

        FBDEV_VALUE_NOT_SPECIFIED,   /* stride */

        FBDEV_COLOR_ARGB8888         /* format */

    };

0 Kudos
0 Replies