My first kommit! ;)
Use the local rect cache when possible. This gives another performace boost to painting code. svn path=/trunk/KDE/kdelibs/; revision=892539
This commit is contained in:
parent
b596d894e5
commit
dd61c4ef02
6
svg.cpp
6
svg.cpp
@ -483,9 +483,13 @@ bool Svg::hasElement(const QString &elementId) const
|
||||
return false;
|
||||
}
|
||||
|
||||
QString id = d->cacheId(elementId);
|
||||
if (d->localRectCache.contains(id)) {
|
||||
return d->localRectCache[id].isValid();
|
||||
}
|
||||
|
||||
QRectF elementRect;
|
||||
bool found = Theme::defaultTheme()->findInRectsCache(d->path, d->cacheId(elementId), elementRect);
|
||||
bool found = Theme::defaultTheme()->findInRectsCache(d->path, id, elementRect);
|
||||
|
||||
if (found) {
|
||||
return elementRect.isValid();
|
||||
|
Loading…
Reference in New Issue
Block a user