Collate calls to updateTextureFilter in updateBrushTexture

Change-Id: Id13d5bc122c4f9cc8f44ff82df345a50f2944118
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Tor Arne Vestbø 2014-12-02 18:31:38 +01:00
parent fd29be6a6b
commit 36818ae9ef

View File

@ -202,12 +202,13 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
funcs.glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
funcs.glBindTexture(GL_TEXTURE_2D, texId);
GLenum wrapMode = GL_CLAMP_TO_EDGE;
if (g->spread() == QGradient::RepeatSpread || g->type() == QGradient::ConicalGradient)
updateTextureFilter(GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
wrapMode = GL_REPEAT;
else if (g->spread() == QGradient::ReflectSpread)
updateTextureFilter(GL_MIRRORED_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
else
updateTextureFilter(GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform);
wrapMode = GL_MIRRORED_REPEAT;
updateTextureFilter(wrapMode, q->state()->renderHints & QPainter::SmoothPixmapTransform);
}
else if (style == Qt::TexturePattern) {
currentBrushImage = currentBrush.textureImage();