From 69bc0f3a0ea23e94e6bdfc7180e2561986f8a416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 25 May 2010 16:59:36 +0000 Subject: [PATCH] Use integer math. svn path=/trunk/KDE/kdebase/workspace/; revision=1130554 --- paintredirector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 );