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
QWebEngineViewwithQt::WA_DontShowOnScreenattribute - get a
QPainteron aQImage(withQImage::Format_ARGB32) - call
QWidget::render()on the saidQWebEngineViewinstance
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)?