rendering costs of multibuffering

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • rendering costs of multibuffering

    My environment is an EFM32GG MCU with both the framebuffer and the display attached over a parallel interface (EBI bus). This combination gives me high frame rates for trivial screen content and with the example's default configuration of NUM_BUFFERS = 1 and NUM_VSCREENS = 3 in LCDconf.c. However, there is strong flickering and tearing.

    To reduce flickering and tearing, I customized LCDconf.c to NUM_BUFFERS = 2 or 3 and NUM_VSCREENS = 1. In addition, I call GUI_MULTIBUF_Begin()/_End(). The result: Flickering and tearing only goes away when using triple buffers. In addition, there is a massive drop in the screen update rate. Particularly expensive is calling GUI_MULTIBUF_Begin() with NUM_BUFFERS = 3.

    This is unexpected. Can you tell me why GUI_MULTIBUF_Begin() is so expensive to call for the NUM_BUFFERS != 1 case, or how I could eliminate flickering and tearing without loosing so much frame rate?

    Thanks,
    Kuno

    PS.: I just plan to use the rendering layer of emWin, but not the window manager.

    Source Code

    1. NUM_BUFFERS == 1:
    2. 245 fps
    3. 245 fps
    4. 244 fps
    5. 245 fps
    6. .. [GUI_MULTIBUF_Begin()] 0 ms/call, 2451 calls
    7. .. [TFT_DemoApp(NULL, TestModes256Emwin, TestModes256Emwin_count)] 4 ms/call, 2451 calls
    8. .. [GUI_MULTIBUF_End()] 0 ms/call, 2451 calls
    9. NUM_BUFFERS == 2:
    10. 34 fps
    11. 35 fps
    12. 35 fps
    13. 35 fps
    14. .. [GUI_MULTIBUF_Begin()] 24 ms/call, 352 calls
    15. .. [TFT_DemoApp(NULL, TestModes256Emwin, TestModes256Emwin_count)] 4 ms/call, 353 calls
    16. .. [GUI_MULTIBUF_End()] 0 ms/call, 353 calls
    17. NUM_BUFFERS == 3:
    18. 9 fps
    19. 9 fps
    20. 9 fps
    21. 9 fps
    22. .. [GUI_MULTIBUF_Begin()] 96 ms/call, 100 calls
    23. .. [TFT_DemoApp(NULL, TestModes256Emwin, TestModes256Emwin_count)] 4 ms/call, 100 calls
    24. .. [GUI_MULTIBUF_End()] 0 ms/call, 100 calls
    Display All

    The post was edited 1 time, last by kmeyer ().