diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-10 11:14:55 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-10 11:14:55 (GMT) |
commit | 03dba6aa6d3a4738d2ff63feabff94cec1c1e5cd (patch) | |
tree | e03b32d1daeae2dc89159cc2bd7a63702a9d7965 | |
parent | 6e6bdedd06c72f857590b32462548448da6d59b5 (diff) | |
parent | 64852122ba71bbb297b4f1e440f6fabee16ca2fe (diff) | |
download | Qt-03dba6aa6d3a4738d2ff63feabff94cec1c1e5cd.zip Qt-03dba6aa6d3a4738d2ff63feabff94cec1c1e5cd.tar.gz Qt-03dba6aa6d3a4738d2ff63feabff94cec1c1e5cd.tar.bz2 |
Merge branch 'graphics-team-text-4.7' into 4.7
-rw-r--r-- | src/gui/text/qtextobject.cpp | 4 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index ea2ef2d..4b92379 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -1488,7 +1488,7 @@ QTextBlock::iterator QTextBlock::end() const */ QTextBlock QTextBlock::next() const { - if (!p) + if (!isValid()) return QTextBlock(); return QTextBlock(p, p->blockMap().next(n)); @@ -1504,7 +1504,7 @@ QTextBlock QTextBlock::next() const */ QTextBlock QTextBlock::previous() const { - if (!p) + if (!isValid()) return QTextBlock(); return QTextBlock(p, p->blockMap().previous(n)); diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index ba311c3..3aef896 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -293,9 +293,6 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) if (mask.format() == QImage::Format_RGB32) { glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits()); } else { -#ifdef QT_OPENGL_ES_2 - glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits()); -#else // glTexSubImage2D() might cause some garbage to appear in the texture if the mask width is // not a multiple of four bytes. The bug appeared on a computer with 32-bit Windows Vista // and nVidia GeForce 8500GT. GL_UNPACK_ALIGNMENT is set to four bytes, 'mask' has a @@ -307,7 +304,6 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) for (int i = 0; i < maskHeight; ++i) glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, maskWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, mask.scanLine(i)); -#endif } } |