mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 03:06:20 +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();
|
||||
}
|
||||
|
||||
void TestScriptingInterface::clearCaches() {
|
||||
qApp->reloadResourceCaches();
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,11 @@ public slots:
|
|||
|
||||
Q_INVOKABLE void profileRange(const QString& name, QScriptValue function);
|
||||
|
||||
/**jsdoc
|
||||
* Clear all caches (menu command Reload Content)
|
||||
*/
|
||||
void clearCaches();
|
||||
|
||||
private:
|
||||
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
||||
};
|
||||
|
|
|
@ -642,8 +642,12 @@ void NetworkTexture::ktxInitialDataRequestFinished() {
|
|||
}
|
||||
|
||||
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());
|
||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
||||
#endif
|
||||
|
||||
_ktxHeaderData = _ktxHeaderRequest->getData();
|
||||
_ktxHighMipData = _ktxMipRequest->getData();
|
||||
|
|
Loading…
Reference in a new issue