diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-14 10:16:55 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-14 10:16:55 (GMT) |
commit | 21ca998de2d74c521ca060283946f25e369aad89 (patch) | |
tree | d85db6f5db161d4eafbd8c5a31df926b24e36e7a /src | |
parent | ab10c5b4be5c0d06edd79d8b4a8da090c1511d7e (diff) | |
parent | 9d075f383597f727b0c5c1e6bdbb9646e35c0fa0 (diff) | |
download | Qt-21ca998de2d74c521ca060283946f25e369aad89.zip Qt-21ca998de2d74c521ca060283946f25e369aad89.tar.gz Qt-21ca998de2d74c521ca060283946f25e369aad89.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/codecs/qiconvcodec.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 3 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadersource_p.h | 12 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp index 389bb48..8c4cc82 100644 --- a/src/corelib/codecs/qiconvcodec.cpp +++ b/src/corelib/codecs/qiconvcodec.cpp @@ -62,7 +62,7 @@ #elif defined(Q_OS_AIX) # define NO_BOM # define UTF16 "UCS-2" -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) # define NO_BOM # if Q_BYTE_ORDER == Q_BIG_ENDIAN # define UTF16 "UTF-16BE" diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index a9257c7..beda9d6 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -475,7 +475,8 @@ void QPainterPrivate::draw_helper(const QPainterPath &originalPath, DrawOperatio p.end(); q->save(); - q->resetMatrix(); + state->matrix = QTransform(); + state->dirtyFlags |= QPaintEngine::DirtyTransform; updateState(state); engine->drawImage(absPathRect, image, diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index acd4461..6bcf010 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -260,12 +260,24 @@ static const char* const qglslPositionWithTextureBrushVertexShader = "\ static const char* const qglslAffinePositionWithTextureBrushVertexShader = qglslPositionWithTextureBrushVertexShader; +#if defined(QT_OPENGL_ES_2) +// OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, +// we emulate GL_REPEAT by only taking the fractional part of the texture coords. +// TODO: Special case POT textures which don't need this emulation +static const char* const qglslTextureBrushSrcFragmentShader = "\ + varying highp vec2 brushTextureCoords; \ + uniform lowp sampler2D brushTexture; \ + lowp vec4 srcPixel() { \ + return texture2D(brushTexture, fract(brushTextureCoords)); \ + }"; +#else static const char* const qglslTextureBrushSrcFragmentShader = "\ varying highp vec2 brushTextureCoords; \ uniform lowp sampler2D brushTexture; \ lowp vec4 srcPixel() { \ return texture2D(brushTexture, brushTextureCoords); \ }"; +#endif static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\ varying highp vec2 brushTextureCoords; \ |