967 views
in GUI Development by

Hi,

As discussed in this link https://ask.embedded-wizard.de/3495/dirty-area-disable , I have enabled the full screen update in ewmain.c with the Embedded Wizard V10.0 - IMXRT1170 stack.

But now we couldn't see any difference(i.e. Disabling the dirty area doesnt work) but with v9.2 when we tried long back its working.

Kindly find the code snippet inside which we triggered the InvalidateArea() to enforce a full screen update.

static void EwUpdate( XViewport* aViewport, CoreRoot aApplication )
{
  XBitmap*       bitmap;
  GraphicsCanvas canvas     = EwNewObject( GraphicsCanvas, 0 );
  XRect          updateRect = {{ 0, 0 }, { 0, 0 }};

  if ( !canvas )
    return;

  if ( DisplayInfo.UpdateMode == EW_BSP_DISPLAY_UPDATE_NORMAL )
  {
    bitmap = EwBeginUpdate( aViewport );

    /* redraw the dirty area of the screen */
    if ( bitmap  )
    {
      GraphicsCanvas__AttachBitmap( canvas, (XHandle)bitmap );
      CoreGroup__InvalidateArea( aApplication, EwNewRect( 0, 0, DisplayInfo.BufferWidth, DisplayInfo.BufferHeight ));
      updateRect = CoreRoot__UpdateGE20( aApplication, canvas );
      GraphicsCanvas__DetachBitmap( canvas );
      EwEndUpdate( aViewport, updateRect );
    }
  }
  else
  {
    int regions = CoreRoot__BeginUpdate( aApplication );

    while ( regions-- )
    {
      /* get rectangular area of the update region for scratch-pad buffer */
      if ( DisplayInfo.UpdateMode == EW_BSP_DISPLAY_UPDATE_SCRATCHPAD )
        updateRect = CoreRoot__GetUpdateRegion( aApplication, regions );

      /* iterate through all update areas */
      while ( EwBspDisplayGetUpdateArea( &updateRect ))
      {
        /* update the current subarea */
        bitmap = EwBeginUpdateArea( aViewport, updateRect );
        GraphicsCanvas__AttachBitmap( canvas, (XHandle)bitmap );        
        CoreRoot__UpdateCanvas( aApplication, canvas, updateRect.Point1 );
        GraphicsCanvas__DetachBitmap( canvas );
        EwEndUpdate( aViewport, updateRect );
      }

      if ( DisplayInfo.UpdateMode != EW_BSP_DISPLAY_UPDATE_SCRATCHPAD )
        break;
    }
    CoreRoot__EndUpdate( aApplication );
  }
}

Kindly check on this and help us on the same.

Best Regards,

Preethi S

Robert Bosch - India

1 Answer

0 votes
by
Hello Preethi,

how many FPS do you get with and without the additional InvalidateArea() function call?

Typically, the resulting FPS are limited / bound to the vertical display frequency (V-sync) - e.g. 60 FPS, or 30 FPS.

Do you have performance issues on your target?

Best regards,

Manfred.
by

Hi Manfred,

We are getting the same FPS with or without InvalidateArea() function call. i.e. on average we are getting 30 FPS.

Our V-sync is limited to 30 FPS.

Actually we need to check the worst case so that we thought of doing a full screen update by disabling the dirty area

Best Regards,

Preethi

by
Hi Preethi,

this means, the system is fast enough to make either partial screen updates or full screen updates within 33 ms.

In both cases, the system has to wait for the next V-sync.

Best regards,

Manfred.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...