diff options
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtbackingstore.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtbackingstore.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtbackingstore.cpp b/src/plugins/platforms/winrt/qwinrtbackingstore.cpp index 113886f9b4..c23d48b2dd 100644 --- a/src/plugins/platforms/winrt/qwinrtbackingstore.cpp +++ b/src/plugins/platforms/winrt/qwinrtbackingstore.cpp @@ -50,9 +50,6 @@ QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(lcQpaBackingStore, "qt.qpa.backingstore") -Q_LOGGING_CATEGORY(lcQpaBackingStoreVerbose, "qt.qpa.backingstore.verbose") - class QWinRTBackingStorePrivate { public: @@ -68,7 +65,7 @@ QWinRTBackingStore::QWinRTBackingStore(QWindow *window) : QPlatformBackingStore(window), d_ptr(new QWinRTBackingStorePrivate) { Q_D(QWinRTBackingStore); - qCDebug(lcQpaBackingStore) << __FUNCTION__ << this << window; + qCInfo(lcQpaBackingStore) << __FUNCTION__ << this << window; d->initialized = false; d->screen = static_cast<QWinRTScreen*>(window->screen()->handle()); @@ -80,7 +77,7 @@ QWinRTBackingStore::QWinRTBackingStore(QWindow *window) bool QWinRTBackingStore::initialize() { Q_D(QWinRTBackingStore); - qCDebug(lcQpaBackingStoreVerbose) << __FUNCTION__ << d->initialized; + qCDebug(lcQpaBackingStore) << __FUNCTION__ << d->initialized; if (d->initialized) return true; @@ -102,7 +99,7 @@ bool QWinRTBackingStore::initialize() QWinRTBackingStore::~QWinRTBackingStore() { - qCDebug(lcQpaBackingStore) << __FUNCTION__ << this; + qCInfo(lcQpaBackingStore) << __FUNCTION__ << this; } QPaintDevice *QWinRTBackingStore::paintDevice() @@ -116,16 +113,19 @@ void QWinRTBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo Q_D(QWinRTBackingStore); Q_UNUSED(offset) - qCDebug(lcQpaBackingStoreVerbose) << __FUNCTION__ << this << window << region; + qCDebug(lcQpaBackingStore) << __FUNCTION__ << this << window << region; if (d->size.isEmpty()) return; + const QRect bounds = region.boundingRect() & d->paintDevice.rect(); + if (bounds.isEmpty()) + return; + const bool ok = d->context->makeCurrent(window); if (!ok) qWarning("unable to flush"); - const QRect bounds = region.boundingRect(); glBindTexture(GL_TEXTURE_2D, d->fbo->texture()); // TODO: when ANGLE GLES3 support is finished, use the glPixelStorei functions to minimize upload glTexSubImage2D(GL_TEXTURE_2D, 0, 0, bounds.y(), d->size.width(), bounds.height(), @@ -151,7 +151,7 @@ void QWinRTBackingStore::resize(const QSize &size, const QRegion &staticContents Q_D(QWinRTBackingStore); Q_UNUSED(staticContents) - qCDebug(lcQpaBackingStoreVerbose) << __FUNCTION__ << this << size; + qCDebug(lcQpaBackingStore) << __FUNCTION__ << this << size; if (!initialize()) return; @@ -182,14 +182,14 @@ QImage QWinRTBackingStore::toImage() const void QWinRTBackingStore::beginPaint(const QRegion ®ion) { - qCDebug(lcQpaBackingStoreVerbose) << __FUNCTION__ << this << region; + qCDebug(lcQpaBackingStore) << __FUNCTION__ << this << region; resize(window()->size(), region); } void QWinRTBackingStore::endPaint() { - qCDebug(lcQpaBackingStoreVerbose) << __FUNCTION__ << this; + qCDebug(lcQpaBackingStore) << __FUNCTION__ << this; } QT_END_NAMESPACE |