From f718c35055dc52120ff8e034d47c678ba80ef3af Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 17 Jan 2022 17:26:07 +0100 Subject: [PATCH] Offscreen: Implement QPlatformBackingStore::toImage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes testing of actually produced output easy in unit tests. Pick-to: 6.3 Task-number: QTBUG-99962 Change-Id: Ia806539230af12d1eae1e31ef7a47155d9bc1bed Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/offscreen/qoffscreencommon.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/platforms/offscreen/qoffscreencommon.h b/src/plugins/platforms/offscreen/qoffscreencommon.h index d0edfcc48ba..6ed6f438164 100644 --- a/src/plugins/platforms/offscreen/qoffscreencommon.h +++ b/src/plugins/platforms/offscreen/qoffscreencommon.h @@ -106,6 +106,7 @@ public: bool scroll(const QRegion &area, int dx, int dy) override; QPixmap grabWindow(WId window, const QRect &rect) const; + QImage toImage() const override { return m_image; } static QOffscreenBackingStore *backingStoreForWinId(WId id);