From 29d8159c4478a5275d2ea102daf270a91ed7e92e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 29 Jan 2016 10:43:35 +0100 Subject: 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 Reviewed-by: Sean Harmer --- src/plugins/platforms/directfb/qdirectfbglcontext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/directfb') diff --git a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp index 1136591c78..e1607b131a 100644 --- a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp +++ b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp @@ -80,10 +80,10 @@ void QDirectFbGLContext::doneCurrent() m_dfbGlContext->Unlock(m_dfbGlContext); } -void *QDirectFbGLContext::getProcAddress(const QString &procName) +void *QDirectFbGLContext::getProcAddress(const char *procName) { void *proc; - DFBResult result = m_dfbGlContext->GetProcAddress(m_dfbGlContext,qPrintable(procName),&proc); + DFBResult result = m_dfbGlContext->GetProcAddress(m_dfbGlContext, procName, &proc); if (result == DFB_OK) return proc; return 0; -- cgit v1.2.3