1

I want to use QWebEngine to render an animated webpage offscreen (with transparency). And I want to do it fast (e.g. 60 fps, which imposes ~16 ms maximum time per render).

This other SO question Is it possible to render QWebEnginePage/QWebEngineView offscreen? gives some hints:

  • get a QWebEngineView with Qt::WA_DontShowOnScreen attribute
  • get a QPainter on a QImage (with QImage::Format_ARGB32)
  • call QWidget::render() on the said QWebEngineView instance

This works! But it's quite slow when the transparency (QImage::Format_ARGB32) is needed. By slow I mean >50-60 milliseconds per render on my machine (which is an equvalent of <20fps).

The question is: is there a faster, Qt-based alternative to rendering a webpage offscreen (to memory)?

sthlm58
  • 1,142
  • 1
  • 9
  • 28

0 Answers0