diff --git a/paintredirector.cpp b/paintredirector.cpp index 4113178e17..8652492e0e 100644 --- a/paintredirector.cpp +++ b/paintredirector.cpp @@ -47,8 +47,8 @@ QPixmap PaintRedirector::performPendingPaint() const QSize size = pending.boundingRect().size(); if ( scratch.width() < size.width() || scratch.height() < size.height() ) { - int w = qCeil( size.width() / 128. ) * 128; - int h = qCeil( size.height() / 128. ) * 128; + int w = ( size.width() + 128 ) & ~128; + int h = ( size.height() + 128 ) & ~128; scratch = QPixmap( qMax( scratch.width(), w ), qMax( scratch.height(), h ) ); } scratch.fill( Qt::transparent );