Skip to content

Commit

Permalink
Merge pull request #39 from sletta/glyph-problems
Browse files Browse the repository at this point in the history
[mer] Revert previous glyph fix and try another approach
  • Loading branch information
sletta committed May 12, 2015
2 parents 69e9a05 + 09c28be commit b1a108b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/gui/kernel/qopenglcontext_p.h
Expand Up @@ -203,7 +203,7 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
, textureFunctions(0)
, current_fbo(0)
, max_texture_size(-1)
, workaround_brokenFBOReadBack(false)
, workaround_brokenFBOReadBack(true)
, workaround_brokenTexSubImage(false)
, workaround_missingPrecisionQualifiers(false)
, active_engine(0)
Expand Down
7 changes: 1 addition & 6 deletions src/gui/opengl/qopengltextureglyphcache.cpp
Expand Up @@ -192,6 +192,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)
glBindTexture(GL_TEXTURE_2D, 0);
funcs.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, tmp_texture, 0);

funcs.glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
glBindTexture(GL_TEXTURE_2D, oldTexture);

Expand Down Expand Up @@ -262,8 +263,6 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height)

glBindTexture(GL_TEXTURE_2D, m_textureResource->m_texture);

glFlush();

glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, oldWidth, oldHeight);

funcs.glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
Expand Down Expand Up @@ -317,10 +316,6 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed
}
const int maskWidth = mask.width();
const int maskHeight = mask.height();
if (maskWidth == 0 || maskHeight == 0 || mask.format() == QImage::Format_Invalid) {
qWarning() << "Failed to acquire glyph alpha mask. Characters will be missing during rendering!";
return;
}

if (mask.format() == QImage::Format_Mono) {
mask = mask.convertToFormat(QImage::Format_Indexed8);
Expand Down

0 comments on commit b1a108b

Please sign in to comment.