summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaglcontext.mm
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-12-10 13:51:40 +0200
committerLiang Qi <liang.qi@qt.io>2019-12-10 13:51:40 +0200
commit90210d5d9c4029057035019f144212922494ff0a (patch)
tree1aacefa57786964d47a200791280ae91c9b825da /src/plugins/platforms/cocoa/qcocoaglcontext.mm
parentc69a2448ab129d88411a4778f2350dcf971dc623 (diff)
parent5231c26a82a7056f98d99643850754d4e1ebe417 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index b312e033cd..6db4bdb9fd 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -158,6 +158,8 @@ void QCocoaGLContext::initialize()
[m_context setValues:&order forParameter:NSOpenGLCPSurfaceOrder];
updateSurfaceFormat();
+
+ qCDebug(lcQpaOpenGLContext).verbosity(3) << "Created" << this << "based on requested" << context()->format();
}
NSOpenGLPixelFormat *QCocoaGLContext::pixelFormatForSurfaceFormat(const QSurfaceFormat &format)
@@ -355,7 +357,7 @@ QCocoaGLContext::~QCocoaGLContext()
bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface)
{
- qCDebug(lcQpaOpenGLContext) << "Making" << m_context << "current"
+ qCDebug(lcQpaOpenGLContext) << "Making" << this << "current"
<< "in" << QThread::currentThread() << "for" << surface;
Q_ASSERT(surface->surface()->supportsOpenGL());
@@ -555,4 +557,20 @@ QFunctionPointer QCocoaGLContext::getProcAddress(const char *procName)
return (QFunctionPointer)dlsym(RTLD_DEFAULT, procName);
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug debug, const QCocoaGLContext *context)
+{
+ QDebugStateSaver saver(debug);
+ debug.nospace();
+ debug << "QCocoaGLContext(" << (const void *)context;
+ if (context) {
+ if (debug.verbosity() > QDebug::DefaultVerbosity)
+ debug << ", " << context->format();
+ debug << ", " << context->nativeContext();
+ }
+ debug << ')';
+ return debug;
+}
+#endif // !QT_NO_DEBUG_STREAM
+
QT_END_NAMESPACE