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 <shawn.rutledge@qt.io>
bb10
Volker Hilsheimer 2022-01-17 17:26:07 +01:00
parent 5d75e9d8b0
commit 5d1bb2ed57
1 changed files with 1 additions and 0 deletions

View File

@ -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);