From 3942c5279e36589cf327a375d24afc6949cf6576 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 19 Sep 2017 13:57:12 +0200 Subject: [PATCH] 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 --- src/plasma/framesvg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plasma/framesvg.cpp b/src/plasma/framesvg.cpp index 78a4899b8..65af061fc 100644 --- a/src/plasma/framesvg.cpp +++ b/src/plasma/framesvg.cpp @@ -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();