diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-08-02 16:18:44 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-08-07 10:19:50 +0000 |
commit | 5c1c403edbaa264866d78288a769b425fae5a78d (patch) | |
tree | 16cfec924405de5ccd145d0028d056249b1e7fe4 /src/gui/painting | |
parent | fbce032226722c06c6edf41f6081284ad427f355 (diff) |
Add logging for QPlatformBackingStore::composeAndFlush
Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 9 | ||||
-rw-r--r-- | src/gui/painting/qplatformbackingstore.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index cc8d850689..373722cdb4 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -80,6 +80,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcQpaBackingStore, "qt.qpa.backingstore", QtWarningMsg); + class QPlatformBackingStorePrivate { public: @@ -331,16 +333,19 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i d_ptr->context->setScreen(d_ptr->window->screen()); d_ptr->context->setShareContext(qt_window_private(d_ptr->window)->shareContext()); if (!d_ptr->context->create()) { - qWarning("composeAndFlush: QOpenGLContext creation failed"); + qCWarning(lcQpaBackingStore, "composeAndFlush: QOpenGLContext creation failed"); return; } } if (!d_ptr->context->makeCurrent(window)) { - qWarning("composeAndFlush: makeCurrent() failed"); + qCWarning(lcQpaBackingStore, "composeAndFlush: makeCurrent() failed"); return; } + qCDebug(lcQpaBackingStore) << "Composing and flushing" << region << "of" << window + << "at offset" << offset << "with" << textures->count() << "texture(s) in" << textures; + QWindowPrivate::get(window)->lastComposeTime.start(); QOpenGLFunctions *funcs = d_ptr->context->functions(); diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h index 381c564079..de5ba964dc 100644 --- a/src/gui/painting/qplatformbackingstore.h +++ b/src/gui/painting/qplatformbackingstore.h @@ -50,6 +50,7 @@ // #include <QtGui/qtguiglobal.h> +#include <QtCore/qloggingcategory.h> #include <QtCore/qrect.h> #include <QtCore/qobject.h> @@ -59,6 +60,7 @@ QT_BEGIN_NAMESPACE +Q_GUI_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcQpaBackingStore) class QRegion; class QRect; |