Revert "Don't tear down renderer and other busy work when Svg::setImagePath is invoked with the same arg"

This reverts commit 4ce50cc61f.

This caused a regression with toggling compositing, causing SVG reloads
with the same path to switch to opague elements. As this revision was
meant as a performance optimization, it can be reverted with no other
consequence for now.
This commit is contained in:
Eike Hein 2017-12-16 20:16:38 +09:00
parent 421172bd3d
commit 2956419c7e
2 changed files with 0 additions and 7 deletions

View File

@ -104,7 +104,6 @@ public:
QHash<QString, QRectF> localRectCache; QHash<QString, QRectF> localRectCache;
QHash<QString, QSize> elementsWithSizeHints; QHash<QString, QSize> elementsWithSizeHints;
SharedSvgRenderer::Ptr renderer; SharedSvgRenderer::Ptr renderer;
QString requestedPath;
QString themePath; QString themePath;
QString path; QString path;
QSizeF size; QSizeF size;

View File

@ -182,12 +182,6 @@ QString SvgPrivate::cachePath(const QString &path, const QSize &size) const
bool SvgPrivate::setImagePath(const QString &imagePath) bool SvgPrivate::setImagePath(const QString &imagePath)
{ {
if (requestedPath == imagePath) {
return false;
}
requestedPath = imagePath;
QString actualPath = imagePath; QString actualPath = imagePath;
if (imagePath.startsWith(QLatin1String("file://"))) { if (imagePath.startsWith(QLatin1String("file://"))) {
//length of file:// //length of file://