History

Merge branch 'master' into 21396

David Rowe committed 9 years ago

Commit 9d0407c2 parents b26f5c5 8510b6049 files · +822 −255Browse files

Showing the changes to interface/src/Application.cpp (1 of 49 files). Show all

Unified · Split

interface/src/Application.cpp+31−8
@@ -214,7 +214,7 @@ static QTimer pingTimer; · 213 unmodified lines
214 214
215static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16;215static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16;
216 216
217// For processing on QThreadPool, we target a number of threads after reserving some 217// For processing on QThreadPool, we target a number of threads after reserving some
218// based on how many are being consumed by the application and the display plugin. However,218// based on how many are being consumed by the application and the display plugin. However,
219// we will never drop below the 'min' value219// we will never drop below the 'min' value
220static const int MIN_PROCESSING_THREAD_POOL_SIZE = 1;220static const int MIN_PROCESSING_THREAD_POOL_SIZE = 1;
@@ -888,6 +888,20 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 667 unmodified lines
888 }888 }
889 ResourceCache::setRequestLimit(concurrentDownloads);889 ResourceCache::setRequestLimit(concurrentDownloads);
890 890
891 // perhaps override the avatar url. Since we will test later for validity
892 // we don't need to do so here.
893 QString avatarURL = getCmdOption(argc, constArgv, "--avatarURL");
894 _avatarOverrideUrl = QUrl::fromUserInput(avatarURL);
895
896 // If someone specifies both --avatarURL and --replaceAvatarURL,
897 // the replaceAvatarURL wins. So only set the _overrideUrl if this
898 // does have a non-empty string.
899 QString replaceURL = getCmdOption(argc, constArgv, "--replaceAvatarURL");
900 if (!replaceURL.isEmpty()) {
901 _avatarOverrideUrl = QUrl::fromUserInput(replaceURL);
902 _saveAvatarOverrideUrl = true;
903 }
904
891 _glWidget = new GLCanvas();905 _glWidget = new GLCanvas();
892 getApplicationCompositor().setRenderingWidget(_glWidget);906 getApplicationCompositor().setRenderingWidget(_glWidget);
893 _window->setCentralWidget(_glWidget);907 _window->setCentralWidget(_glWidget);
@@ -1277,7 +1291,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 383 unmodified lines
1277 // Add periodic checks to send user activity data1291 // Add periodic checks to send user activity data
1278 static int CHECK_NEARBY_AVATARS_INTERVAL_MS = 10000;1292 static int CHECK_NEARBY_AVATARS_INTERVAL_MS = 10000;
1279 static int NEARBY_AVATAR_RADIUS_METERS = 10;1293 static int NEARBY_AVATAR_RADIUS_METERS = 10;
1280 1294
1281 // setup the stats interval depending on if the 1s faster hearbeat was requested1295 // setup the stats interval depending on if the 1s faster hearbeat was requested
1282 static const QString FAST_STATS_ARG = "--fast-heartbeat";1296 static const QString FAST_STATS_ARG = "--fast-heartbeat";
1283 static int SEND_STATS_INTERVAL_MS = arguments().indexOf(FAST_STATS_ARG) != -1 ? 1000 : 10000;1297 static int SEND_STATS_INTERVAL_MS = arguments().indexOf(FAST_STATS_ARG) != -1 ? 1000 : 10000;
@@ -1427,10 +1441,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 143 unmodified lines
1427 1441
1428 _autoSwitchDisplayModeSupportedHMDPlugin = nullptr;1442 _autoSwitchDisplayModeSupportedHMDPlugin = nullptr;
1429 foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) {1443 foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) {
1430 if (displayPlugin->isHmd() && 1444 if (displayPlugin->isHmd() &&
1431 displayPlugin->getSupportsAutoSwitch()) {1445 displayPlugin->getSupportsAutoSwitch()) {
1432 _autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin;1446 _autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin;
1433 _autoSwitchDisplayModeSupportedHMDPluginName = 1447 _autoSwitchDisplayModeSupportedHMDPluginName =
1434 _autoSwitchDisplayModeSupportedHMDPlugin->getName();1448 _autoSwitchDisplayModeSupportedHMDPlugin->getName();
1435 _previousHMDWornStatus =1449 _previousHMDWornStatus =
1436 _autoSwitchDisplayModeSupportedHMDPlugin->isDisplayVisible();1450 _autoSwitchDisplayModeSupportedHMDPlugin->isDisplayVisible();
@@ -1682,7 +1696,7 @@ void Application::onAboutToQuit() { · 245 unmodified lines
1682 }1696 }
1683 1697
1684 getActiveDisplayPlugin()->deactivate();1698 getActiveDisplayPlugin()->deactivate();
1685 if (_autoSwitchDisplayModeSupportedHMDPlugin 1699 if (_autoSwitchDisplayModeSupportedHMDPlugin
1686 && _autoSwitchDisplayModeSupportedHMDPlugin->isSessionActive()) {1700 && _autoSwitchDisplayModeSupportedHMDPlugin->isSessionActive()) {
1687 _autoSwitchDisplayModeSupportedHMDPlugin->endSession();1701 _autoSwitchDisplayModeSupportedHMDPlugin->endSession();
1688 }1702 }
@@ -1751,8 +1765,8 @@ void Application::cleanupBeforeQuit() { · 62 unmodified lines
1751 1765
1752 // Cleanup all overlays after the scripts, as scripts might add more1766 // Cleanup all overlays after the scripts, as scripts might add more
1753 _overlays.cleanupAllOverlays();1767 _overlays.cleanupAllOverlays();
1754 // The cleanup process enqueues the transactions but does not process them. Calling this here will force the actual 1768 // The cleanup process enqueues the transactions but does not process them. Calling this here will force the actual
1755 // removal of the items. 1769 // removal of the items.
1756 // See https://highfidelity.fogbugz.com/f/cases/53281770 // See https://highfidelity.fogbugz.com/f/cases/5328
1757 _main3DScene->processTransactionQueue();1771 _main3DScene->processTransactionQueue();
1758 1772
@@ -5265,7 +5279,7 @@ void Application::clearDomainOctreeDetails() { · 3506 unmodified lines
5265 skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT);5279 skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT);
5266 5280
5267 _recentlyClearedDomain = true;5281 _recentlyClearedDomain = true;
5268 5282
5269 DependencyManager::get<AnimationCache>()->clearUnusedResources();5283 DependencyManager::get<AnimationCache>()->clearUnusedResources();
5270 DependencyManager::get<ModelCache>()->clearUnusedResources();5284 DependencyManager::get<ModelCache>()->clearUnusedResources();
5271 DependencyManager::get<SoundCache>()->clearUnusedResources();5285 DependencyManager::get<SoundCache>()->clearUnusedResources();
@@ -5329,6 +5343,10 @@ void Application::nodeActivated(SharedNodePointer node) { · 57 unmodified lines
5329 if (node->getType() == NodeType::AvatarMixer) {5343 if (node->getType() == NodeType::AvatarMixer) {
5330 // new avatar mixer, send off our identity packet on next update loop5344 // new avatar mixer, send off our identity packet on next update loop
5331 // Reset skeletonModelUrl if the last server modified our choice.5345 // Reset skeletonModelUrl if the last server modified our choice.
5346 // Override the avatar url (but not model name) here too.
5347 if (_avatarOverrideUrl.isValid()) {
5348 getMyAvatar()->useFullAvatarURL(_avatarOverrideUrl);
5349 }
5332 static const QUrl empty{};5350 static const QUrl empty{};
5333 if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->cannonicalSkeletonModelURL(empty)) {5351 if (getMyAvatar()->getFullAvatarURLFromPreferences() != getMyAvatar()->cannonicalSkeletonModelURL(empty)) {
5334 getMyAvatar()->resetFullAvatarURL();5352 getMyAvatar()->resetFullAvatarURL();
@@ -7083,3 +7101,8 @@ QUuid Application::getTabletFrameID() const { · 1748 unmodified lines
7083 auto HMD = DependencyManager::get<HMDScriptingInterface>();7101 auto HMD = DependencyManager::get<HMDScriptingInterface>();
7084 return HMD->getCurrentTabletFrameID();7102 return HMD->getCurrentTabletFrameID();
7085}7103}
7104
7105void Application::setAvatarOverrideUrl(const QUrl& url, bool save) {
7106 _avatarOverrideUrl = url;
7107 _saveAvatarOverrideUrl = save;
7108}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t