summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-08-03 11:03:22 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-08-03 11:03:22 +0200
commit92c998afb66a2ec900d50cab57929c0a97ad46ac (patch)
tree1f6219dc64c236c85d7365f8e07ee1df1f27a610 /src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
parent6c4dec7bff6f55b0c41729f4a4ab6962a037af15 (diff)
parent6f4212e5936b96a8be0eacddbfc4dd7ca5abd776 (diff)
Merge remote branch 'gerrit/master' into refactor
Conflicts: src/gui/kernel/qapplication_x11.cpp src/gui/widgets/qlinecontrol.cpp src/gui/widgets/qlinecontrol_p.h src/gui/widgets/qtabwidget.h Change-Id: I90ba893a5553b9ff5658ca0a3221ecf76be4c736
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp10
1 files changed, 2 insertions, 8 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