diff options
author | Tor Arne Vestbø <[email protected]> | 2014-02-10 13:59:44 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-02-19 19:36:25 +0100 |
commit | 4de3c5db238f45404feb6c6ce60810a3e11eae84 (patch) | |
tree | bc0a4d7af2f757fed94c1b52ca6bcd0e74bae25f /src/gui/opengl/qopengltextureglyphcache.cpp | |
parent | 30fd22b9574def54726e7b193127cc0c901c1b4c (diff) |
Unify glyph format between QFontEngine and QFontEngineGlyphCache
Instead of the glyph cache having its own cache type that always mapped
one to one to a font engine glyph format, causing confusion and needless
conversions, the glyph caches now use QFontEngine's glyph format enum.
This also removes the iffy use of an int for the glyphFormat in the font
engines.
Change-Id: I529bad5c179e004f63e152f7dcc311d298c3db98
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/gui/opengl/qopengltextureglyphcache.cpp')
-rw-r--r-- | src/gui/opengl/qopengltextureglyphcache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp index 0d9a2359bdb..ba1fa8f4867 100644 --- a/src/gui/opengl/qopengltextureglyphcache.cpp +++ b/src/gui/opengl/qopengltextureglyphcache.cpp @@ -51,8 +51,8 @@ QT_BEGIN_NAMESPACE QBasicAtomicInt qopengltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1); -QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngineGlyphCache::Type type, const QTransform &matrix) - : QImageTextureGlyphCache(type, matrix) +QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix) + : QImageTextureGlyphCache(format, matrix) , m_textureResource(0) , pex(0) , m_blitProgram(0) @@ -122,7 +122,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height) m_textureResource->m_width = width; m_textureResource->m_height = height; - if (m_type == QFontEngineGlyphCache::Raster_RGBMask || m_type == QFontEngineGlyphCache::Raster_ARGB) { + if (m_format == QFontEngine::Format_A32 || m_format == QFontEngine::Format_ARGB) { QVarLengthArray<uchar> data(width * height * 4); for (int i = 0; i < data.size(); ++i) data[i] = 0; |