diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qwidget_p.h | 8 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetrepaintmanager.cpp | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget_p.h b/src/widgets/kernel/qwidget_p.h index 65e368d9458..ea03e9c7084 100644 --- a/src/widgets/kernel/qwidget_p.h +++ b/src/widgets/kernel/qwidget_p.h @@ -579,7 +579,13 @@ public: virtual QPlatformBackingStoreRhiConfig rhiConfig() const { return {}; } - virtual QRhiTexture *texture() const { return nullptr; } + // Note that textureRight may be null, as it's only used in stereoscopic rendering + struct TextureData { + QRhiTexture *textureLeft = nullptr; + QRhiTexture *textureRight = nullptr; + }; + + virtual TextureData texture() const { return {}; } virtual QPlatformTextureList::Flags textureListFlags() { Q_Q(QWidget); return q->testAttribute(Qt::WA_AlwaysStackOnTop) diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp index cdd8cee0168..16db49f95e3 100644 --- a/src/widgets/kernel/qwidgetrepaintmanager.cpp +++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp @@ -539,7 +539,8 @@ static void findTextureWidgetsRecursively(QWidget *tlw, QWidget *widget, if (wd->renderToTexture) { QPlatformTextureList::Flags flags = wd->textureListFlags(); const QRect rect(widget->mapTo(tlw, QPoint()), widget->size()); - widgetTextures->appendTexture(widget, wd->texture(), rect, wd->clipRect(), flags); + QWidgetPrivate::TextureData data = wd->texture(); + widgetTextures->appendTexture(widget, data.textureLeft, data.textureRight, rect, wd->clipRect(), flags); } for (int i = 0; i < wd->children.size(); ++i) { |