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:
Alain Boyer 2008-12-04 14:25:40 +00:00
parent b596d894e5
commit dd61c4ef02

View File

@ -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();