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:
parent
fd29be6a6b
commit
36818ae9ef
@ -202,12 +202,13 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
|
|||||||
funcs.glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
|
funcs.glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT);
|
||||||
funcs.glBindTexture(GL_TEXTURE_2D, texId);
|
funcs.glBindTexture(GL_TEXTURE_2D, texId);
|
||||||
|
|
||||||
|
GLenum wrapMode = GL_CLAMP_TO_EDGE;
|
||||||
if (g->spread() == QGradient::RepeatSpread || g->type() == QGradient::ConicalGradient)
|
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)
|
else if (g->spread() == QGradient::ReflectSpread)
|
||||||
updateTextureFilter(GL_MIRRORED_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform);
|
wrapMode = GL_MIRRORED_REPEAT;
|
||||||
else
|
|
||||||
updateTextureFilter(GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform);
|
updateTextureFilter(wrapMode, q->state()->renderHints & QPainter::SmoothPixmapTransform);
|
||||||
}
|
}
|
||||||
else if (style == Qt::TexturePattern) {
|
else if (style == Qt::TexturePattern) {
|
||||||
currentBrushImage = currentBrush.textureImage();
|
currentBrushImage = currentBrush.textureImage();
|
||||||
|
Loading…
Reference in New Issue
Block a user