aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-10-26 20:28:13 -0700
committerMcCabe Maxsted2010-10-26 20:28:13 -0700
commit0ce836866afbce3a090f2fde91c0f3aa1d2dd95e (patch)
tree8c9aad9e0971bff4e25303805ddcf2209c5786f6 /linden/indra
parentFixed media plugin test not compiling (diff)
parentAdd missing skin thumbnail to artwork and move them to the right directory. (diff)
downloadmeta-impy-0ce836866afbce3a090f2fde91c0f3aa1d2dd95e.zip
meta-impy-0ce836866afbce3a090f2fde91c0f3aa1d2dd95e.tar.gz
meta-impy-0ce836866afbce3a090f2fde91c0f3aa1d2dd95e.tar.bz2
meta-impy-0ce836866afbce3a090f2fde91c0f3aa1d2dd95e.tar.xz
Merge remote branch 'origin/webkit_plugins' into webkit_plugins
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/cmake/ViewerMiscLibs.cmake8
-rw-r--r--linden/indra/llui/llnotifications.cpp4
-rw-r--r--linden/indra/llvfs/llvfs.cpp5
-rw-r--r--linden/indra/newview/llappviewer.cpp20
-rw-r--r--linden/indra/newview/llfeaturemanager.cpp11
-rw-r--r--linden/indra/newview/lltexturecache.cpp54
-rw-r--r--linden/indra/newview/lltexturecache.h1
-rw-r--r--linden/indra/newview/skins/default/textures/textures.xml1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml1
9 files changed, 58 insertions, 47 deletions
diff --git a/linden/indra/cmake/ViewerMiscLibs.cmake b/linden/indra/cmake/ViewerMiscLibs.cmake
index 7fe1040..35f4e3a 100644
--- a/linden/indra/cmake/ViewerMiscLibs.cmake
+++ b/linden/indra/cmake/ViewerMiscLibs.cmake
@@ -8,6 +8,14 @@ if (NOT STANDALONE)
8 use_prebuilt_binary(32bitcompatibilitylibs) 8 use_prebuilt_binary(32bitcompatibilitylibs)
9 endif(LINUX AND ${ARCH} STREQUAL "x86_64") 9 endif(LINUX AND ${ARCH} STREQUAL "x86_64")
10 use_prebuilt_binary(fontconfig) 10 use_prebuilt_binary(fontconfig)
11else (NOT STANDALONE)
12 # Download there even when using standalone.
13 set(STANDALONE OFF)
14 use_prebuilt_binary(vivox)
15 if(LINUX AND ${ARCH} STREQUAL "x86_64")
16 use_prebuilt_binary(32bitcompatibilitylibs)
17 endif(LINUX AND ${ARCH} STREQUAL "x86_64")
18 set(STANDALONE ON)
11endif(NOT STANDALONE) 19endif(NOT STANDALONE)
12 20
13if (WINDOWS) 21if (WINDOWS)
diff --git a/linden/indra/llui/llnotifications.cpp b/linden/indra/llui/llnotifications.cpp
index 2459110..4d3ff46 100644
--- a/linden/indra/llui/llnotifications.cpp
+++ b/linden/indra/llui/llnotifications.cpp
@@ -1190,13 +1190,13 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements)
1190 if (found != replacements.end()) 1190 if (found != replacements.end())
1191 { 1191 {
1192 replacement = found->second; 1192 replacement = found->second;
1193 //llwarns << "replaceSubstituionStrings: value: " << value << " repl: " << replacement << llendl; 1193 //llinfos << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << llendl;
1194 1194
1195 it->second->setValue(replacement); 1195 it->second->setValue(replacement);
1196 } 1196 }
1197 else 1197 else
1198 { 1198 {
1199 llwarns << "replaceSubstituionStrings FAILURE: value: " << value << " repl: " << replacement << llendl; 1199 llwarns << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << llendl;
1200 } 1200 }
1201 } 1201 }
1202 } 1202 }
diff --git a/linden/indra/llvfs/llvfs.cpp b/linden/indra/llvfs/llvfs.cpp
index 7df2a81..9bf5b59 100644
--- a/linden/indra/llvfs/llvfs.cpp
+++ b/linden/indra/llvfs/llvfs.cpp
@@ -583,8 +583,9 @@ LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename
583 } 583 }
584 } 584 }
585 585
586 LL_WARNS("VFS") << "Using index file " << mIndexFilename << LL_ENDL; 586 // Success!
587 LL_WARNS("VFS") << "Using data file " << mDataFilename << LL_ENDL; 587 LL_INFOS("VFS") << "Using index file " << mIndexFilename << LL_ENDL;
588 LL_INFOS("VFS") << "Using data file " << mDataFilename << LL_ENDL;
588 589
589 mValid = VFSVALID_OK; 590 mValid = VFSVALID_OK;
590} 591}
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 545b7e4..5b34e82 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -442,8 +442,6 @@ static void settings_to_globals()
442 gMapScale = gSavedSettings.getF32("MapScale"); 442 gMapScale = gSavedSettings.getF32("MapScale");
443 LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); 443 LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips");
444 444
445 LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
446
447 LLSlider::setScrollWheelMultiplier( gSavedSettings.getS32("SliderScrollWheelMultiplier") ); 445 LLSlider::setScrollWheelMultiplier( gSavedSettings.getS32("SliderScrollWheelMultiplier") );
448 446
449 LLHUDEffectLookAt::sDebugLookAt = gSavedSettings.getBOOL("PersistShowLookAt"); 447 LLHUDEffectLookAt::sDebugLookAt = gSavedSettings.getBOOL("PersistShowLookAt");
@@ -788,6 +786,9 @@ bool LLAppViewer::init()
788 // 786 //
789 initWindow(); 787 initWindow();
790 788
789 // initWindow also initializes the Feature List, so now we can initialize this global.
790 LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
791
791 { 792 {
792 BOOL download = gSavedSettings.getBOOL("DownloadClientTags"); 793 BOOL download = gSavedSettings.getBOOL("DownloadClientTags");
793 794
@@ -2716,35 +2717,32 @@ void LLAppViewer::initMarkerFile()
2716 std::string llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME); 2717 std::string llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME);
2717 std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); 2718 std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME);
2718 2719
2719
2720 if (LLAPRFile::isExist(mMarkerFileName, LL_APR_RB) && !anotherInstanceRunning()) 2720 if (LLAPRFile::isExist(mMarkerFileName, LL_APR_RB) && !anotherInstanceRunning())
2721 { 2721 {
2722 gLastExecEvent = LAST_EXEC_FROZE; 2722 gLastExecEvent = LAST_EXEC_FROZE;
2723 LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL; 2723 LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL;
2724 } 2724 }
2725
2726 if(LLAPRFile::isExist(logout_marker_file, LL_APR_RB)) 2725 if(LLAPRFile::isExist(logout_marker_file, LL_APR_RB))
2727 { 2726 {
2728 LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << LL_ENDL;
2729 gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; 2727 gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
2728 LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
2729 LLAPRFile::remove(logout_marker_file);
2730 } 2730 }
2731 if(LLAPRFile::isExist(llerror_marker_file, LL_APR_RB)) 2731 if(LLAPRFile::isExist(llerror_marker_file, LL_APR_RB))
2732 { 2732 {
2733 llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl;
2734 if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; 2733 if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
2735 else gLastExecEvent = LAST_EXEC_LLERROR_CRASH; 2734 else gLastExecEvent = LAST_EXEC_LLERROR_CRASH;
2735 LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
2736 LLAPRFile::remove(llerror_marker_file);
2736 } 2737 }
2737 if(LLAPRFile::isExist(error_marker_file, LL_APR_RB)) 2738 if(LLAPRFile::isExist(error_marker_file, LL_APR_RB))
2738 { 2739 {
2739 LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << LL_ENDL;
2740 if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; 2740 if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
2741 else gLastExecEvent = LAST_EXEC_OTHER_CRASH; 2741 else gLastExecEvent = LAST_EXEC_OTHER_CRASH;
2742 LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL;
2743 LLAPRFile::remove(error_marker_file);
2742 } 2744 }
2743 2745
2744 LLAPRFile::remove(logout_marker_file);
2745 LLAPRFile::remove(llerror_marker_file);
2746 LLAPRFile::remove(error_marker_file);
2747
2748 // No new markers if another instance is running. 2746 // No new markers if another instance is running.
2749 if(anotherInstanceRunning()) 2747 if(anotherInstanceRunning())
2750 { 2748 {
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp
index 35613b7..54da31b 100644
--- a/linden/indra/newview/llfeaturemanager.cpp
+++ b/linden/indra/newview/llfeaturemanager.cpp
@@ -250,11 +250,9 @@ BOOL LLFeatureManager::loadFeatureTables()
250 mTableVersion = version; 250 mTableVersion = version;
251 251
252 LLFeatureList *flp = NULL; 252 LLFeatureList *flp = NULL;
253 while (!file.eof() && file.good()) 253 while (file >> name)
254 { 254 {
255 char buffer[MAX_STRING]; /*Flawfinder: ignore*/ 255 char buffer[MAX_STRING]; /*Flawfinder: ignore*/
256
257 file >> name;
258 256
259 if (name.substr(0,2) == "//") 257 if (name.substr(0,2) == "//")
260 { 258 {
@@ -263,13 +261,6 @@ BOOL LLFeatureManager::loadFeatureTables()
263 continue; 261 continue;
264 } 262 }
265 263
266 if (name.empty())
267 {
268 // This is a blank line
269 file.getline(buffer, MAX_STRING);
270 continue;
271 }
272
273 if (name == "list") 264 if (name == "list")
274 { 265 {
275 if (flp) 266 if (flp)
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp
index a9b7f81..a1a9a39 100644
--- a/linden/indra/newview/lltexturecache.cpp
+++ b/linden/indra/newview/lltexturecache.cpp
@@ -1172,7 +1172,7 @@ void LLTextureCache::readHeaderCache()
1172 U32 empty_entries = 0; 1172 U32 empty_entries = 0;
1173 typedef std::pair<U32, LLUUID> lru_data_t; 1173 typedef std::pair<U32, LLUUID> lru_data_t;
1174 std::set<lru_data_t> lru; 1174 std::set<lru_data_t> lru;
1175 std::vector<LLUUID> purge_list; 1175 std::set<LLUUID> purge_list;
1176 for (U32 i=0; i<num_entries; i++) 1176 for (U32 i=0; i<num_entries; i++)
1177 { 1177 {
1178 Entry& entry = entries[i]; 1178 Entry& entry = entries[i];
@@ -1191,27 +1191,23 @@ void LLTextureCache::readHeaderCache()
1191 { 1191 {
1192 // Shouldn't happen, failsafe only 1192 // Shouldn't happen, failsafe only
1193 llwarns << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << llendl; 1193 llwarns << "Bad entry: " << i << ": " << entry.mID << ": BodySize: " << entry.mBodySize << llendl;
1194 purge_list.push_back(id); 1194 purge_list.insert(id);
1195 } 1195 }
1196 } 1196 }
1197 } 1197 }
1198 } 1198 }
1199 if (num_entries > sCacheMaxEntries) 1199 if (num_entries - empty_entries > sCacheMaxEntries)
1200 { 1200 {
1201 // Special case: cache size was reduced, need to remove entries 1201 // Special case: cache size was reduced, need to remove entries
1202 // Note: After we prune entries, we will call this again and create the LRU 1202 // Note: After we prune entries, we will call this again and create the LRU
1203 U32 entries_to_purge = (num_entries-empty_entries) - sCacheMaxEntries; 1203 U32 entries_to_purge = (num_entries - empty_entries) - sCacheMaxEntries;
1204 llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl; 1204 llinfos << "Texture Cache Entries: " << num_entries << " Max: " << sCacheMaxEntries << " Empty: " << empty_entries << " Purging: " << entries_to_purge << llendl;
1205 if (entries_to_purge > 0) 1205 // We can exit the following loop with the given condition, since if we'd reach the end of the lru set we'd have:
1206 // purge_list.size() = lru.size() = num_entries - empty_entries = entries_to_purge + sCacheMaxEntries >= entries_to_purge
1207 for (std::set<lru_data_t>::iterator iter = lru.begin(); purge_list.size() < entries_to_purge; ++iter)
1206 { 1208 {
1207 for (std::set<lru_data_t>::iterator iter = lru.begin(); iter != lru.end(); ++iter) 1209 purge_list.insert(iter->second);
1208 {
1209 purge_list.push_back(iter->second);
1210 if (purge_list.size() >= entries_to_purge)
1211 break;
1212 }
1213 } 1210 }
1214 llassert_always(purge_list.size() >= entries_to_purge);
1215 } 1211 }
1216 else 1212 else
1217 { 1213 {
@@ -1227,11 +1223,9 @@ void LLTextureCache::readHeaderCache()
1227 1223
1228 if (purge_list.size() > 0) 1224 if (purge_list.size() > 0)
1229 { 1225 {
1230 for (std::vector<LLUUID>::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) 1226 for (std::set<LLUUID>::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter)
1231 { 1227 {
1232 mHeaderMutex.unlock(); 1228 removeFromCacheLocked(*iter);
1233 removeFromCache(*iter);
1234 mHeaderMutex.lock();
1235 } 1229 }
1236 // If we removed any entries, we need to rebuild the entries list, 1230 // If we removed any entries, we need to rebuild the entries list,
1237 // write the header, and call this again 1231 // write the header, and call this again
@@ -1250,7 +1244,7 @@ void LLTextureCache::readHeaderCache()
1250 writeEntriesAndClose(new_entries); 1244 writeEntriesAndClose(new_entries);
1251 mHeaderMutex.unlock(); // unlock the mutex before calling again 1245 mHeaderMutex.unlock(); // unlock the mutex before calling again
1252 readHeaderCache(); // repeat with new entries file 1246 readHeaderCache(); // repeat with new entries file
1253 mHeaderMutex.lock(); 1247 return;
1254 } 1248 }
1255 else 1249 else
1256 { 1250 {
@@ -1345,7 +1339,7 @@ void LLTextureCache::purgeTextures(bool validate)
1345 if (validate) 1339 if (validate)
1346 { 1340 {
1347 validate_idx = gSavedSettings.getU32("CacheValidateCounter"); 1341 validate_idx = gSavedSettings.getU32("CacheValidateCounter");
1348 U32 next_idx = (++validate_idx) % 256; 1342 U32 next_idx = (validate_idx + 1) % 256;
1349 gSavedSettings.setU32("CacheValidateCounter", next_idx); 1343 gSavedSettings.setU32("CacheValidateCounter", next_idx);
1350 LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL; 1344 LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL;
1351 } 1345 }
@@ -1388,7 +1382,15 @@ void LLTextureCache::purgeTextures(bool validate)
1388 { 1382 {
1389 purge_count++; 1383 purge_count++;
1390 LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL; 1384 LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL;
1391 LLAPRFile::remove(filename); 1385 if (entries[idx].mBodySize > 0)
1386 {
1387 LLAPRFile::remove(filename);
1388 }
1389 else if (LLAPRFile::isExist(filename)) // Sanity check. Shouldn't exist.
1390 {
1391 LL_WARNS("TextureCache") << "Entry has zero body size but existing " << filename << ". Deleting file too..." << LL_ENDL;
1392 LLAPRFile::remove(filename);
1393 }
1392 cache_size -= entries[idx].mBodySize; 1394 cache_size -= entries[idx].mBodySize;
1393 mTexturesSizeTotal -= entries[idx].mBodySize; 1395 mTexturesSizeTotal -= entries[idx].mBodySize;
1394 entries[idx].mBodySize = 0; 1396 entries[idx].mBodySize = 0;
@@ -1615,7 +1617,6 @@ bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id)
1615{ 1617{
1616 if (!mReadOnly) 1618 if (!mReadOnly)
1617 { 1619 {
1618 LLMutexLock lock(&mHeaderMutex);
1619 Entry entry; 1620 Entry entry;
1620 S32 idx = openAndReadEntry(id, entry, false); 1621 S32 idx = openAndReadEntry(id, entry, false);
1621 if (idx >= 0) 1622 if (idx >= 0)
@@ -1632,17 +1633,26 @@ bool LLTextureCache::removeHeaderCacheEntry(const LLUUID& id)
1632 return false; 1633 return false;
1633} 1634}
1634 1635
1635void LLTextureCache::removeFromCache(const LLUUID& id) 1636void LLTextureCache::removeFromCacheLocked(const LLUUID& id)
1636{ 1637{
1637 //llwarns << "Removing texture from cache: " << id << llendl; 1638 //llwarns << "Removing texture from cache: " << id << llendl;
1638 if (!mReadOnly) 1639 if (!mReadOnly)
1639 { 1640 {
1640 removeHeaderCacheEntry(id); 1641 removeHeaderCacheEntry(id);
1641 LLMutexLock lock(&mHeaderMutex);
1642 LLAPRFile::remove(getTextureFileName(id)); 1642 LLAPRFile::remove(getTextureFileName(id));
1643 } 1643 }
1644} 1644}
1645 1645
1646void LLTextureCache::removeFromCache(const LLUUID& id)
1647{
1648 //llwarns << "Removing texture from cache: " << id << llendl;
1649 if (!mReadOnly)
1650 {
1651 LLMutexLock lock(&mHeaderMutex);
1652 LLTextureCache::removeFromCacheLocked(id);
1653 }
1654}
1655
1646////////////////////////////////////////////////////////////////////////////// 1656//////////////////////////////////////////////////////////////////////////////
1647 1657
1648LLTextureCache::ReadResponder::ReadResponder() 1658LLTextureCache::ReadResponder::ReadResponder()
diff --git a/linden/indra/newview/lltexturecache.h b/linden/indra/newview/lltexturecache.h
index 45804c2..c859b9a 100644
--- a/linden/indra/newview/lltexturecache.h
+++ b/linden/indra/newview/lltexturecache.h
@@ -158,6 +158,7 @@ private:
158 S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize); 158 S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize);
159 S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize); 159 S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize);
160 bool removeHeaderCacheEntry(const LLUUID& id); 160 bool removeHeaderCacheEntry(const LLUUID& id);
161 void removeFromCacheLocked(const LLUUID& id);
161 162
162private: 163private:
163 // Internal 164 // Internal
diff --git a/linden/indra/newview/skins/default/textures/textures.xml b/linden/indra/newview/skins/default/textures/textures.xml
index f2189a4..60fb4e0 100644
--- a/linden/indra/newview/skins/default/textures/textures.xml
+++ b/linden/indra/newview/skins/default/textures/textures.xml
@@ -396,5 +396,6 @@
396 <texture name="media_btn_scrollup.png"/> 396 <texture name="media_btn_scrollup.png"/>
397 <texture name="media_btn_stoploading.png"/> 397 <texture name="media_btn_stoploading.png"/>
398 <texture name="media_panel_divider.png"/> 398 <texture name="media_panel_divider.png"/>
399 <texture name="media_panel_scrollbg.png"/>
399 400
400</textures> 401</textures>
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index 78295d4..47eea07 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -7026,6 +7026,7 @@ IM history could not be found for [NAME].
7026 type="alert"> 7026 type="alert">
7027Show Look At is a debug setting that displays where an avatar's head is looking. Be aware: this will *NOT* show where an avatar's camera is actually pointed. This setting should not be relied on for any form of privacy! 7027Show Look At is a debug setting that displays where an avatar's head is looking. Be aware: this will *NOT* show where an avatar's camera is actually pointed. This setting should not be relied on for any form of privacy!
7028 <usetemplate 7028 <usetemplate
7029 ignoretext="When setting Show Look At"
7029 name="okignore" 7030 name="okignore"
7030 yestext="OK"/> 7031 yestext="OK"/>
7031</notification> 7032</notification>