diff options
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index befd3a4197..f7c4df40c8 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -37,6 +37,7 @@ struct QBackingstoreTextureInfo { void *source; // may be null QRhiTexture *texture; + QRhiTexture *textureExtra; QRect rect; QRect clipRect; QPlatformTextureList::Flags flags; @@ -68,7 +69,7 @@ QPlatformTextureList::~QPlatformTextureList() int QPlatformTextureList::count() const { Q_D(const QPlatformTextureList); - return d->textures.count(); + return d->textures.size(); } QRhiTexture *QPlatformTextureList::texture(int index) const @@ -77,6 +78,12 @@ QRhiTexture *QPlatformTextureList::texture(int index) const return d->textures.at(index).texture; } +QRhiTexture *QPlatformTextureList::textureExtra(int index) const +{ + Q_D(const QPlatformTextureList); + return d->textures.at(index).textureExtra; +} + void *QPlatformTextureList::source(int index) { Q_D(const QPlatformTextureList); @@ -123,6 +130,22 @@ void QPlatformTextureList::appendTexture(void *source, QRhiTexture *texture, con QBackingstoreTextureInfo bi; bi.source = source; bi.texture = texture; + bi.textureExtra = nullptr; + bi.rect = geometry; + bi.clipRect = clipRect; + bi.flags = flags; + d->textures.append(bi); +} + +void QPlatformTextureList::appendTexture(void *source, QRhiTexture *textureLeft, QRhiTexture *textureRight, const QRect &geometry, + const QRect &clipRect, Flags flags) +{ + Q_D(QPlatformTextureList); + + QBackingstoreTextureInfo bi; + bi.source = source; + bi.texture = textureLeft; + bi.textureExtra = textureRight; bi.rect = geometry; bi.clipRect = clipRect; bi.flags = flags; @@ -356,6 +379,7 @@ void QPlatformBackingStore::graphicsDeviceReportedLost() return; qWarning("Rhi backingstore: graphics device lost, attempting to reinitialize"); + d_ptr->compositor.reset(); d_ptr->rhiSupport.reset(); d_ptr->rhiSupport.create(); if (!d_ptr->rhiSupport.rhi()) |