[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-framework/mart/FrameSvgTransactions] src/plasma: make clearCahce() actually make sense
From:       Marco Martin <null () kde ! org>
Date:       2017-01-31 21:09:05
Message-ID: E1cYffl-0000tQ-8w () code ! kde ! org
[Download RAW message or body]

Git commit 95f964efe77d6445ffdb838590bf3cd743a9108d by Marco Martin.
Committed on 31/01/2017 at 21:06.
Pushed by mart into branch 'mart/FrameSvgTransactions'.

make clearCahce() actually make sense

the clearCache() implementation wasn't really working anymore
as d->frames didn't have more than one (or two in case of mask)
frames anymore and used the wrong key for removing from the static
sghared frames pool

Change-Id: I783600a89a60aec71ed9f218ffe195bf3de1f613

M  +6    -17   src/plasma/framesvg.cpp

https://commits.kde.org/plasma-framework/95f964efe77d6445ffdb838590bf3cd743a9108d

diff --git a/src/plasma/framesvg.cpp b/src/plasma/framesvg.cpp
index 9237ca5a5..ca9de526a 100644
--- a/src/plasma/framesvg.cpp
+++ b/src/plasma/framesvg.cpp
@@ -390,23 +390,12 @@ bool FrameSvg::cacheAllRenderedFrames() const
 
 void FrameSvg::clearCache()
 {
-   /* FrameData *frame = d->frames[d->prefix];
-
-    // delete all the frames that aren't this one
-    QMutableHashIterator<QString, FrameData *> it(d->frames);
-    while (it.hasNext()) {
-        FrameData *p = it.next().value();
-        if (frame != p) {
-            //TODO: should we clear from the Theme pixmap cache as well?
-            if (p->deref(this)) {
-                const QString key = d->cacheId(p, it.key());
-                FrameSvgPrivate::s_sharedFrames[p->theme].remove(key);
-                p->cachedBackground = QPixmap();
-            }
-
-            it.remove();
-        }
-    }*/
+    if (d->frame) {
+        d->frame->cachedBackground = QPixmap();
+    }
+    if (d->maskFrame) {
+        d->maskFrame->cachedBackground = QPixmap();
+    }
 }
 
 QPixmap FrameSvg::framePixmap()
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic