From 74fa33497f3c17b759b5555c51804fa295a93816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Mon, 7 Jan 2013 21:16:38 +0100 Subject: [PATCH] reset generic shader after zoom REVIEW: 108252 BUG: 304435 --- effects/zoom/zoom.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/effects/zoom/zoom.cpp b/effects/zoom/zoom.cpp index 9d9444a882..88a5e1dd42 100644 --- a/effects/zoom/zoom.cpp +++ b/effects/zoom/zoom.cpp @@ -227,7 +227,9 @@ void ZoomEffect::reconfigure(ReconfigureFlags) void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time) { + bool altered = false; if (zoom != target_zoom) { + altered = true; double diff = time / animationTime(500.0); if (target_zoom > zoom) zoom = qMin(zoom * qMax(1 + diff, 1.2), target_zoom); @@ -237,6 +239,8 @@ void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time) if (zoom == 1.0) { showCursor(); + if (altered) // reset the generic shader to avoid artifacts in plenty other effects + ShaderBinder binder(ShaderManager::GenericShader, true); } else { hideCursor(); data.mask |= PAINT_SCREEN_TRANSFORMED;