Jump to content

Flicker


Fabien Comte

Recommended Posts

Hi,

The most common solution is (as you mentioned) double buffer. However, proper double buffering is very hard to implement and also requires hardware support. While µGFX can fully support double buffering (with the multiple displays API) we do also provide you with a more flexible way: Pixmaps. You can simply render your widget into a pixmap and then blit that pixmap to your real display. Pixmaps have certain advantages over real double buffering. The most notable is that you don't need two times the memory for the entire display area - a pixmap can be just a small portion of the screen.

Other than that there are other things which vastly improve these sort of things such as anti-tearing-effect flags and so on. But all of that needs to be supported by the hardware.

Link to comment
Share on other sites

Hello,

I tried to take a look to your proposal but i not found were you are speaking about.

Another question on this theme please:

When i change page from one with a black background to another one with a black background, i can see a very quick grey or white (maybe 1 frame). There is probably a fill function before background draw. Do you confirm ? If yes, how to disable it please ?

Thank you.

 

Link to comment
Share on other sites

On ‎16‎/‎03‎/‎2018 at 09:47, Joel Bodenmann said:

Hi,

The most common solution is (as you mentioned) double buffer. However, proper double buffering is very hard to implement and also requires hardware support. While µGFX can fully support double buffering (with the multiple displays API) we do also provide you with a more flexible way: Pixmaps. You can simply render your widget into a pixmap and then blit that pixmap to your real display. Pixmaps have certain advantages over real double buffering. The most notable is that you don't need two times the memory for the entire display area - a pixmap can be just a small portion of the screen.

Other than that there are other things which vastly improve these sort of things such as anti-tearing-effect flags and so on. But all of that needs to be supported by the hardware.

Do you have any exemple of multiple display API ?

Link to comment
Share on other sites

2 minutes ago, Fabien Comte said:

I tried to take a look to your proposal but i not found were you are speaking about.

https://wiki.ugfx.io/index.php/Pixmaps

 

1 minute ago, Fabien Comte said:

Do you have any exemple of multiple display API ?

https://wiki.ugfx.io/index.php/Multiple_displays
 

 

6 minutes ago, Fabien Comte said:

When i change page from one with a black background to another one with a black background, i can see a very quick grey or white (maybe 1 frame). There is probably a fill function before background draw. Do you confirm ? If yes, how to disable it please ?

Yes. that is correct. It cannot be disabled. It's a built-in feature. This allows for a much smaller and faster window manager. You cannot hide a background (container) without overwriting the area because you can't delete something from the display - you need to overwrite it. You can use doublebuffering as explained in my previous post to prevent things like this (there are many other additional things such as TE integration and so on).

Link to comment
Share on other sites

7 minutes ago, Joel Bodenmann said:

Yes. that is correct. It cannot be disabled. It's a built-in feature. This allows for a much smaller and faster window manager. You cannot hide a background (container) without overwriting the area because you can't delete something from the display - you need to overwrite it. You can use doublebuffering as explained in my previous post to prevent things like this (there are many other additional things such as TE integration and so on).

But if i do a full redraw of the screen with my black background, i want to avoid this white flash.

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...