Hi everyone,
I would like to reduce the flickering effect when changing a background image showing a scale (190x190) and a text in front of that (as overlay).
Presently I use IMAGE_SetGIF (or SetPNG) for drawing that area of a dialog window. Directly after that, a text will be updated in the middle (SetText).
The drawing effect (update) is visible when using the NOTIFICATION_RELEASED message after touch event. The update of the area and the text are visible as two paint events. (The LCD driver is fast > 5MPixel/s). So this should be an error by define or using the wrong method.
Using the memory device for WIN32 GUI works fine, of course (using WM_SetCreateFlags(WM_CF_MEMDEV) for all dialog windows), as I have enough RAM in Windows.
But that does not work in my application, since the dialog size is 320x240 (fullscreen) and the drawing of the full window stops in the middle due to lack of RAM. I can reproduce that by changing the size of the windows simulation the same I have for the 429 discovery.
So, the question is, if I have to use a different function for painting, or creating a memory device for the required area only (190x190) or use AutoDev
Is the SetGIF responsible for that? Should I use the native bitmap functions in combination with memory devices? I have to paint the new GIF, afterwards change the text and then the display should be updated.
Or is it possible to use the MEMDEV-flags in the defined dialog array (IMAGE_CreateIndirect) instead?
I do not use the WM_PAINT for changing or updating the window area. And I did not test yet to define that area as a child window.
The sample MEMDEV_Banding works fine (just to be sure that no other issue is affecting that). Disabling the MEMDEV-function here shows the same flicker I can see in my application (single paint updates). So, I think MEMDEV should be the way. But the available RAM is limited...
Any suggestions?
Best regards,
HaJo
I would like to reduce the flickering effect when changing a background image showing a scale (190x190) and a text in front of that (as overlay).
Presently I use IMAGE_SetGIF (or SetPNG) for drawing that area of a dialog window. Directly after that, a text will be updated in the middle (SetText).
The drawing effect (update) is visible when using the NOTIFICATION_RELEASED message after touch event. The update of the area and the text are visible as two paint events. (The LCD driver is fast > 5MPixel/s). So this should be an error by define or using the wrong method.
Using the memory device for WIN32 GUI works fine, of course (using WM_SetCreateFlags(WM_CF_MEMDEV) for all dialog windows), as I have enough RAM in Windows.
But that does not work in my application, since the dialog size is 320x240 (fullscreen) and the drawing of the full window stops in the middle due to lack of RAM. I can reproduce that by changing the size of the windows simulation the same I have for the 429 discovery.
So, the question is, if I have to use a different function for painting, or creating a memory device for the required area only (190x190) or use AutoDev
Is the SetGIF responsible for that? Should I use the native bitmap functions in combination with memory devices? I have to paint the new GIF, afterwards change the text and then the display should be updated.
Or is it possible to use the MEMDEV-flags in the defined dialog array (IMAGE_CreateIndirect) instead?
I do not use the WM_PAINT for changing or updating the window area. And I did not test yet to define that area as a child window.
The sample MEMDEV_Banding works fine (just to be sure that no other issue is affecting that). Disabling the MEMDEV-function here shows the same flicker I can see in my application (single paint updates). So, I think MEMDEV should be the way. But the available RAM is limited...
Any suggestions?
Best regards,
HaJo
The post was edited 1 time, last by HaJoCC ().