summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengldebug.cpp
diff options
context:
space:
mode:
authorLars Knoll <[email protected]>2016-01-29 10:43:35 +0100
committerLaszlo Agocs <[email protected]>2016-03-01 14:46:14 +0000
commit29d8159c4478a5275d2ea102daf270a91ed7e92e (patch)
tree709a145107cdfc58e67b4fabe6a76534d5cc7801 /src/gui/opengl/qopengldebug.cpp
parent7ee585bbffb4350ec327116d30cd63e3d1142581 (diff)
Avoid repeated QByteArray creation when resolving opengl functions
Add an getProcAddress(const char *) overload to QOpenGLContext, and refactor the QPA interface to take a const char *. Like this we can avoid lots of mallocs when resoving GL methods. Change-Id: Ic45b985fbaa0da8d32ba3e3b485351173352ca6f Reviewed-by: Laszlo Agocs <[email protected]> Reviewed-by: Sean Harmer <[email protected]>
Diffstat (limited to 'src/gui/opengl/qopengldebug.cpp')
-rw-r--r--src/gui/opengl/qopengldebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 5f0164c3e12..7bdf6ee443b 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1379,7 +1379,7 @@ bool QOpenGLDebugLogger::initialize()
#define GET_DEBUG_PROC_ADDRESS(procName) \
d->procName = reinterpret_cast< qt_ ## procName ## _t >( \
- d->context->getProcAddress(QByteArrayLiteral( #procName )) \
+ d->context->getProcAddress(#procName) \
);
GET_DEBUG_PROC_ADDRESS(glDebugMessageControl);