468 views
in GUI Development by
Hi, My question is how many dirty area update regions can I get? and where I can access them? I read in one of the comment in some other post that 4 update regions are possible to get per frame. However, I can only receive one big update rect inside ewmain in the function Ewupdate().

 if ( bitmap && canvas )
  {
    GraphicsCanvas__AttachBitmap( canvas, (XUInt32)bitmap );
    updateRect = CoreRoot__UpdateGE20( aApplication, canvas );
    GraphicsCanvas__DetachBitmap( canvas );
  }
Part 2 of my question is: if my frequently changing widgets are close together. Can I have separate update rect for them? i can see through debugging mode in EW that a big green rect contains all of my updating widgets. instead of multiple dirty regions

Thanks.

1 Answer

0 votes
by
Hi Mariam,

the resulting "dirty area" is always one rectangle - also the green rectangle within the Prototyper shows the entire "dirty area".

However, internally the Mosaic framework is collecting up to three dirty regions and tries to minimize the resulting update area. Instead of adding all rectangular areas that have to be redrawn into one area, the Mosaic framework tries to minimize that by collecting three areas. Each time a view is invalid, its Bounds are compared with the three dirty regions and added to that region that fits best.

This is just an optimization to avoid that a few small GUI components with animations are causing an entire screen update (for example a small area in the top left corner and a small area in the bottom right corner).
You will find the implementation within Core::Root.

The resulting "dirty area" within the main loop and the green rectangle within the Prototyper are covering the union of the updated area.

Do you have any issues with your GUI application?

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

...