don't recreate a null pixmap

if we already have a null pixmap, don't recreate a new one

this saves some pixmap ceation on destructors
reviewed-by:davidedmundson
This commit is contained in:
Marco Martin 2017-09-19 13:57:12 +02:00
parent c707f6074c
commit 3942c5279e

View File

@ -837,7 +837,9 @@ void FrameSvgPrivate::updateSizes(FrameData *frame) const
QSize s = q->size();
q->resize();
frame->cachedBackground = QPixmap();
if (!frame->cachedBackground.isNull()) {
frame->cachedBackground = QPixmap();
}
//This has the same size regardless the border is enabled or not
frame->fixedTopHeight = q->elementSize(frame->prefix % QLatin1String("top")).height();