From 7b459214d9a7b78c1243318baed47b830579fde3 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: 355028 REVIEW: 125994 FIXED-IN: 5.5 --- effects/zoom/zoom.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/effects/zoom/zoom.cpp b/effects/zoom/zoom.cpp index 325c94f5fe..28005536c6 100644 --- a/effects/zoom/zoom.cpp +++ b/effects/zoom/zoom.cpp @@ -259,8 +259,11 @@ void ZoomEffect::reconfigure(ReconfigureFlags) void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time) { + bool altered = false; if (zoom != target_zoom) { + altered = true; const float zoomDist = qAbs(target_zoom - source_zoom); + double diff = time / animationTime(500.0); if (target_zoom > zoom) zoom = qMin(zoom + ((zoomDist * time) / animationTime(150*zoomFactor)), target_zoom); else @@ -269,6 +272,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;