dart-archive / sdk

The Dartino project was an experiment seeking to improve productivity when writing application code for embedded devices.
https://dartino.org
Other
330 stars 36 forks source link

Add support for double buffered graphics #502

Open kimsey0 opened 8 years ago

kimsey0 commented 8 years ago

On the stm32f746g, output is sent to the screen via the FrameBuffer class. This includes methods such as clear (changing the colour of all pixels) and drawPixel, which are mapped directly to LCD-controlling functions in the board support package. There is, however, no support for double buffering, leading to stuttering when redrawing the screen.

The stm32f746g supports two layers, a foreground and a background layer, for which the visibility can be set independently and which can even be blended together. Currently, only the foreground layer is used. However, a FrameBuffer extension could implement double buffering via page flipping by toggling the visibility of both layers and selecting the inactive one.