reset generic shader after zoom
REVIEW: 108252 BUG: 304435
This commit is contained in:
parent
e642c5cb9d
commit
74fa33497f
1 changed files with 4 additions and 0 deletions
|
@ -227,7 +227,9 @@ void ZoomEffect::reconfigure(ReconfigureFlags)
|
||||||
|
|
||||||
void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time)
|
||||||
{
|
{
|
||||||
|
bool altered = false;
|
||||||
if (zoom != target_zoom) {
|
if (zoom != target_zoom) {
|
||||||
|
altered = true;
|
||||||
double diff = time / animationTime(500.0);
|
double diff = time / animationTime(500.0);
|
||||||
if (target_zoom > zoom)
|
if (target_zoom > zoom)
|
||||||
zoom = qMin(zoom * qMax(1 + diff, 1.2), target_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) {
|
if (zoom == 1.0) {
|
||||||
showCursor();
|
showCursor();
|
||||||
|
if (altered) // reset the generic shader to avoid artifacts in plenty other effects
|
||||||
|
ShaderBinder binder(ShaderManager::GenericShader, true);
|
||||||
} else {
|
} else {
|
||||||
hideCursor();
|
hideCursor();
|
||||||
data.mask |= PAINT_SCREEN_TRANSFORMED;
|
data.mask |= PAINT_SCREEN_TRANSFORMED;
|
||||||
|
|
Loading…
Reference in a new issue