From 5d1bb2ed575f88d147fb6140aa846a8665a102b8 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 Re-applies 77895514d5419b77535de093b544aee30686cd22, which was reverted after tests started to XPASS-fail in qtdeclarative. Those tests are now get consistently QSKIP'ed, so reapply the change. This makes testing of actually produced output easy in unit tests, and makes a number of previously failing QtDeclarative tests pass. Task-number: QTBUG-99962 Change-Id: I167b46b954dee18bdbf90c09c5e42a8c179a1fac Reviewed-by: Shawn Rutledge --- 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 d0edfcc48b..6ed6f43816 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);