Use integer math.
svn path=/trunk/KDE/kdebase/workspace/; revision=1130554
This commit is contained in:
parent
b8815bbae6
commit
69bc0f3a0e
1 changed files with 2 additions and 2 deletions
|
@ -47,8 +47,8 @@ QPixmap PaintRedirector::performPendingPaint()
|
||||||
const QSize size = pending.boundingRect().size();
|
const QSize size = pending.boundingRect().size();
|
||||||
if ( scratch.width() < size.width() || scratch.height() < size.height() )
|
if ( scratch.width() < size.width() || scratch.height() < size.height() )
|
||||||
{
|
{
|
||||||
int w = qCeil( size.width() / 128. ) * 128;
|
int w = ( size.width() + 128 ) & ~128;
|
||||||
int h = qCeil( size.height() / 128. ) * 128;
|
int h = ( size.height() + 128 ) & ~128;
|
||||||
scratch = QPixmap( qMax( scratch.width(), w ), qMax( scratch.height(), h ) );
|
scratch = QPixmap( qMax( scratch.width(), w ), qMax( scratch.height(), h ) );
|
||||||
}
|
}
|
||||||
scratch.fill( Qt::transparent );
|
scratch.fill( Qt::transparent );
|
||||||
|
|
Loading…
Reference in a new issue