mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:58:45 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into tablet-ui-edit-js
This commit is contained in:
commit
4b02e550db
3 changed files with 12 additions and 5 deletions
|
@ -5192,6 +5192,7 @@ void Application::updateWindowTitle() const {
|
||||||
#endif
|
#endif
|
||||||
_window->setWindowTitle(title);
|
_window->setWindowTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::clearDomainOctreeDetails() {
|
void Application::clearDomainOctreeDetails() {
|
||||||
|
|
||||||
// if we're about to quit, we really don't need to do any of these things...
|
// if we're about to quit, we really don't need to do any of these things...
|
||||||
|
@ -5221,6 +5222,12 @@ void Application::clearDomainOctreeDetails() {
|
||||||
skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT);
|
skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT);
|
||||||
|
|
||||||
_recentlyClearedDomain = true;
|
_recentlyClearedDomain = true;
|
||||||
|
|
||||||
|
DependencyManager::get<AvatarManager>()->clearOtherAvatars();
|
||||||
|
DependencyManager::get<AnimationCache>()->clearUnusedResources();
|
||||||
|
DependencyManager::get<ModelCache>()->clearUnusedResources();
|
||||||
|
DependencyManager::get<SoundCache>()->clearUnusedResources();
|
||||||
|
DependencyManager::get<TextureCache>()->clearUnusedResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::domainChanged(const QString& domainHostname) {
|
void Application::domainChanged(const QString& domainHostname) {
|
||||||
|
|
|
@ -221,7 +221,7 @@ ResourceCache::ResourceCache(QObject* parent) : QObject(parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceCache::~ResourceCache() {
|
ResourceCache::~ResourceCache() {
|
||||||
clearUnusedResource();
|
clearUnusedResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceCache::clearATPAssets() {
|
void ResourceCache::clearATPAssets() {
|
||||||
|
@ -265,7 +265,7 @@ void ResourceCache::clearATPAssets() {
|
||||||
|
|
||||||
void ResourceCache::refreshAll() {
|
void ResourceCache::refreshAll() {
|
||||||
// Clear all unused resources so we don't have to reload them
|
// Clear all unused resources so we don't have to reload them
|
||||||
clearUnusedResource();
|
clearUnusedResources();
|
||||||
resetResourceCounters();
|
resetResourceCounters();
|
||||||
|
|
||||||
QHash<QUrl, QWeakPointer<Resource>> resources;
|
QHash<QUrl, QWeakPointer<Resource>> resources;
|
||||||
|
@ -418,7 +418,7 @@ void ResourceCache::reserveUnusedResource(qint64 resourceSize) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceCache::clearUnusedResource() {
|
void ResourceCache::clearUnusedResources() {
|
||||||
// the unused resources may themselves reference resources that will be added to the unused
|
// the unused resources may themselves reference resources that will be added to the unused
|
||||||
// list on destruction, so keep clearing until there are no references left
|
// list on destruction, so keep clearing until there are no references left
|
||||||
QWriteLocker locker(&_unusedResourcesLock);
|
QWriteLocker locker(&_unusedResourcesLock);
|
||||||
|
|
|
@ -249,6 +249,7 @@ public:
|
||||||
|
|
||||||
void refreshAll();
|
void refreshAll();
|
||||||
void refresh(const QUrl& url);
|
void refresh(const QUrl& url);
|
||||||
|
void clearUnusedResources();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dirty();
|
void dirty();
|
||||||
|
@ -298,7 +299,7 @@ protected:
|
||||||
|
|
||||||
void addUnusedResource(const QSharedPointer<Resource>& resource);
|
void addUnusedResource(const QSharedPointer<Resource>& resource);
|
||||||
void removeUnusedResource(const QSharedPointer<Resource>& resource);
|
void removeUnusedResource(const QSharedPointer<Resource>& resource);
|
||||||
|
|
||||||
/// Attempt to load a resource if requests are below the limit, otherwise queue the resource for loading
|
/// Attempt to load a resource if requests are below the limit, otherwise queue the resource for loading
|
||||||
/// \return true if the resource began loading, otherwise false if the resource is in the pending queue
|
/// \return true if the resource began loading, otherwise false if the resource is in the pending queue
|
||||||
static bool attemptRequest(QSharedPointer<Resource> resource);
|
static bool attemptRequest(QSharedPointer<Resource> resource);
|
||||||
|
@ -309,7 +310,6 @@ private:
|
||||||
friend class Resource;
|
friend class Resource;
|
||||||
|
|
||||||
void reserveUnusedResource(qint64 resourceSize);
|
void reserveUnusedResource(qint64 resourceSize);
|
||||||
void clearUnusedResource();
|
|
||||||
void resetResourceCounters();
|
void resetResourceCounters();
|
||||||
void removeResource(const QUrl& url, qint64 size = 0);
|
void removeResource(const QUrl& url, qint64 size = 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue