How to force Qt to display in memory, but not on the device?

I have an application that uses Qt 5.6 for various purposes and runs on an embedded device. I currently have it rendered via eglfs in the buffer of the Linux frame on the connected display, but I also want to be able to capture data and send it to a single-color LED display (the device will either have this unit or a full video device, never both at the same time) .

Based on what I have found so far on the net, the best approach is this:

  • disable anti-aliasing;
  • set Qt for the display device to 1 bit / pixel;
  • select the font 1bpp, gray color is not allowed; and
  • somehow capture the graphic scene that Qt produces so that I can transfer it to the display.

This is just the last question I have problems with. I suspect that I need to create the surface of some description and push it onto the "stack" of the Qt display, but I cannot find good examples of how to do this.

How to do this and, believing that I am right, is there a synchronization method used to ensure that I get only full buffers from the surface (i.e. without a gap)?

+4
source share

Source: https://habr.com/ru/post/1655162/


All Articles