Use integer math.

svn path=/trunk/KDE/kdebase/workspace/; revision=1130554
This commit is contained in:
Fredrik Höglund 2010-05-25 16:59:36 +00:00
parent b8815bbae6
commit 69bc0f3a0e

View file

@ -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 );