effects/startupfeedback: Use clamp to edge wrap mode
The dpi of bouncing icon may not match the dpi of the screen, which can make the linear filter sample texels from the opposite edge when using the default wrap mode. BUG: 448947
This commit is contained in:
parent
91632639b1
commit
e1d47b5946
1 changed files with 4 additions and 0 deletions
|
@ -360,11 +360,15 @@ void StartupFeedbackEffect::prepareTextures(const QPixmap& pix)
|
|||
case BouncingFeedback:
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
m_bouncingTextures[i].reset(new GLTexture(scalePixmap(pix, BOUNCE_SIZES[i])));
|
||||
m_bouncingTextures[i]->setFilter(GL_LINEAR);
|
||||
m_bouncingTextures[i]->setWrapMode(GL_CLAMP_TO_EDGE);
|
||||
}
|
||||
break;
|
||||
case BlinkingFeedback:
|
||||
case PassiveFeedback:
|
||||
m_texture.reset(new GLTexture(pix));
|
||||
m_texture->setFilter(GL_LINEAR);
|
||||
m_texture->setWrapMode(GL_CLAMP_TO_EDGE);
|
||||
break;
|
||||
default:
|
||||
// for safety
|
||||
|
|
Loading…
Reference in a new issue