mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:16:56 +02:00
Merge pull request #12835 from NissimHadar/speedUp1
ktxInitialDataRequestFinished call to qcDebug(networking) - only in DEBUG
This commit is contained in:
commit
77a27b2be7
3 changed files with 13 additions and 0 deletions
|
@ -156,3 +156,7 @@ void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn)
|
||||||
fn.call();
|
fn.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestScriptingInterface::clearCaches() {
|
||||||
|
qApp->reloadResourceCaches();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,11 @@ public slots:
|
||||||
|
|
||||||
Q_INVOKABLE void profileRange(const QString& name, QScriptValue function);
|
Q_INVOKABLE void profileRange(const QString& name, QScriptValue function);
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Clear all caches (menu command Reload Content)
|
||||||
|
*/
|
||||||
|
void clearCaches();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
||||||
};
|
};
|
||||||
|
|
|
@ -642,8 +642,12 @@ void NetworkTexture::ktxInitialDataRequestFinished() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == ResourceRequest::Success) {
|
if (result == ResourceRequest::Success) {
|
||||||
|
|
||||||
|
// This is an expensive operation that we do not want in release.
|
||||||
|
#ifdef DEBUG
|
||||||
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
||||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
||||||
|
#endif
|
||||||
|
|
||||||
_ktxHeaderData = _ktxHeaderRequest->getData();
|
_ktxHeaderData = _ktxHeaderRequest->getData();
|
||||||
_ktxHighMipData = _ktxMipRequest->getData();
|
_ktxHighMipData = _ktxMipRequest->getData();
|
||||||
|
|
Loading…
Reference in a new issue