diff options
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 10 | ||||
-rw-r--r-- | src/opengl/qgl_x11.cpp | 8 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer_x11.cpp | 2 |
3 files changed, 7 insertions, 13 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index ab103ba836..58b9002222 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -97,10 +97,6 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled; extern bool qt_applefontsmoothing_enabled; #endif -#if !defined(QT_MAX_CACHED_GLYPH_SIZE) -# define QT_MAX_CACHED_GLYPH_SIZE 64 -#endif - Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert); ////////////////////////////////// Private Methods ////////////////////////////////////////// @@ -1441,8 +1437,7 @@ void QGL2PaintEngineEx::drawStaticTextItem(QStaticTextItem *textItem) // don't try to cache huge fonts or vastly transformed fonts QFontEngine *fontEngine = textItem->fontEngine(); const qreal pixelSize = fontEngine->fontDef.pixelSize; - if (pixelSize * pixelSize * qAbs(det) < QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE || - det < 0.25f || det > 4.f) { + if (shouldDrawCachedGlyphs(pixelSize, s->matrix) || det < 0.25f || det > 4.f) { QFontEngineGlyphCache::Type glyphType = fontEngine->glyphFormat >= 0 ? QFontEngineGlyphCache::Type(textItem->fontEngine()->glyphFormat) : d->glyphCacheType; @@ -1500,8 +1495,7 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem // don't try to cache huge fonts or vastly transformed fonts const qreal pixelSize = ti.fontEngine->fontDef.pixelSize; - if (pixelSize * pixelSize * qAbs(det) >= QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE || - det < 0.25f || det > 4.f) + if (shouldDrawCachedGlyphs(pixelSize, s->matrix) || det < 0.25f || det > 4.f) drawCached = false; QFontEngineGlyphCache::Type glyphType = ti.fontEngine->glyphFormat >= 0 diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 1fd9e373ed..c35488da02 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -347,13 +347,13 @@ static void find_trans_colors() QGLFormat UNIX/GLX-specific code *****************************************************************************/ -void* qglx_getProcAddress(const char* procName) +void (*qglx_getProcAddress(const char* procName))() { // On systems where the GL driver is pluggable (like Mesa), we have to use // the glXGetProcAddressARB extension to resolve other function pointers as // the symbols wont be in the GL library, but rather in a plugin loaded by // the GL library. - typedef void* (*qt_glXGetProcAddressARB)(const char *); + typedef void (*(*qt_glXGetProcAddressARB)(const char *))(); static qt_glXGetProcAddressARB glXGetProcAddressARB = 0; static bool triedResolvingGlxGetProcAddress = false; if (!triedResolvingGlxGetProcAddress) { @@ -378,7 +378,7 @@ void* qglx_getProcAddress(const char* procName) } } - void *procAddress = 0; + void (*procAddress)() = 0; if (glXGetProcAddressARB) procAddress = glXGetProcAddressARB(procName); @@ -387,7 +387,7 @@ void* qglx_getProcAddress(const char* procName) if (!procAddress) { void *handle = dlopen(NULL, RTLD_LAZY); if (handle) { - procAddress = dlsym(handle, procName); + procAddress = (void (*)())dlsym(handle, procName); dlclose(handle); } } diff --git a/src/opengl/qglpixelbuffer_x11.cpp b/src/opengl/qglpixelbuffer_x11.cpp index 9e8beba311..fcd7b521bb 100644 --- a/src/opengl/qglpixelbuffer_x11.cpp +++ b/src/opengl/qglpixelbuffer_x11.cpp @@ -93,7 +93,7 @@ static _glXMakeContextCurrent qt_glXMakeContextCurrent = 0; #define glXGetFBConfigAttrib qt_glXGetFBConfigAttrib #define glXMakeContextCurrent qt_glXMakeContextCurrent -extern void* qglx_getProcAddress(const char* procName); // in qgl_x11.cpp +extern void (*qglx_getProcAddress(const char* procName))(); // in qgl_x11.cpp static bool qt_resolve_pbuffer_extensions() { |