Jump to content

Behavior with GDISP_NEED_AUTOFLUSH


Rafael Zingler

Recommended Posts

Hi all,

the option GDISP_NEED_AUTOFLUSH is defined as TRUE in my configuration file. Thus, as expected, my board_flush() function is called automatically after the drawing operations. However, I have a doubt about the behavior of the library when this option is enabled: when I call the function gdispFillArea, for example, the board_flush function is called just once, at the very end of the drawing process. But when I call the gdispDrawImage function, the board_flush function is called many times during the drawing process. Is this the library's default behavior with GDISP_NEED_AUTOFLUSH enabled?

For my case, ideally the board_flush should be called just once, after the whole image has been drawn (same behavior as with the gdispFillArea function). I would like to know if there is something else I need to adjust in my configuration file, to make the flush function be called just after the drawing process has finished.

Any help is welcome!!

Link to comment
Share on other sites

There are a number of options on how the flush actually works depending on your gfxconf.h settings.

Normally the flush occurs after every low level gdisp draw routine. The gdispImage calls internally use low level gdisp routines and so the image is flushed continually as each part of the image is being drawn.

They way to get around this currently is to set GDISP_NEED_TIMERFLUSH in your gfxconf.h file. It forces the flush to occur on a timer. Due to gdisp display locking even very short timer periods will provide much better results without creating excessive CPU load.

The problem will be fully solved in V3 which will provide a nested DrawStart/DrawEnd type operation. The image calls will be updated to use this new Draw synchronisation mechanism and therefore the image will be flushed only when the complete image is drawn even if GDISP_NEED_TIMERFLUSH is not used. Unfortunately this operation is too complex to back-fit into V2.x as it requires some of the new capabilities that V3 gdisp will provide.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...