diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-01-15 09:42:38 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-01-15 09:42:38 (GMT) |
commit | 9095df7d5454be2a0814f59fb3f3270c7783847a (patch) | |
tree | 2856ae568c3618938acdabe3b4b3fe843c56c61b /src/opengl/gl2paintengineex | |
parent | f89a82b97eb5585fdb246fc71df7d64df5220971 (diff) | |
download | Qt-9095df7d5454be2a0814f59fb3f3270c7783847a.zip Qt-9095df7d5454be2a0814f59fb3f3270c7783847a.tar.gz Qt-9095df7d5454be2a0814f59fb3f3270c7783847a.tar.bz2 |
Compile
Some errors introduced by merges.
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 21 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 2 |
2 files changed, 4 insertions, 19 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 638e4d3..4c3b343 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1228,17 +1228,6 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const d->drawTexture(dest, srcRect, size, false); } -void QGL2PaintEngineEx::drawStaticTextItem(QStaticTextItem *textItem) -{ - Q_D(QGL2PaintEngineEx); - - ensureActive(); - - // ### What about transformations and huge fonts? These are not passed through cache - // in drawTextItem(). - d->drawCachedGlyphs(textItem); -} - void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem) { Q_D(QGL2PaintEngineEx); @@ -1287,7 +1276,7 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem staticTextItem.numGlyphs = glyphs.size(); staticTextItem.glyphPositions = positions.data(); - d->drawCachedGlyphs(&staticTextItem); + d->drawCachedGlyphs(glyphType, &staticTextItem); } return; } @@ -1295,14 +1284,10 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem QPaintEngineEx::drawTextItem(p, ti); } -void QGL2PaintEngineExPrivate::drawCachedGlyphs(QStaticTextItem *staticTextItem) +void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyphType, QStaticTextItem *staticTextItem) { Q_Q(QGL2PaintEngineEx); - QFontEngineGlyphCache::Type glyphType = staticTextItem->fontEngine->glyphFormat >= 0 - ? QFontEngineGlyphCache::Type(staticTextItem->fontEngine->glyphFormat) - : QFontEngineGlyphCache::Raster_A8; - QGLTextureGlyphCache *cache = (QGLTextureGlyphCache *) staticTextItem->fontEngine->glyphCache(ctx, glyphType, QTransform()); if (!cache || cache->cacheType() != glyphType) { @@ -1434,7 +1419,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QStaticTextItem *staticTextItem) updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, false); shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::MaskTexture), QT_MASK_TEXTURE_UNIT); - glDrawArrays(GL_TRIANGLES, 0, 6 * glyphs.size()); + glDrawArrays(GL_TRIANGLES, 0, 6 * staticTextItem->numGlyphs); } void QGL2PaintEngineEx::drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index b683b8b..a7a40a8 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -195,7 +195,7 @@ public: void stroke(const QVectorPath &path, const QPen &pen); void drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque, bool pattern = false); void drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints); - void drawCachedGlyphs(QStaticTextItem *staticTextItem); + void drawCachedGlyphs(QFontEngineGlyphCache::Type glyphType, QStaticTextItem *staticTextItem); // Calls glVertexAttributePointer if the pointer has changed inline void setVertexAttributePointer(unsigned int arrayIndex, const GLfloat *pointer); |