GUI_SetOrientationEx leads to slow redrawing and GUI page change

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

    • GUI_SetOrientationEx leads to slow redrawing and GUI page change

      Hello,

      I have developed a GUI with STemWin libraries for a 4.3" display.
      Now I need to rotate all the application upside down so in my code I called the function GUI_SetOrientationEx in the following way:

      Source Code

      1. GUI_Init();
      2. // Enable the automatic use of Multiple Buffering with Windows Manager (WM)
      3. WM_MULTIBUF_Enable(1);
      4. if (GUI_SetOrientationEx(GUI_MIRROR_Y | GUI_MIRROR_X, 0) == 1)
      5. printf("Hor Flip layer 0 failed\n");
      6. if (GUI_SetOrientationEx(GUI_MIRROR_Y | GUI_MIRROR_X, 1) == 1)
      7. printf("Hor Flip layer 1 failed\n");
      8. ...
      Display All
      Compared to the plain GUI without those rotations the interface is really slow (approximately 3x slower) when redrawing and changing page.

      Is this the normal consequence of using this kind of functions (GUI_SetOrientationEx) and what can be done to improve the redrawing?

      Is there something else I can do or another way to have the same result of turning my application upside down using other functions and improving performances?

      Thank you!

      Mark
    • Hi,

      GUI_SetOrientation() always worsens the performance since it uses a rotation device. What will probably work better is changing the display driver to rotate the screen, GUIDRV_Lin and GUIDRV_FlexColor still offer a good performance when rotated.

      To mirror the X and Y axis and use e.g. 32bpp, change the DISPLAY_DRIVER define in your LCDConf.c to:

      C Source Code

      1. #define DISPLAY_DRIVER GUIDRV_LIN_OXY_32
      You'll find a full list of all supported orientations and color depths of this driver in the manual under "34.7.6 GUIDRV_Lin".

      Best regards,

      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.