diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-10-13 14:25:18 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-13 15:07:41 +0200 |
commit | 1582407fc782c0befd0760633324dd5c206524a1 (patch) | |
tree | e993d66e824da41ece006d44c48acd4df0ba749e /src/gui/painting/qtextureglyphcache.cpp | |
parent | 30cb91e17d2fbbdce90f7542f44e12af971ba2de (diff) |
Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.
Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc
Reviewed-on: http://codereview.qt-project.org/6607
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/painting/qtextureglyphcache.cpp')
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 0f9a82c25a..b56f6b42e4 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -134,13 +134,9 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const if (!supportsSubPixelPositions) { m_subPixelPositionCount = 1; } else { -#if !defined(Q_WS_X11) int i = 0; while (m_subPixelPositionCount == 0 && i < numGlyphs) m_subPixelPositionCount = calculateSubPixelPositionCount(glyphs[i++]); -#else - m_subPixelPositionCount = 4; -#endif } } @@ -295,38 +291,6 @@ void QTextureGlyphCache::fillInPendingGlyphs() QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g, QFixed subPixelPosition) const { -#if defined(Q_WS_X11) - if (m_transform.type() > QTransform::TxTranslate && m_current_fontengine->type() == QFontEngine::Freetype) { - QFontEngineFT::GlyphFormat format = QFontEngineFT::Format_None; - QImage::Format imageFormat = QImage::Format_Invalid; - switch (m_type) { - case Raster_RGBMask: - format = QFontEngineFT::Format_A32; - imageFormat = QImage::Format_RGB32; - break; - case Raster_A8: - format = QFontEngineFT::Format_A8; - imageFormat = QImage::Format_Indexed8; - break; - case Raster_Mono: - format = QFontEngineFT::Format_Mono; - imageFormat = QImage::Format_Mono; - break; - }; - - QFontEngineFT *ft = static_cast<QFontEngineFT*> (m_current_fontengine); - QFontEngineFT::QGlyphSet *gset = ft->loadTransformedGlyphSet(m_transform); - QFixedPoint positions[1]; - positions[0].x = subPixelPosition; - - if (gset && ft->loadGlyphs(gset, &g, 1, positions, format)) { - QFontEngineFT::Glyph *glyph = gset->getGlyph(g, subPixelPosition); - const int bytesPerLine = (format == QFontEngineFT::Format_Mono ? ((glyph->width + 31) & ~31) >> 3 - : (glyph->width + 3) & ~3); - return QImage(glyph->data, glyph->width, glyph->height, bytesPerLine, imageFormat); - } - } else -#endif if (m_type == QFontEngineGlyphCache::Raster_RGBMask) return m_current_fontengine->alphaRGBMapForGlyph(g, subPixelPosition, glyphMargin(), m_transform); else @@ -367,11 +331,7 @@ void QImageTextureGlyphCache::createTextureData(int width, int height) int QImageTextureGlyphCache::glyphMargin() const { -#if defined(Q_WS_MAC) || defined(Q_WS_X11) - return 0; -#else return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0; -#endif } void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subPixelPosition) |