From b50df60aa180e904aa0733bb60cef91cf9df6ff6 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 21 Apr 2016 16:13:39 -0700 Subject: DRTVWR-418 remove vestiges of TCMALLOC and GooglePerfTools from the viewer --- indra/newview/CMakeLists.txt | 16 +--------------- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/viewer_manifest.py | 5 +---- 3 files changed, 2 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index bb745bcb43..158233ca47 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -13,7 +13,6 @@ include(DragDrop) include(EXPAT) include(FMODEX) include(GLOD) -include(GooglePerfTools) include(Hunspell) include(JsonCpp) include(LLAppearance) @@ -1671,7 +1670,7 @@ if (WINDOWS) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES # *TODO -reenable this once we get server usage sorted out - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS} /LARGEADDRESSAWARE" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO /LARGEADDRESSAWARE" LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF /LARGEADDRESSAWARE" ) @@ -1693,20 +1692,8 @@ if (WINDOWS) # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py # and have the build deps get tracked *please* tell me about it. - if(USE_TCMALLOC) - # Configure a var for tcmalloc location, if used. - # Note the need to specify multiple names explicitly. - set(GOOGLE_PERF_TOOLS_SOURCE - ${SHARED_LIB_STAGING_DIR}/Release/libtcmalloc_minimal.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libtcmalloc_minimal.dll - ${SHARED_LIB_STAGING_DIR}/Debug/libtcmalloc_minimal-debug.dll - ) - endif(USE_TCMALLOC) - - set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. - #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll ${CMAKE_SOURCE_DIR}/../etc/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll @@ -1948,7 +1935,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLLOGIN_LIBRARIES} ${LLPHYSICS_LIBRARIES} ${LLPHYSICSEXTENSIONS_LIBRARIES} - ${TCMALLOC_LIBRARIES} ${LLAPPEARANCE_LIBRARIES} ) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c4a8fe3532..6102c6f15c 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6321,17 +6321,6 @@ Value 512 - MemProfiling - - Comment - You want to use tcmalloc's memory profiling options. - Persist - 1 - Type - Boolean - Value - 0 - MenuAccessKeyTime Comment diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1c77cf805e..22b0e1ffc1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -378,10 +378,7 @@ class Windows_i686_Manifest(ViewerManifest): print "Skipping fmodex audio library(assuming other audio engine)" # For textures - if self.args['configuration'].lower() == 'debug': - self.path("openjpegd.dll") - else: - self.path("openjpeg.dll") + self.path("openjpeg.dll") # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx -- cgit v1.2.3 From e8aa2dd71fff7a39f2b03039b23afa8bdf804fcb Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 14:58:25 +0200 Subject: x64: Do not use a union of LLColor4U. Especially having the two pointer in there will blow up the struct to at least 8 byte, which will break VBO packing as this class needs to be 4 byte in size. (transplanted from 847df86d6b5daa69dcfc428df18876a9c1e8bef6) --- indra/newview/llface.cpp | 4 ++-- indra/newview/llnetmap.cpp | 6 +++--- indra/newview/llvosky.cpp | 2 +- indra/newview/llvosky.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index de349a03d4..481c66aaf5 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2132,7 +2132,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLVector4a src; U32 vec[4]; - vec[0] = vec[1] = vec[2] = vec[3] = color.mAll; + vec[0] = vec[1] = vec[2] = vec[3] = color.asRGBA(); src.loadua((F32*) vec); @@ -2168,7 +2168,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLColor4U glow4u = LLColor4U(0,0,0,glow); - U32 glow32 = glow4u.mAll; + U32 glow32 = glow4u.asRGBA(); U32 vec[4]; vec[0] = vec[1] = vec[2] = vec[3] = glow32; diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 5fc73c67d1..72faa5a9e7 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -735,7 +735,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = px + py * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } // top line @@ -748,7 +748,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = px + py * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } } else @@ -770,7 +770,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = p_x + p_y * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } } } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 4dab213fa0..6b4a450e6f 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -283,7 +283,7 @@ void LLSkyTex::create(const F32 brightness) S32 offset = basic_offset * sComponents; U32* pix = (U32*)(data + offset); LLColor4U temp = LLColor4U(mSkyData[basic_offset]); - *pix = temp.mAll; + *pix = temp.asRGBA(); } } createGLImage(sCurrent); diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index ee8e91fb71..9cfb9773bd 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -171,7 +171,7 @@ protected: { S32 offset = (i * sResolution + j) * sComponents; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); - *pix = col.mAll; + *pix = col.asRGBA(); } LLColor4U getPixel(const S32 i, const S32 j) @@ -179,7 +179,7 @@ protected: LLColor4U col; S32 offset = (i * sResolution + j) * sComponents; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); - col.mAll = *pix; + col.fromRGBA( *pix ); return col; } -- cgit v1.2.3 From 92d7eaaf07f3b764a9c626c148a2a5652df590ad Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 17 Nov 2016 17:50:55 -0500 Subject: DRTVWR-418: Provide Darwin_i686_Manifest alias to Darwin_i386_Manifest. It's never been clear to me why Macs tend to refer to 32-bit Intel processors as i386 when other platforms tend to refer to them as i686. New CMake logic to derive ARCH from ADDRESS_SIZE produces i686. Give viewer_manifest.py a Darwin_i686_Manifest class alias so it continues to work when arch is passed as i686 as well as i386. --- indra/newview/viewer_manifest.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 29751edfac..1b6e8c9747 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1049,6 +1049,10 @@ class Darwin_i386_Manifest(ViewerManifest): self.package_file = finalname self.remove(sparsename) +class Darwin_i686_Manifest(Darwin_i386_Manifest): + """alias in case arch is passed as i686 instead of i386""" + pass + class LinuxManifest(ViewerManifest): def construct(self): super(LinuxManifest, self).construct() -- cgit v1.2.3 From a47e16b3169b2fd91faf7a4dbfbba1f305298bce Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 30 Nov 2016 16:48:38 -0500 Subject: DRTVWR-418: Flesh out the set of Platform_arch_Manifest classes. --- indra/newview/viewer_manifest.py | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1b6e8c9747..589d74a014 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -287,7 +287,8 @@ class ViewerManifest(LLManifest): random.shuffle(names) return ', '.join(names) -class Windows_i686_Manifest(ViewerManifest): + +class WindowsManifest(ViewerManifest): def final_exe(self): return self.app_name_oneword()+".exe" @@ -338,7 +339,7 @@ class Windows_i686_Manifest(ViewerManifest): print "Doesn't exist:", src def construct(self): - super(Windows_i686_Manifest, self).construct() + super(WindowsManifest, self).construct() pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") @@ -696,7 +697,17 @@ class Windows_i686_Manifest(ViewerManifest): self.package_file = installer_file -class Darwin_i386_Manifest(ViewerManifest): +class Windows_i686_Manifest(WindowsManifest): + # specialize when we must + pass + + +class Windows_x86_64_Manifest(WindowsManifest): + # specialize when we must + pass + + +class DarwinManifest(ViewerManifest): def is_packaging_viewer(self): # darwin requires full app bundle packaging even for debugging. return True @@ -722,7 +733,7 @@ class Darwin_i386_Manifest(ViewerManifest): # most everything goes in the Resources directory if self.prefix(src="", dst="Resources"): - super(Darwin_i386_Manifest, self).construct() + super(DarwinManifest, self).construct() if self.prefix("cursors_mac"): self.path("*.tif") @@ -1049,10 +1060,20 @@ class Darwin_i386_Manifest(ViewerManifest): self.package_file = finalname self.remove(sparsename) -class Darwin_i686_Manifest(Darwin_i386_Manifest): + +class Darwin_i386_Manifest(DarwinManifest): + pass + + +class Darwin_i686_Manifest(DarwinManifest): """alias in case arch is passed as i686 instead of i386""" pass + +class Darwin_x86_64_Manifest(DarwinManifest): + pass + + class LinuxManifest(ViewerManifest): def construct(self): super(LinuxManifest, self).construct() -- cgit v1.2.3 From 222919be87386af66bba836fbb9495b64b4007f4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 30 Nov 2016 20:10:28 -0500 Subject: DRTVWR-418: Adjust for LL_VIEWER_CHANNEL coming in unquoted. Evidently the LL_VIEWER_CHANNEL macro (defined on the compiler command line) used to contain enclosing double quotes. Something changed (newer CMake version?) so that the macro now expands as Second Life Release rather than as "Second Life Release". That leads to syntax errors when it's used. Add C++ preprocessor trickery to stringize the value of the macro. --- indra/newview/llversioninfo.cpp | 8 +++++++- indra/newview/tests/llversioninfo_test.cpp | 11 +++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index a0ca91672a..375dce485d 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -99,10 +99,16 @@ const std::string &LLVersionInfo::getShortVersion() namespace { + // LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The + // macro expands to the string name of the channel, but without quotes. We + // need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) + /// Storage of the channel name the viewer is using. // The channel name is set by hardcoded constant, // or by calling LLVersionInfo::resetChannel() - std::string sWorkingChannelName(LL_VIEWER_CHANNEL); + std::string sWorkingChannelName(stringize_outer(LL_VIEWER_CHANNEL)); // Storage for the "version and channel" string. // This will get reset too. diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index 6b0be29c2d..f1f69f33f1 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -29,6 +29,13 @@ #include "../llversioninfo.h" +// LL_VIEWER_CHANNEL is a macro defined on the compiler command line. The +// macro expands to the string name of the channel, but without quotes. We +// need to turn it into a quoted string. This macro trick does that. +#define stringize_inner(x) #x +#define stringize_outer(x) stringize_inner(x) +#define ll_viewer_channel stringize_outer(LL_VIEWER_CHANNEL) + namespace tut { struct versioninfo @@ -50,7 +57,7 @@ namespace tut mShortVersion = stream.str(); stream.str(""); - stream << LL_VIEWER_CHANNEL + stream << ll_viewer_channel << " " << mVersion; mVersionAndChannel = stream.str(); @@ -89,7 +96,7 @@ namespace tut LL_VIEWER_VERSION_BUILD); ensure_equals("Channel version", LLVersionInfo::getChannel(), - LL_VIEWER_CHANNEL); + ll_viewer_channel); ensure_equals("Version String", LLVersionInfo::getVersion(), mVersion); -- cgit v1.2.3 From ff6369f5a7b711b1a185d6652446e9e186f91333 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 2 Dec 2016 15:53:41 -0500 Subject: show the build address size in the About box --- indra/newview/llappviewer.cpp | 1 + indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9db03a7438..0813f2c359 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3280,6 +3280,7 @@ LLSD LLAppViewer::getViewerInfo() const if (build_config != "Release") { info["BUILD_CONFIG"] = build_config; + info["ADDRESS_SIZE"] = ADDRESS_SIZE; } // return a URL to the release notes for this viewer, such as: diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9b3fb06bdf..00237d493a 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -25,7 +25,7 @@ [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] - Build Configuration [BUILD_CONFIG] + Build Configuration [BUILD_CONFIG] [ADDRESS_SIZE] bits You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP]) -- cgit v1.2.3 From 911cd64e60ac7ee7805534ec42e1ef006adf9a46 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 5 Dec 2016 13:00:50 -0500 Subject: lower the verbosity of makensis to emit only warnings and errors --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 589d74a014..d9c4cf1b9e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -669,7 +669,7 @@ class WindowsManifest(ViewerManifest): while (not installer_created) and (nsis_attempts > 0): try: nsis_attempts-=1; - self.run_command('"' + NSIS_path + '" ' + self.dst_path_of(tempfile)) + self.run_command('"' + NSIS_path + '" /V2 ' + self.dst_path_of(tempfile)) installer_created=True # if no exception was raised, the codesign worked except ManifestError, err: if nsis_attempts: -- cgit v1.2.3 From 004cd151ff068d348a24127dbeb33696d00d2748 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 5 Dec 2016 12:24:00 -0800 Subject: update copying of fmodex{64}.dll to right place for 32/64 bit builds --- indra/newview/viewer_manifest.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 589d74a014..ef93ad1ac1 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -379,8 +379,8 @@ class WindowsManifest(ViewerManifest): # Get fmodex dll, continue if missing try: - if self.args['configuration'].lower() == 'debug': - self.path("fmodexL.dll") + if(self.args['arch'].lower() == 'x86_64'): + self.path("fmodex64.dll") else: self.path("fmodex.dll") except: @@ -432,11 +432,6 @@ class WindowsManifest(ViewerManifest): self.path("featuretable.txt") self.path("featuretable_xp.txt") - # Media plugins - QuickTime - if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"): - self.path("media_plugin_quicktime.dll") - self.end_prefix() - # Media plugins - CEF if self.prefix(src='../media_plugins/cef/%s' % self.args['configuration'], dst="llplugin"): self.path("media_plugin_cef.dll") @@ -447,11 +442,6 @@ class WindowsManifest(ViewerManifest): self.path("media_plugin_libvlc.dll") self.end_prefix() - # winmm.dll shim - if self.prefix(src='../media_plugins/winmmshim/%s' % self.args['configuration'], dst=""): - self.path("winmm.dll") - self.end_prefix() - # CEF runtime files - debug if self.args['configuration'].lower() == 'debug': if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): -- cgit v1.2.3 From e6513c1eee4800b41fbdd0c45b7bfca38601a884 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 8 Dec 2016 12:31:30 -0500 Subject: DRTVWR-418: Change Mac build_directory to build-darwin-x86_64 since we no longer support 32-bit Mac builds. The old build-darwin-i386 directory name appeared in a shocking number of files. Change CMake paths to use ${CMAKE_BINARY_DIR} -- or, when trying to find the packages subdirectory, ${AUTOBUILD_INSTALL_DIR}. Change the rest to at least look for build-darwin-*. --- .../darwin/fix_application_icon_position.sh | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/darwin/fix_application_icon_position.sh b/indra/newview/installers/darwin/fix_application_icon_position.sh index 618e34820c..62abcdd07e 100755 --- a/indra/newview/installers/darwin/fix_application_icon_position.sh +++ b/indra/newview/installers/darwin/fix_application_icon_position.sh @@ -1,17 +1,23 @@ -# just run this script each time after you change the installer's name to fix the icon misalignment #!/bin/bash -cp -r ../../../../build-darwin-i386/newview/*.dmg ~/Desktop/TempBuild.dmg -hdid ~/Desktop/TempBuild.dmg -open -a finder /Volumes/Second\ Life\ Installer -osascript dmg-cleanup.applescript -umount /Volumes/Second\ Life\ Installer/ -hdid ~/Desktop/TempBuild.dmg -open -a finder /Volumes/Second\ Life\ Installer -#cp /Volumes/Second\ Life\ Installer/.DS_Store ~/Desktop/_DS_Store +# just run this script each time after you change the installer's name to fix the icon misalignment +mydir="$(dirname "$0")" +# If there's more than one DMG in more than one build directory, pick the most +# recent one. +dmgfile="$(ls -t "$mydir/../../../../build-darwin-*/newview/*.dmg" | head -n 1)" +dmgwork="$HOME/Desktop/TempBuild.dmg" +mounted="/Volumes/Second Life Installer" +cp -r "$dmgfile" "$dmgwork" +hdid "$dmgwork" +open -a finder "$mounted" +osascript "$mydir/dmg-cleanup.applescript" +umount "$mounted"/ +hdid "$dmgwork" +open -a finder "$mounted" +#cp "$mounted"/.DS_Store ~/Desktop/_DS_Store #chflags nohidden ~/Desktop/_DS_Store -#cp ~/Desktop/_DS_Store ./firstlook-dmg/_DS_Store -#cp ~/Desktop/_DS_Store ./publicnightly-dmg/_DS_Store -#cp ~/Desktop/_DS_Store ./release-dmg/_DS_Store -#cp ~/Desktop/_DS_Store ./releasecandidate-dmg/_DS_Store -#umount /Volumes/Second\ Life\ Installer/ -#rm ~/Desktop/_DS_Store ~/Desktop/TempBuild.dmg +#cp ~/Desktop/_DS_Store "$mydir/firstlook-dmg/_DS_Store" +#cp ~/Desktop/_DS_Store "$mydir/publicnightly-dmg/_DS_Store" +#cp ~/Desktop/_DS_Store "$mydir/release-dmg/_DS_Store" +#cp ~/Desktop/_DS_Store "$mydir/releasecandidate-dmg/_DS_Store" +#umount "$mounted"/ +#rm ~/Desktop/_DS_Store "$dmgwork" -- cgit v1.2.3 From 09b88cf4afee0c673671fe36636b1766296570e5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 9 Dec 2016 08:12:15 -0500 Subject: add AUTOBUILD_ADDRSIZE to symbol file name for clarity, change output tag to just "Symbolfile" --- indra/newview/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 45ba8d6eb7..26e56d0119 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2109,9 +2109,10 @@ endif (INSTALL) if (PACKAGE) set(SYMBOL_SEARCH_DIRS "") + # Note that the path to VIEWER_SYMBOL_FILE must match that in ../../build.sh if (WINDOWS) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") - set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows.tar.bz2") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") # slplugin.exe failing symbols dump - need to debug, might have to do with updated version of google breakpad # set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX} slplugin.exe") set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX}") @@ -2125,14 +2126,14 @@ if (PACKAGE) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}") list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") - set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") set(VIEWER_EXE_GLOBS "'Second Life' mac-crash-logger") set(VIEWER_LIB_GLOB "*.dylib") endif (DARWIN) if (LINUX) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged") - set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2") + set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin") set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin") set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*") -- cgit v1.2.3 From 1d6c68449e9caba2b9017d4b71fe827bf6fa9771 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 9 Dec 2016 08:17:05 -0500 Subject: Simplify version line in the About box, add address size to it --- indra/newview/llappviewer.cpp | 2 +- indra/newview/skins/default/xui/en/strings.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c125924fa7..06d6f76cce 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3280,11 +3280,11 @@ LLSD LLAppViewer::getViewerInfo() const info["VIEWER_VERSION"] = version; info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); info["CHANNEL"] = LLVersionInfo::getChannel(); + info["ADDRESS_SIZE"] = ADDRESS_SIZE; std::string build_config = LLVersionInfo::getBuildConfig(); if (build_config != "Release") { info["BUILD_CONFIG"] = build_config; - info["ADDRESS_SIZE"] = ADDRESS_SIZE; } // return a URL to the release notes for this viewer, such as: diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index a45c697ddb..83711651ab 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -22,10 +22,10 @@ -[APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) +[CHANNEL] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] - Build Configuration [BUILD_CONFIG] [ADDRESS_SIZE] bits + Build Configuration [BUILD_CONFIG] You are at [POSITION_LOCAL_0,number,1], [POSITION_LOCAL_1,number,1], [POSITION_LOCAL_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP]) -- cgit v1.2.3 From 84ba2a8797303eb85a253b9c786bead38457fda5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 9 Dec 2016 09:23:32 -0500 Subject: move some cmake messages that are not warnings from stderr to stdout --- indra/newview/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 26e56d0119..df855b0de2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1430,7 +1430,7 @@ if (WINDOWS) set(ICON_PATH "project") set(VIEWER_MACOSX_PHASE "a") endif() - message("Copying icons for ${ICON_PATH}") + message(STATUS "Copying icons for ${ICON_PATH}") execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/icons/${ICON_PATH}/secondlife.ico" -- cgit v1.2.3 From 2906a61a93548eb56e217dda356a2889e913fe34 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 9 Dec 2016 10:20:59 -0500 Subject: remove non-functional attempt to load llbase from the viewer tree; it is not there any more --- indra/newview/viewer_manifest.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 814eee202d..a8049d874d 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -41,10 +41,7 @@ viewer_dir = os.path.dirname(__file__) # indra.util.llmanifest under their system Python! sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python")) from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError -try: - from llbase import llsd -except ImportError: - from indra.base import llsd +from llbase import llsd class ViewerManifest(LLManifest): def is_packaging_viewer(self): -- cgit v1.2.3 From ebff86a52c65dfccd3e63ff166161cb4adc7c009 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 9 Dec 2016 10:21:37 -0500 Subject: increment minor version for p64 project --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 6b244dcd69..831446cbd2 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -5.0.1 +5.1.0 -- cgit v1.2.3 From a0110373068fbe7fc70d3eac9763f0f1b820a3d2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 13 Dec 2016 15:23:00 -0500 Subject: DRTVWR-418, BUG-41026: Double default coroutine stack size. Also make it Persist so if someone hand-edits it to try to find a more suitable size, they won't have to keep re-editing it for every session. --- indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fa39dd6c65..410782b8b2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2045,11 +2045,11 @@ Comment Size (in bytes) for each coroutine stack Persist - 0 + 1 Type S32 Value - 262144 + 524288 CrashOnStartup -- cgit v1.2.3 From 555259e50ff9b49200c0535a60dea488881104bb Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 19 Dec 2016 22:51:40 -0500 Subject: DRTVWR-418: Avoid casting sa_sigaction to unsigned int for comparing. It's not really clear to me why the original coder felt it necessary to cast the two sigaction::sa_sigaction fields to unsigned int in the first place, but in a 64-bit clang compile, that discards information. --- indra/newview/llappviewermacosx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 4fe1e31668..bb3bcf2886 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -260,7 +260,7 @@ bool LLAppViewerMacOSX::restoreErrorTrap() unsigned int reset_count = 0; #define SET_SIG(S) sigaction(SIGABRT, &act, &old_act); \ - if((unsigned int)act.sa_sigaction != (unsigned int) old_act.sa_sigaction) \ + if(act.sa_sigaction != old_act.sa_sigaction) \ ++reset_count; // Synchronous signals SET_SIG(SIGABRT) -- cgit v1.2.3 From c992a6df9f5c8751c6f4811009e3b1ada09f208e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 09:20:38 -0500 Subject: DRTVWR-418: std::string::find() returns std::string::size_type. Storing it in a U32 and then comparing it to std::string::npos isn't going to work in 64 bit land. --- indra/newview/lllogchat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 485d4677b1..0218a45b8e 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -927,7 +927,7 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params //possibly a case of complex object names consisting of 3+ words if (!has_name) { - U32 divider_pos = stuff.find(NAME_TEXT_DIVIDER); + std::string::size_type divider_pos = stuff.find(NAME_TEXT_DIVIDER); if (divider_pos != std::string::npos && divider_pos < (stuff.length() - NAME_TEXT_DIVIDER.length())) { im[LL_IM_FROM] = stuff.substr(0, divider_pos); -- cgit v1.2.3 From 42b8895c54a1ab9aa019d4e60b5cf432506aff44 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 09:33:40 -0500 Subject: DRTVWR-418: Untangle LLWLParamKey, LLWLAnimator circularity. LLWLAnimator stores a std::map. But llwlanimator.h only forward-declared LLWLParamKey, begging the question of how this ever compiled on any previous platform. LLWLParamKey was declared for real in llwlparammanager.h, so the obvious fix is to #include "llwlparammanager.h" in llwlanimator.h. Unfortunately this doesn't work because llwlparammanager.h already #includes "llwlanimator.h". As the dependency is specifically on LLWLParamKey, which isa LLEnvKey, which is declared in llenvmanager.h, move LLWLParamKey to llenvmanager.h. Then we can #include "llenvmanager.h" in llwlanimator.h instead of merely forward- declaring LLWLParamKey. This migration compiles LLWLParamKey in a context in which LLTrans isn't visible. It's not really clear why all LLWLParamKey's methods are inline, but toString() -- the method that requires LLTrans -- isn't going to be fast in any case. Break toString() out to llenvmanager.cpp, and #include "lltrans.h" there. --- indra/newview/llenvmanager.cpp | 16 +++++++ indra/newview/llenvmanager.h | 81 ++++++++++++++++++++++++++++++++++ indra/newview/llwlanimator.h | 3 +- indra/newview/llwlparammanager.h | 94 ---------------------------------------- 4 files changed, 98 insertions(+), 96 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp index a626ad1bff..4cbeba083b 100644 --- a/indra/newview/llenvmanager.cpp +++ b/indra/newview/llenvmanager.cpp @@ -35,6 +35,22 @@ #include "llwaterparammanager.h" #include "llwlhandlers.h" #include "llwlparammanager.h" +#include "lltrans.h" + +std::string LLWLParamKey::toString() const +{ + switch (scope) + { + case SCOPE_LOCAL: + return name + std::string(" (") + LLTrans::getString("Local") + std::string(")"); + break; + case SCOPE_REGION: + return name + std::string(" (") + LLTrans::getString("Region") + std::string(")"); + break; + default: + return name + " (?)"; + } +} std::string LLEnvPrefs::getWaterPresetName() const { diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h index c7877303fc..2e1b06dceb 100644 --- a/indra/newview/llenvmanager.h +++ b/indra/newview/llenvmanager.h @@ -48,6 +48,87 @@ public: } EScope; }; +struct LLWLParamKey : LLEnvKey +{ +public: + // scope and source of a param set (WL sky preset) + std::string name; + EScope scope; + + // for conversion from LLSD + static const int NAME_IDX = 0; + static const int SCOPE_IDX = 1; + + inline LLWLParamKey(const std::string& n, EScope s) + : name(n), scope(s) + { + } + + inline LLWLParamKey(LLSD llsd) + : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger())) + { + } + + inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort + : name(""), scope(SCOPE_LOCAL) + { + } + + inline LLWLParamKey(std::string& stringVal) + { + size_t len = stringVal.length(); + if (len > 0) + { + name = stringVal.substr(0, len - 1); + scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str()); + } + } + + inline std::string toStringVal() const + { + std::stringstream str; + str << name << scope; + return str.str(); + } + + inline LLSD toLLSD() const + { + LLSD llsd = LLSD::emptyArray(); + llsd.append(LLSD(name)); + llsd.append(LLSD(scope)); + return llsd; + } + + inline void fromLLSD(const LLSD& llsd) + { + name = llsd[NAME_IDX].asString(); + scope = EScope(llsd[SCOPE_IDX].asInteger()); + } + + inline bool operator <(const LLWLParamKey other) const + { + if (name < other.name) + { + return true; + } + else if (name > other.name) + { + return false; + } + else + { + return scope < other.scope; + } + } + + inline bool operator ==(const LLWLParamKey other) const + { + return (name == other.name) && (scope == other.scope); + } + + std::string toString() const; +}; + class LLEnvironmentSettings { public: diff --git a/indra/newview/llwlanimator.h b/indra/newview/llwlanimator.h index 810f4cf7e5..e2e49c7305 100644 --- a/indra/newview/llwlanimator.h +++ b/indra/newview/llwlanimator.h @@ -28,12 +28,11 @@ #define LL_WL_ANIMATOR_H #include "llwlparamset.h" +#include "llenvmanager.h" #include "llwaterparamset.h" #include #include -struct LLWLParamKey; - class LLWLAnimator { public: typedef enum e_time diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h index e13aed98ed..29826e32ba 100644 --- a/indra/newview/llwlparammanager.h +++ b/indra/newview/llwlparammanager.h @@ -116,100 +116,6 @@ struct WLFloatControl { } }; -struct LLWLParamKey : LLEnvKey -{ -public: - // scope and source of a param set (WL sky preset) - std::string name; - EScope scope; - - // for conversion from LLSD - static const int NAME_IDX = 0; - static const int SCOPE_IDX = 1; - - inline LLWLParamKey(const std::string& n, EScope s) - : name(n), scope(s) - { - } - - inline LLWLParamKey(LLSD llsd) - : name(llsd[NAME_IDX].asString()), scope(EScope(llsd[SCOPE_IDX].asInteger())) - { - } - - inline LLWLParamKey() // NOT really valid, just so std::maps can return a default of some sort - : name(""), scope(SCOPE_LOCAL) - { - } - - inline LLWLParamKey(std::string& stringVal) - { - size_t len = stringVal.length(); - if (len > 0) - { - name = stringVal.substr(0, len - 1); - scope = (EScope) atoi(stringVal.substr(len - 1, len).c_str()); - } - } - - inline std::string toStringVal() const - { - std::stringstream str; - str << name << scope; - return str.str(); - } - - inline LLSD toLLSD() const - { - LLSD llsd = LLSD::emptyArray(); - llsd.append(LLSD(name)); - llsd.append(LLSD(scope)); - return llsd; - } - - inline void fromLLSD(const LLSD& llsd) - { - name = llsd[NAME_IDX].asString(); - scope = EScope(llsd[SCOPE_IDX].asInteger()); - } - - inline bool operator <(const LLWLParamKey other) const - { - if (name < other.name) - { - return true; - } - else if (name > other.name) - { - return false; - } - else - { - return scope < other.scope; - } - } - - inline bool operator ==(const LLWLParamKey other) const - { - return (name == other.name) && (scope == other.scope); - } - - inline std::string toString() const - { - switch (scope) - { - case SCOPE_LOCAL: - return name + std::string(" (") + LLTrans::getString("Local") + std::string(")"); - break; - case SCOPE_REGION: - return name + std::string(" (") + LLTrans::getString("Region") + std::string(")"); - break; - default: - return name + " (?)"; - } - } -}; - /// WindLight parameter manager class - what controls all the wind light shaders class LLWLParamManager : public LLSingleton { -- cgit v1.2.3 From 2499f6bcff53812d1d8bd1a73d657ef1861d7482 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 09:39:31 -0500 Subject: DRTVWR-418: Casting pointer to BOOL is just wrong. Since BOOL is simply a typedef for int, casting a 64-bit pointer to 32-bit int is correctly diagnosed by the compiler as an error. What works is to cast the pointer to (lowercase) bool, the builtin type, which engages the compiler's test for "is this pointer NULL?" --- indra/newview/llfloaterbump.cpp | 2 +- indra/newview/llfloaterimnearbychat.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 957c91b226..33e4c7cd5f 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -184,7 +184,7 @@ void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y) std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar"; mPopupMenu->getChild("Avatar Mute")->setValue(LLTrans::getString(mute_msg)); - mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID)); + mPopupMenu->setItemEnabled(std::string("Zoom In"), bool(gObjectList.findObject(mItemUUID))); ((LLContextMenu*)mPopupMenu)->show(x, y); LLMenuGL::showPopup(ctrl, mPopupMenu, x, y); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 257b39a7dd..e9af22d336 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -282,7 +282,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked() LLFloaterIMSessionTab::onTearOffClicked(); // see CHUI-170: Save torn-off state of the nearby chat between sessions - BOOL in_the_multifloater = (BOOL)getHost(); + bool in_the_multifloater(getHost()); gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); } -- cgit v1.2.3 From 573287b50f5005a279ea1ec42c4ddc18bd9c996b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 09:44:10 -0500 Subject: DRTVWR-418: Fix API for LLTracker::stopTracking(). The signature for LLTracker::stopTracking() was silly: it accepted a void* for the sole purpose of testing whether it was NULL. In other words, the parameter was really a bool in void* clothing. Most callers passed NULL. What got ugly was when you wanted to pass 'true', or a variable bool value. Such values had to be cast to void*. In 64-bit land, the compiler correctly flags that as extremely dubious practice. But it's entirely unnecessary. Since stopTracking() wants a bool, change its parameter to bool. Everybody wins. (While at it, change a few related method params from BOOL to builtin bool.) --- indra/newview/llfloatermap.cpp | 2 +- indra/newview/llfloaterworldmap.cpp | 20 ++++++++++---------- indra/newview/llnetmap.cpp | 2 +- indra/newview/lltracker.cpp | 13 ++++++------- indra/newview/lltracker.h | 12 ++++++------ indra/newview/llviewermessage.cpp | 2 +- 6 files changed, 25 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 333ff863e5..fc2da772f3 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -119,7 +119,7 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask) LLVector3d pos_global = mMap->viewPosToGlobal(x, y); - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); if (world_map) { diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index c67feb8158..d89fa03c1a 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -558,7 +558,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string& } else { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } setDefaultBtn("Teleport"); } @@ -602,7 +602,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) } else { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } setDefaultBtn("Teleport"); } @@ -628,7 +628,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) if (!sim_info) { // We haven't found a region for that point yet, leave the tracking to the world map - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); LLWorldMap::getInstance()->setTracking(pos_global); S32 world_x = S32(pos_global.mdV[0] / 256); S32 world_y = S32(pos_global.mdV[1] / 256); @@ -644,7 +644,7 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global) { // Down region. Show the blue circle of death! // i.e. let the world map that this and tell it it's invalid - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); LLWorldMap::getInstance()->setTracking(pos_global); LLWorldMap::getInstance()->setTrackingInvalid(); setDefaultBtn(""); @@ -863,7 +863,7 @@ void LLFloaterWorldMap::friendsChanged() (buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) || gAgent.isGodlike()) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } } } @@ -1070,7 +1070,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( ) if( current_choice.isNull() || !list->setCurrentByID( current_choice ) ) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } } @@ -1080,7 +1080,7 @@ void LLFloaterWorldMap::onComboTextEntry() // Reset the tracking whenever we start typing into any of the search fields, // so that hitting does an auto-complete versus teleporting us to the // previously selected landmark/friend. - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } void LLFloaterWorldMap::onSearchTextEntry( ) @@ -1103,7 +1103,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit() LLUUID asset_id; LLUUID item_id = list->getCurrentID(); - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); //RN: stopTracking() clears current combobox selection, need to reassert it here list->setCurrentByID(item_id); @@ -1158,7 +1158,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( ) if( !list->setCurrentByID( current_choice ) || current_choice.isNull() ) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } } @@ -1271,7 +1271,7 @@ void LLFloaterWorldMap::onCoordinatesCommit() void LLFloaterWorldMap::onClearBtn() { mTrackedStatus = LLTracker::TRACKING_NOTHING; - LLTracker::stopTracking((void *)(intptr_t)TRUE); + LLTracker::stopTracking(true); LLWorldMap::getInstance()->cancelTracking(); mSLURL = LLSLURL(); // Clear the SLURL since it's invalid mSetToUserPosition = TRUE; // Revert back to the current user position diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 72faa5a9e7..248c361ca4 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -988,6 +988,6 @@ void LLNetMap::handleStopTracking (const LLSD& userdata) if (mPopupMenu) { mPopupMenu->setItemEnabled ("Stop Tracking", false); - LLTracker::stopTracking ((void*)LLTracker::isTracking(NULL)); + LLTracker::stopTracking (LLTracker::isTracking(NULL)); } } diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index b015cde45d..2ec5c41b88 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -100,9 +100,8 @@ LLTracker::~LLTracker() // static -void LLTracker::stopTracking(void* userdata) +void LLTracker::stopTracking(bool clear_ui) { - BOOL clear_ui = ((BOOL)(intptr_t)userdata); instance()->stopTrackingAll(clear_ui); } @@ -183,7 +182,7 @@ void LLTracker::render3D() F32 dist = gFloaterWorldMap->getDistanceToDestination(pos_global, 0.5f); if (dist < DESTINATION_REACHED_RADIUS) { - instance()->stopTrackingLocation(FALSE,TRUE); + instance()->stopTrackingLocation(false,true); } else { @@ -606,7 +605,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global, } -void LLTracker::stopTrackingAll(BOOL clear_ui) +void LLTracker::stopTrackingAll(bool clear_ui) { switch (mTrackingStatus) { @@ -626,7 +625,7 @@ void LLTracker::stopTrackingAll(BOOL clear_ui) } -void LLTracker::stopTrackingAvatar(BOOL clear_ui) +void LLTracker::stopTrackingAvatar(bool clear_ui) { LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); if( !av_tracker.getAvatarID().isNull() ) @@ -640,7 +639,7 @@ void LLTracker::stopTrackingAvatar(BOOL clear_ui) } -void LLTracker::stopTrackingLandmark(BOOL clear_ui) +void LLTracker::stopTrackingLandmark(bool clear_ui) { purgeBeaconText(); mTrackedLandmarkAssetID.setNull(); @@ -655,7 +654,7 @@ void LLTracker::stopTrackingLandmark(BOOL clear_ui) } -void LLTracker::stopTrackingLocation(BOOL clear_ui, BOOL dest_reached) +void LLTracker::stopTrackingLocation(bool clear_ui, bool dest_reached) { purgeBeaconText(); mTrackedLocationName.assign(""); diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index a1c5052c1b..4a6f10b767 100644 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -74,8 +74,8 @@ public: // these are static so that they can be used a callbacks static ETrackingStatus getTrackingStatus() { return instance()->mTrackingStatus; } static ETrackingLocationType getTrackedLocationType() { return instance()->mTrackingLocationType; } - static BOOL isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; } - static void stopTracking(void*); + static bool isTracking(void*) { return instance()->mTrackingStatus != TRACKING_NOTHING; } + static void stopTracking(bool); static void clearFocus(); static const LLUUID& getTrackedLandmarkAssetID() { return instance()->mTrackedLandmarkAssetID; } @@ -114,10 +114,10 @@ protected: LLHUDText* hud_textp, const std::string& label ); - void stopTrackingAll(BOOL clear_ui = FALSE); - void stopTrackingAvatar(BOOL clear_ui = FALSE); - void stopTrackingLocation(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); - void stopTrackingLandmark(BOOL clear_ui = FALSE); + void stopTrackingAll(bool clear_ui = false); + void stopTrackingAvatar(bool clear_ui = false); + void stopTrackingLocation(bool clear_ui = false, bool dest_reached = false); + void stopTrackingLandmark(bool clear_ui = false); void drawMarker(const LLVector3d& pos_global, const LLColor4& color); void setLandmarkVisited(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f472db080f..68d5e4ba2d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4196,7 +4196,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LLVector3 beacon_dir(agent_pos.mV[VX] - (F32)fmod(beacon_pos.mdV[VX], 256.0), agent_pos.mV[VY] - (F32)fmod(beacon_pos.mdV[VY], 256.0), 0); if (beacon_dir.magVecSquared() < 25.f) { - LLTracker::stopTracking(NULL); + LLTracker::stopTracking(false); } else if ( is_teleport && !gAgent.getTeleportKeepsLookAt() && look_at.isExactlyZero()) { -- cgit v1.2.3 From 65cf4912f6e566fdb3e6f835cc0f45dbb3351304 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 10:42:22 -0500 Subject: DRTVWR-418: Another fix for std::string::find() return type. --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 68d5e4ba2d..333b6703fe 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2596,7 +2596,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // The group notice packet does not have an AgentID. Obtain one from the name cache. // If last name is "Resident" strip it out so the cache name lookup works. - U32 index = original_name.find(" Resident"); + std::string::size_type index = original_name.find(" Resident"); if (index != std::string::npos) { original_name = original_name.substr(0, index); -- cgit v1.2.3 From bcb4f2900bba09412e2f3f29ae7b343b6b89dfb3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 11:01:17 -0500 Subject: DRTVWR-418: operator comparison methods should be const. clang has started to reject our non-const comparison operator methods used within standard algorithms. --- indra/newview/llsearchhistory.cpp | 8 ++++---- indra/newview/llsearchhistory.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp index 0ea05a03d6..449e0080f0 100644 --- a/indra/newview/llsearchhistory.cpp +++ b/indra/newview/llsearchhistory.cpp @@ -116,26 +116,26 @@ void LLSearchHistory::addEntry(const std::string& search_query) mSearchHistory.push_front(item); } -bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right) +bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right) const { S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query); return result < 0; } -bool LLSearchHistory::LLSearchHistoryItem::operator > (const LLSearchHistory::LLSearchHistoryItem& right) +bool LLSearchHistory::LLSearchHistoryItem::operator > (const LLSearchHistory::LLSearchHistoryItem& right) const { S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query); return result > 0; } -bool LLSearchHistory::LLSearchHistoryItem::operator==(const LLSearchHistory::LLSearchHistoryItem& right) +bool LLSearchHistory::LLSearchHistoryItem::operator==(const LLSearchHistory::LLSearchHistoryItem& right) const { return 0 == LLStringUtil::compareInsensitive(search_query, right.search_query); } -bool LLSearchHistory::LLSearchHistoryItem::operator==(const std::string& right) +bool LLSearchHistory::LLSearchHistoryItem::operator==(const std::string& right) const { return 0 == LLStringUtil::compareInsensitive(search_query, right); } diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h index 3309a8fcac..7fe2aa2737 100644 --- a/indra/newview/llsearchhistory.h +++ b/indra/newview/llsearchhistory.h @@ -98,16 +98,16 @@ public: /** * Allows std::list sorting */ - bool operator < (const LLSearchHistory::LLSearchHistoryItem& right); + bool operator < (const LLSearchHistory::LLSearchHistoryItem& right) const; /** * Allows std::list sorting */ - bool operator > (const LLSearchHistory::LLSearchHistoryItem& right); + bool operator > (const LLSearchHistory::LLSearchHistoryItem& right) const; - bool operator==(const LLSearchHistoryItem& right); + bool operator==(const LLSearchHistoryItem& right) const; - bool operator==(const std::string& right); + bool operator==(const std::string& right) const; /** * Serializes search history item to LLSD -- cgit v1.2.3 From 6bc9504248e03d7a290b7a3b440bde8bcc215f68 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 11:44:16 -0500 Subject: DRTVWR-418: Rationalize LLPipeline API. Someone evidently figured every static LLPipeline method should have at least one void* parameter. There were methods requiring void* parameters that were completely ignored. More to the point, there were methods whose callers have a U32 in hand -- and which want to use a U32 -- but which bizarrely forced callers to cast to void* just so the method could cast back to U32. In a 64-bit compile, this isn't merely pointless, it's erroneous. Change all such methods to accept U32; remove (void*) casts from call sites. While at it, fix LLPipeline API to use bool, true, false rather than their obsolete all-caps predecessors. Once you eat that first potato chip... :-P --- indra/newview/llfloaterbeacons.cpp | 32 +-- indra/newview/llpipelinelistener.cpp | 8 +- indra/newview/llviewerdisplay.cpp | 8 +- indra/newview/llviewermenu.cpp | 78 +++---- indra/newview/llviewerwindow.cpp | 20 +- indra/newview/pipeline.cpp | 395 +++++++++++++++++------------------ indra/newview/pipeline.h | 252 +++++++++++----------- 7 files changed, 393 insertions(+), 400 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 316294a477..cf38a00499 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -66,13 +66,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) std::string name = check->getName(); if(name == "touch_only") { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); + LLPipeline::toggleRenderScriptedTouchBeacons(); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. if ( - LLPipeline::getRenderScriptedTouchBeacons(NULL) && - LLPipeline::getRenderScriptedBeacons(NULL) ) + LLPipeline::getRenderScriptedTouchBeacons() && + LLPipeline::getRenderScriptedBeacons() ) { - LLPipeline::setRenderScriptedBeacons(FALSE); + LLPipeline::setRenderScriptedBeacons(false); getChild("scripted")->setControlValue(LLSD(FALSE)); getChild("scripted")->setValue(FALSE); getChild("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline @@ -81,13 +81,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) } else if(name == "scripted") { - LLPipeline::toggleRenderScriptedBeacons(NULL); + LLPipeline::toggleRenderScriptedBeacons(); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. if ( - LLPipeline::getRenderScriptedTouchBeacons(NULL) && - LLPipeline::getRenderScriptedBeacons(NULL) ) + LLPipeline::getRenderScriptedTouchBeacons() && + LLPipeline::getRenderScriptedBeacons() ) { - LLPipeline::setRenderScriptedTouchBeacons(FALSE); + LLPipeline::setRenderScriptedTouchBeacons(false); getChild("touch_only")->setControlValue(LLSD(FALSE)); getChild("touch_only")->setValue(FALSE); getChild("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline @@ -100,13 +100,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) else if(name == "moapbeacon") LLPipeline::setRenderMOAPBeacons(check->get()); else if(name == "highlights") { - LLPipeline::toggleRenderHighlights(NULL); + LLPipeline::toggleRenderHighlights(); // Don't allow both to be OFF at the same time. Toggle the other one on if both now off. if ( - !LLPipeline::getRenderBeacons(NULL) && - !LLPipeline::getRenderHighlights(NULL) ) + !LLPipeline::getRenderBeacons() && + !LLPipeline::getRenderHighlights() ) { - LLPipeline::setRenderBeacons(TRUE); + LLPipeline::setRenderBeacons(true); getChild("beacons")->setControlValue(LLSD(TRUE)); getChild("beacons")->setValue(TRUE); getChild("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline @@ -115,13 +115,13 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) } else if(name == "beacons") { - LLPipeline::toggleRenderBeacons(NULL); + LLPipeline::toggleRenderBeacons(); // Don't allow both to be OFF at the same time. Toggle the other one on if both now off. if ( - !LLPipeline::getRenderBeacons(NULL) && - !LLPipeline::getRenderHighlights(NULL) ) + !LLPipeline::getRenderBeacons() && + !LLPipeline::getRenderHighlights() ) { - LLPipeline::setRenderHighlights(TRUE); + LLPipeline::setRenderHighlights(true); getChild("highlights")->setControlValue(LLSD(TRUE)); getChild("highlights")->setValue(TRUE); getChild("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline diff --git a/indra/newview/llpipelinelistener.cpp b/indra/newview/llpipelinelistener.cpp index 20759239bf..dfbe689f56 100644 --- a/indra/newview/llpipelinelistener.cpp +++ b/indra/newview/llpipelinelistener.cpp @@ -48,7 +48,7 @@ namespace { U32 render_type = render_type_from_string( iter->asString() ); if ( render_type != 0 ) { - LLPipeline::toggleRenderTypeControl( (void*) render_type ); + LLPipeline::toggleRenderTypeControl( render_type ); } } } @@ -59,7 +59,7 @@ namespace { U32 render_type = render_type_from_string( request["type"].asString() ); if ( render_type != 0 ) { - response["value"] = LLPipeline::hasRenderTypeControl( (void*) render_type ); + response["value"] = LLPipeline::hasRenderTypeControl( render_type ); } else { @@ -87,7 +87,7 @@ namespace { U32 render_feature = feature_from_string( iter->asString() ); if ( render_feature != 0 ) { - LLPipeline::toggleRenderDebugControl( (void*) render_feature ); + LLPipeline::toggleRenderDebugControl( render_feature ); } } } @@ -126,7 +126,7 @@ namespace { U32 info_display = info_display_from_string( iter->asString() ); if ( info_display != 0 ) { - LLPipeline::toggleRenderDebug( (void*) info_display ); + LLPipeline::toggleRenderDebug( info_display ); } } } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index afa00e3e6e..13eccaefc1 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1107,7 +1107,7 @@ void render_hud_attachments() bool has_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI); if (has_ui) { - gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI); + gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } S32 use_occlusion = LLPipeline::sUseOcclusion; @@ -1152,7 +1152,7 @@ void render_hud_attachments() if (has_ui) { - gPipeline.toggleRenderDebugFeature((void*) LLPipeline::RENDER_DEBUG_FEATURE_UI); + gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } LLPipeline::sUseOcclusion = use_occlusion; LLPipeline::sRenderingHUDs = FALSE; @@ -1230,13 +1230,13 @@ bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model) return get_hud_matrices(whole_screen, proj, model); } -BOOL setup_hud_matrices() +bool setup_hud_matrices() { LLRect whole_screen = get_whole_screen_region(); return setup_hud_matrices(whole_screen); } -BOOL setup_hud_matrices(const LLRect& screen_region) +bool setup_hud_matrices(const LLRect& screen_region) { glh::matrix4f proj, model; bool result = get_hud_matrices(screen_region, proj, model); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 72579d4d7a..b657726ef8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -792,7 +792,7 @@ class LLAdvancedToggleRenderType : public view_listener_t U32 render_type = render_type_from_string( userdata.asString() ); if ( render_type != 0 ) { - LLPipeline::toggleRenderTypeControl( (void*)render_type ); + LLPipeline::toggleRenderTypeControl( render_type ); } return true; } @@ -808,7 +808,7 @@ class LLAdvancedCheckRenderType : public view_listener_t if ( render_type != 0 ) { - new_value = LLPipeline::hasRenderTypeControl( (void*)render_type ); + new_value = LLPipeline::hasRenderTypeControl( render_type ); } return new_value; @@ -867,7 +867,7 @@ class LLAdvancedToggleFeature : public view_listener_t U32 feature = feature_from_string( userdata.asString() ); if ( feature != 0 ) { - LLPipeline::toggleRenderDebugFeature( (void*)feature ); + LLPipeline::toggleRenderDebugFeature( feature ); } return true; } @@ -882,7 +882,7 @@ class LLAdvancedCheckFeature : public view_listener_t if ( feature != 0 ) { - new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature ); + new_value = LLPipeline::toggleRenderDebugFeatureControl( feature ); } return new_value; @@ -923,7 +923,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_OFF; } @@ -931,7 +931,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_CURRENT; } @@ -939,7 +939,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } gPipeline.setRenderDebugFeatureControl(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY, true); LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_DESIRED; @@ -948,7 +948,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t { if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) { - gPipeline.toggleRenderDebug((void*)LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); + gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } LLViewerTexture::sDebugTexelsMode = LLViewerTexture::DEBUG_TEXELS_FULL; } @@ -1091,7 +1091,7 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t if ( info_display != 0 ) { - LLPipeline::toggleRenderDebug( (void*)info_display ); + LLPipeline::toggleRenderDebug( info_display ); } return true; @@ -1108,7 +1108,7 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t if ( info_display != 0 ) { - new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display ); + new_value = LLPipeline::toggleRenderDebugControl( info_display ); } return new_value; @@ -8080,66 +8080,66 @@ class LLViewToggleBeacon : public view_listener_t std::string beacon = userdata.asString(); if (beacon == "scriptsbeacon") { - LLPipeline::toggleRenderScriptedBeacons(NULL); - gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); + LLPipeline::toggleRenderScriptedBeacons(); + gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons() ); // toggle the other one off if it's on - if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) + if (LLPipeline::getRenderScriptedBeacons() && LLPipeline::getRenderScriptedTouchBeacons()) { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); - gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); + LLPipeline::toggleRenderScriptedTouchBeacons(); + gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons() ); } } else if (beacon == "physicalbeacon") { - LLPipeline::toggleRenderPhysicalBeacons(NULL); - gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons(NULL) ); + LLPipeline::toggleRenderPhysicalBeacons(); + gSavedSettings.setBOOL( "physicalbeacon", LLPipeline::getRenderPhysicalBeacons() ); } else if (beacon == "moapbeacon") { - LLPipeline::toggleRenderMOAPBeacons(NULL); - gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons(NULL) ); + LLPipeline::toggleRenderMOAPBeacons(); + gSavedSettings.setBOOL( "moapbeacon", LLPipeline::getRenderMOAPBeacons() ); } else if (beacon == "soundsbeacon") { - LLPipeline::toggleRenderSoundBeacons(NULL); - gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons(NULL) ); + LLPipeline::toggleRenderSoundBeacons(); + gSavedSettings.setBOOL( "soundsbeacon", LLPipeline::getRenderSoundBeacons() ); } else if (beacon == "particlesbeacon") { - LLPipeline::toggleRenderParticleBeacons(NULL); - gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons(NULL) ); + LLPipeline::toggleRenderParticleBeacons(); + gSavedSettings.setBOOL( "particlesbeacon", LLPipeline::getRenderParticleBeacons() ); } else if (beacon == "scripttouchbeacon") { - LLPipeline::toggleRenderScriptedTouchBeacons(NULL); - gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons(NULL) ); + LLPipeline::toggleRenderScriptedTouchBeacons(); + gSavedSettings.setBOOL( "scripttouchbeacon", LLPipeline::getRenderScriptedTouchBeacons() ); // toggle the other one off if it's on - if (LLPipeline::getRenderScriptedBeacons(NULL) && LLPipeline::getRenderScriptedTouchBeacons(NULL)) + if (LLPipeline::getRenderScriptedBeacons() && LLPipeline::getRenderScriptedTouchBeacons()) { - LLPipeline::toggleRenderScriptedBeacons(NULL); - gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons(NULL) ); + LLPipeline::toggleRenderScriptedBeacons(); + gSavedSettings.setBOOL( "scriptsbeacon", LLPipeline::getRenderScriptedBeacons() ); } } else if (beacon == "renderbeacons") { - LLPipeline::toggleRenderBeacons(NULL); - gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); + LLPipeline::toggleRenderBeacons(); + gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons() ); // toggle the other one on if it's not - if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) + if (!LLPipeline::getRenderBeacons() && !LLPipeline::getRenderHighlights()) { - LLPipeline::toggleRenderHighlights(NULL); - gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); + LLPipeline::toggleRenderHighlights(); + gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights() ); } } else if (beacon == "renderhighlights") { - LLPipeline::toggleRenderHighlights(NULL); - gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights(NULL) ); + LLPipeline::toggleRenderHighlights(); + gSavedSettings.setBOOL( "renderhighlights", LLPipeline::getRenderHighlights() ); // toggle the other one on if it's not - if (!LLPipeline::getRenderBeacons(NULL) && !LLPipeline::getRenderHighlights(NULL)) + if (!LLPipeline::getRenderBeacons() && !LLPipeline::getRenderHighlights()) { - LLPipeline::toggleRenderBeacons(NULL); - gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons(NULL) ); + LLPipeline::toggleRenderBeacons(); + gSavedSettings.setBOOL( "renderbeacons", LLPipeline::getRenderBeacons() ); } } @@ -8218,7 +8218,7 @@ class LLViewCheckRenderType : public view_listener_t bool new_value = false; if (type == "hideparticles") { - new_value = LLPipeline::toggleRenderTypeControlNegated((void *)LLPipeline::RENDER_TYPE_PARTICLES); + new_value = LLPipeline::toggleRenderTypeControlNegated(LLPipeline::RENDER_TYPE_PARTICLES); } return new_value; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9e68bb78e0..44b297a128 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -747,45 +747,45 @@ public: } // only display these messages if we are actually rendering beacons at this moment - if (LLPipeline::getRenderBeacons(NULL) && LLFloaterReg::instanceVisible("beacons")) + if (LLPipeline::getRenderBeacons() && LLFloaterReg::instanceVisible("beacons")) { - if (LLPipeline::getRenderMOAPBeacons(NULL)) + if (LLPipeline::getRenderMOAPBeacons()) { addText(xpos, ypos, "Viewing media beacons (white)"); ypos += y_inc; } - if (LLPipeline::toggleRenderTypeControlNegated((void*)LLPipeline::RENDER_TYPE_PARTICLES)) + if (LLPipeline::toggleRenderTypeControlNegated(LLPipeline::RENDER_TYPE_PARTICLES)) { addText(xpos, ypos, particle_hiding); ypos += y_inc; } - if (LLPipeline::getRenderParticleBeacons(NULL)) + if (LLPipeline::getRenderParticleBeacons()) { addText(xpos, ypos, "Viewing particle beacons (blue)"); ypos += y_inc; } - if (LLPipeline::getRenderSoundBeacons(NULL)) + if (LLPipeline::getRenderSoundBeacons()) { addText(xpos, ypos, "Viewing sound beacons (yellow)"); ypos += y_inc; } - if (LLPipeline::getRenderScriptedBeacons(NULL)) + if (LLPipeline::getRenderScriptedBeacons()) { addText(xpos, ypos, beacon_scripted); ypos += y_inc; } else - if (LLPipeline::getRenderScriptedTouchBeacons(NULL)) + if (LLPipeline::getRenderScriptedTouchBeacons()) { addText(xpos, ypos, beacon_scripted_touch); ypos += y_inc; } - if (LLPipeline::getRenderPhysicalBeacons(NULL)) + if (LLPipeline::getRenderPhysicalBeacons()) { addText(xpos, ypos, "Viewing physical object beacons (green)"); ypos += y_inc; @@ -4500,7 +4500,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if ( prev_draw_ui != show_ui) { - LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI); + LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } BOOL hide_hud = !gSavedSettings.getBOOL("RenderHUDInSnapshot") && LLPipeline::sShowHUDAttachments; @@ -4723,7 +4723,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // POST SNAPSHOT if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI); + LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } if (hide_hud) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c6bbfb1c8f..7553ddff63 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -129,26 +129,26 @@ bool gShiftFrame = false; //cached settings -BOOL LLPipeline::RenderAvatarVP; -BOOL LLPipeline::VertexShaderEnable; -BOOL LLPipeline::WindLightUseAtmosShaders; -BOOL LLPipeline::RenderDeferred; +bool LLPipeline::RenderAvatarVP; +bool LLPipeline::VertexShaderEnable; +bool LLPipeline::WindLightUseAtmosShaders; +bool LLPipeline::RenderDeferred; F32 LLPipeline::RenderDeferredSunWash; U32 LLPipeline::RenderFSAASamples; U32 LLPipeline::RenderResolutionDivisor; -BOOL LLPipeline::RenderUIBuffer; +bool LLPipeline::RenderUIBuffer; S32 LLPipeline::RenderShadowDetail; -BOOL LLPipeline::RenderDeferredSSAO; +bool LLPipeline::RenderDeferredSSAO; F32 LLPipeline::RenderShadowResolutionScale; -BOOL LLPipeline::RenderLocalLights; -BOOL LLPipeline::RenderDelayCreation; -BOOL LLPipeline::RenderAnimateRes; -BOOL LLPipeline::FreezeTime; +bool LLPipeline::RenderLocalLights; +bool LLPipeline::RenderDelayCreation; +bool LLPipeline::RenderAnimateRes; +bool LLPipeline::FreezeTime; S32 LLPipeline::DebugBeaconLineWidth; F32 LLPipeline::RenderHighlightBrightness; LLColor4 LLPipeline::RenderHighlightColor; F32 LLPipeline::RenderHighlightThickness; -BOOL LLPipeline::RenderSpotLightsInNondeferred; +bool LLPipeline::RenderSpotLightsInNondeferred; LLColor4 LLPipeline::PreviewAmbientColor; LLColor4 LLPipeline::PreviewDiffuse0; LLColor4 LLPipeline::PreviewSpecular0; @@ -168,8 +168,8 @@ S32 LLPipeline::RenderGlowResolutionPow; S32 LLPipeline::RenderGlowIterations; F32 LLPipeline::RenderGlowWidth; F32 LLPipeline::RenderGlowStrength; -BOOL LLPipeline::RenderDepthOfField; -BOOL LLPipeline::RenderDepthOfFieldInEditMode; +bool LLPipeline::RenderDepthOfField; +bool LLPipeline::RenderDepthOfFieldInEditMode; F32 LLPipeline::CameraFocusTransitionTime; F32 LLPipeline::CameraFNumber; F32 LLPipeline::CameraFocalLength; @@ -190,7 +190,7 @@ F32 LLPipeline::RenderEdgeDepthCutoff; F32 LLPipeline::RenderEdgeNormCutoff; LLVector3 LLPipeline::RenderShadowGaussian; F32 LLPipeline::RenderShadowBlurDistFactor; -BOOL LLPipeline::RenderDeferredAtmospheric; +bool LLPipeline::RenderDeferredAtmospheric; S32 LLPipeline::RenderReflectionDetail; F32 LLPipeline::RenderHighlightFadeTime; LLVector3 LLPipeline::RenderShadowClipPlanes; @@ -200,7 +200,7 @@ F32 LLPipeline::RenderFarClip; LLVector3 LLPipeline::RenderShadowSplitExponent; F32 LLPipeline::RenderShadowErrorCutoff; F32 LLPipeline::RenderShadowFOVCutoff; -BOOL LLPipeline::CameraOffset; +bool LLPipeline::CameraOffset; F32 LLPipeline::CameraMaxCoF; F32 LLPipeline::CameraDoFResScale; F32 LLPipeline::RenderAutoHideSurfaceAreaLimit; @@ -215,9 +215,9 @@ extern S32 gBoxFrame; extern BOOL gDisplaySwapBuffers; extern BOOL gDebugGL; -BOOL gAvatarBacklight = FALSE; +bool gAvatarBacklight = false; -BOOL gDebugPipeline = FALSE; +bool gDebugPipeline = false; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; @@ -358,45 +358,45 @@ void display_update_camera(); S32 LLPipeline::sCompiles = 0; -BOOL LLPipeline::sPickAvatar = TRUE; -BOOL LLPipeline::sDynamicLOD = TRUE; -BOOL LLPipeline::sShowHUDAttachments = TRUE; -BOOL LLPipeline::sRenderMOAPBeacons = FALSE; -BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; -BOOL LLPipeline::sRenderScriptedBeacons = FALSE; -BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; -BOOL LLPipeline::sRenderParticleBeacons = FALSE; -BOOL LLPipeline::sRenderSoundBeacons = FALSE; -BOOL LLPipeline::sRenderBeacons = FALSE; -BOOL LLPipeline::sRenderHighlight = TRUE; +bool LLPipeline::sPickAvatar = true; +bool LLPipeline::sDynamicLOD = true; +bool LLPipeline::sShowHUDAttachments = true; +bool LLPipeline::sRenderMOAPBeacons = false; +bool LLPipeline::sRenderPhysicalBeacons = true; +bool LLPipeline::sRenderScriptedBeacons = false; +bool LLPipeline::sRenderScriptedTouchBeacons = true; +bool LLPipeline::sRenderParticleBeacons = false; +bool LLPipeline::sRenderSoundBeacons = false; +bool LLPipeline::sRenderBeacons = false; +bool LLPipeline::sRenderHighlight = true; LLRender::eTexIndex LLPipeline::sRenderHighlightTextureChannel = LLRender::DIFFUSE_MAP; -BOOL LLPipeline::sForceOldBakedUpload = FALSE; +bool LLPipeline::sForceOldBakedUpload = false; S32 LLPipeline::sUseOcclusion = 0; -BOOL LLPipeline::sDelayVBUpdate = TRUE; -BOOL LLPipeline::sAutoMaskAlphaDeferred = TRUE; -BOOL LLPipeline::sAutoMaskAlphaNonDeferred = FALSE; -BOOL LLPipeline::sDisableShaders = FALSE; -BOOL LLPipeline::sRenderBump = TRUE; -BOOL LLPipeline::sBakeSunlight = FALSE; -BOOL LLPipeline::sNoAlpha = FALSE; -BOOL LLPipeline::sUseTriStrips = TRUE; -BOOL LLPipeline::sUseFarClip = TRUE; -BOOL LLPipeline::sShadowRender = FALSE; -BOOL LLPipeline::sWaterReflections = FALSE; -BOOL LLPipeline::sRenderGlow = FALSE; -BOOL LLPipeline::sReflectionRender = FALSE; -BOOL LLPipeline::sImpostorRender = FALSE; -BOOL LLPipeline::sImpostorRenderAlphaDepthPass = FALSE; -BOOL LLPipeline::sUnderWaterRender = FALSE; -BOOL LLPipeline::sTextureBindTest = FALSE; -BOOL LLPipeline::sRenderFrameTest = FALSE; -BOOL LLPipeline::sRenderAttachedLights = TRUE; -BOOL LLPipeline::sRenderAttachedParticles = TRUE; -BOOL LLPipeline::sRenderDeferred = FALSE; -BOOL LLPipeline::sMemAllocationThrottled = FALSE; +bool LLPipeline::sDelayVBUpdate = true; +bool LLPipeline::sAutoMaskAlphaDeferred = true; +bool LLPipeline::sAutoMaskAlphaNonDeferred = false; +bool LLPipeline::sDisableShaders = false; +bool LLPipeline::sRenderBump = true; +bool LLPipeline::sBakeSunlight = false; +bool LLPipeline::sNoAlpha = false; +bool LLPipeline::sUseTriStrips = true; +bool LLPipeline::sUseFarClip = true; +bool LLPipeline::sShadowRender = false; +bool LLPipeline::sWaterReflections = false; +bool LLPipeline::sRenderGlow = false; +bool LLPipeline::sReflectionRender = false; +bool LLPipeline::sImpostorRender = false; +bool LLPipeline::sImpostorRenderAlphaDepthPass = false; +bool LLPipeline::sUnderWaterRender = false; +bool LLPipeline::sTextureBindTest = false; +bool LLPipeline::sRenderFrameTest = false; +bool LLPipeline::sRenderAttachedLights = true; +bool LLPipeline::sRenderAttachedParticles = true; +bool LLPipeline::sRenderDeferred = false; +bool LLPipeline::sMemAllocationThrottled = false; S32 LLPipeline::sVisibleLightCount = 0; F32 LLPipeline::sMinRenderSize = 0.f; -BOOL LLPipeline::sRenderingHUDs; +bool LLPipeline::sRenderingHUDs; // EventHost API LLPipeline listener. static LLPipelineListener sPipelineListener; @@ -413,14 +413,14 @@ bool addDeferredAttachments(LLRenderTarget& target) } LLPipeline::LLPipeline() : - mBackfaceCull(FALSE), + mBackfaceCull(false), mMatrixOpCount(0), mTextureMatrixOps(0), mNumVisibleNodes(0), mNumVisibleFaces(0), - mInitialized(FALSE), - mVertexShadersEnabled(FALSE), + mInitialized(false), + mVertexShadersEnabled(false), mVertexShadersLoaded(0), mTransformFeedbackPrimitives(0), mRenderDebugFeatureMask(0), @@ -485,7 +485,7 @@ void LLPipeline::init() sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); - mInitialized = TRUE; + mInitialized = true; stop_glerror(); @@ -538,7 +538,7 @@ void LLPipeline::init() mOldRenderDebugMask = mRenderDebugMask; - mBackfaceCull = TRUE; + mBackfaceCull = true; stop_glerror(); @@ -723,7 +723,7 @@ void LLPipeline::cleanup() mMovedBridge.clear(); - mInitialized = FALSE; + mInitialized = false; mDeferredVB = NULL; @@ -759,7 +759,7 @@ void LLPipeline::destroyGL() static LLTrace::BlockTimerStatHandle FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); //static -void LLPipeline::throttleNewMemoryAllocation(BOOL disable) +void LLPipeline::throttleNewMemoryAllocation(bool disable) { if(sMemAllocationThrottled != disable) { @@ -932,7 +932,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (LLPipeline::sRenderDeferred) { S32 shadow_detail = RenderShadowDetail; - BOOL ssao = RenderDeferredSSAO; + bool ssao = RenderDeferredSSAO; const U32 occlusion_divisor = 3; @@ -1058,19 +1058,19 @@ void LLPipeline::updateRenderBump() //static void LLPipeline::updateRenderDeferred() { - BOOL deferred = ((RenderDeferred && + bool deferred = (bool(RenderDeferred && LLRenderTarget::sUseFBO && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && LLPipeline::sRenderBump && VertexShaderEnable && RenderAvatarVP && - WindLightUseAtmosShaders) ? TRUE : FALSE) && + WindLightUseAtmosShaders)) && !gUseWireframe; sRenderDeferred = deferred; if (deferred) { //must render glow when rendering deferred since post effect pass is needed to present any lighting at all - sRenderGlow = TRUE; + sRenderGlow = true; } } @@ -1413,7 +1413,7 @@ void LLPipeline::restoreGL() } -BOOL LLPipeline::canUseVertexShaders() +bool LLPipeline::canUseVertexShaders() { static const std::string vertex_shader_enable_feature_string = "VertexShaderEnable"; @@ -1423,30 +1423,30 @@ BOOL LLPipeline::canUseVertexShaders() !LLFeatureManager::getInstance()->isFeatureAvailable(vertex_shader_enable_feature_string) || (assertInitialized() && mVertexShadersLoaded != 1) ) { - return FALSE; + return false; } else { - return TRUE; + return true; } } -BOOL LLPipeline::canUseWindLightShaders() const +bool LLPipeline::canUseWindLightShaders() const { return (!LLPipeline::sDisableShaders && gWLSkyProgram.mProgramObject != 0 && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT) > 1); } -BOOL LLPipeline::canUseWindLightShadersOnObjects() const +bool LLPipeline::canUseWindLightShadersOnObjects() const { return (canUseWindLightShaders() && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 0); } -BOOL LLPipeline::canUseAntiAliasing() const +bool LLPipeline::canUseAntiAliasing() const { - return TRUE; + return true; } void LLPipeline::unloadShaders() @@ -1463,7 +1463,7 @@ void LLPipeline::assertInitializedDoError() //============================================================================ -void LLPipeline::enableShadows(const BOOL enable_shadows) +void LLPipeline::enableShadows(const bool enable_shadows) { //should probably do something here to wrangle shadows.... } @@ -2001,7 +2001,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) { LLDrawable::drawable_vector_t::iterator curiter = iter++; LLDrawable *drawablep = *curiter; - BOOL done = TRUE; + bool done = true; if (!drawablep->isDead() && (!drawablep->isState(LLDrawable::EARLY_MOVE))) { done = drawablep->updateMove(); @@ -2329,7 +2329,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group) } -BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera) +bool LLPipeline::visibleObjectsInFrustum(LLCamera& camera) { for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -2345,17 +2345,17 @@ BOOL LLPipeline::visibleObjectsInFrustum(LLCamera& camera) { if (part->visibleObjectsInFrustum(camera)) { - return TRUE; + return true; } } } } } - return FALSE; + return false; } -BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max) +bool LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& max) { const F32 X = 65536.f; @@ -2365,7 +2365,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& LLViewerCamera::eCameraID saved_camera_id = LLViewerCamera::sCurCameraID; LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; - BOOL res = TRUE; + bool res = true; for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -2381,7 +2381,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& { if (!part->getVisibleExtents(camera, min, max)) { - res = FALSE; + res = false; } } } @@ -2408,7 +2408,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl sCull->clear(); - BOOL to_texture = LLPipeline::sUseOcclusion > 1 && + bool to_texture = LLPipeline::sUseOcclusion > 1 && !hasRenderType(LLPipeline::RENDER_TYPE_HUD) && LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD && gPipeline.canUseVertexShaders() && @@ -2788,9 +2788,9 @@ void LLPipeline::doOcclusion(LLCamera& camera) } } -BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority) +bool LLPipeline::updateDrawableGeom(LLDrawable* drawablep, bool priority) { - BOOL update_complete = drawablep->updateGeometry(priority); + bool update_complete = drawablep->updateGeometry(priority); if (update_complete && assertInitialized()) { drawablep->setState(LLDrawable::BUILT); @@ -3077,7 +3077,7 @@ void LLPipeline::updateGeom(F32 max_dtime) last_group = drawablep->getSpatialGroup(); last_bridge = bridge; - BOOL update_complete = TRUE; + bool update_complete = true; if (!drawablep->isDead()) { update_complete = updateDrawableGeom(drawablep, FALSE); @@ -3134,7 +3134,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) } } -void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) +void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion) { if (!drawablep) { @@ -3168,7 +3168,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) } drawablep->setState(LLDrawable::ON_MOVE_LIST); } - if (damped_motion == FALSE) + if (! damped_motion) { drawablep->setState(LLDrawable::MOVE_UNDAMPED); // UNDAMPED trumps DAMPED } @@ -3208,7 +3208,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) assertInitialized(); glClear(GL_DEPTH_BUFFER_BIT); - gDepthDirty = TRUE; + gDepthDirty = true; LLVector4a offseta; offseta.load3(offset.mV); @@ -3306,13 +3306,13 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) mMeshDirtyGroup.push_back(group); } -void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) +void LLPipeline::markRebuild(LLSpatialGroup* group, bool priority) { if (group && !group->isDead() && group->getSpatialPartition()) { if (group->getSpatialPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) { - priority = TRUE; + priority = true; } if (priority) @@ -3345,13 +3345,13 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) } } -void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority) +void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, bool priority) { if (drawablep && !drawablep->isDead() && assertInitialized()) { if (!drawablep->isState(LLDrawable::BUILT)) { - priority = TRUE; + priority = true; } if (priority) { @@ -3720,17 +3720,17 @@ void renderMOAPBeacons(LLDrawable* drawablep) if(!vobj || vobj->isAvatar()) return; - BOOL beacon=FALSE; + bool beacon=false; U8 tecount=vobj->getNumTEs(); for(int x=0;xgetTE(x)->hasMedia()) { - beacon=TRUE; + beacon=true; break; } } - if(beacon==TRUE) + if(beacon) { if (gPipeline.sRenderBeacons) { @@ -4309,7 +4309,7 @@ void LLPipeline::renderHighlights() //debug use U32 LLPipeline::sCurRenderPoolType = 0 ; -void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) +void LLPipeline::renderGeom(LLCamera& camera, bool forceVBOUpdate) { LL_RECORD_BLOCK_TIME(FTM_RENDER_GEOMETRY); @@ -4366,13 +4366,13 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) // Toggle backface culling for debugging LLGLEnable cull_face(mBackfaceCull ? GL_CULL_FACE : 0); // Set fog - BOOL use_fog = hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG); + bool use_fog = hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG); LLGLEnable fog_enable(use_fog && !gPipeline.canUseWindLightShadersOnObjects() ? GL_FOG : 0); gSky.updateFog(camera.getFar()); if (!use_fog) { - sUnderWaterRender = FALSE; + sUnderWaterRender = false; } gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sDefaultImagep); @@ -4409,7 +4409,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) setupHWLights(NULL); } - BOOL occlude = sUseOcclusion > 1; + bool occlude = sUseOcclusion > 1; U32 cur_type = 0; pool_set_t::iterator iter1 = mPools.begin(); @@ -4424,7 +4424,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) if (occlude && cur_type >= LLDrawPool::POOL_GRASS) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -4489,7 +4489,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) if (occlude) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -4672,7 +4672,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) gGL.setColorMask(true, false); pool_set_t::iterator iter1 = mPools.begin(); - BOOL occlude = LLPipeline::sUseOcclusion > 1 && do_occlusion; + bool occlude = LLPipeline::sUseOcclusion > 1 && do_occlusion; while ( iter1 != mPools.end() ) { @@ -4682,7 +4682,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) if (occlude && cur_type >= LLDrawPool::POOL_GRASS) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -4742,7 +4742,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera, bool do_occlusion) if (occlude) { - occlude = FALSE; + occlude = false; gGLLastMatrix = NULL; gGL.loadMatrix(gGLModelView); LLGLSLShader::bindNoShader(); @@ -5884,7 +5884,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) case LLDrawPool::POOL_TREE: #ifdef _DEBUG { - BOOL found = mTreePools.erase( (uintptr_t)poolp->getTexture() ); + bool found = mTreePools.erase( (uintptr_t)poolp->getTexture() ); llassert( found ); } #else @@ -5895,7 +5895,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) case LLDrawPool::POOL_TERRAIN: #ifdef _DEBUG { - BOOL found = mTerrainPools.erase( (uintptr_t)poolp->getTexture() ); + bool found = mTerrainPools.erase( (uintptr_t)poolp->getTexture() ); llassert( found ); } #else @@ -5958,7 +5958,7 @@ void LLPipeline::resetDrawOrders() // Once-per-frame setup of hardware lights, // including sun/moon, avatar backlight, and up to 6 local lights -void LLPipeline::setupAvatarLights(BOOL for_edit) +void LLPipeline::setupAvatarLights(bool for_edit) { assertInitialized(); @@ -6063,7 +6063,7 @@ static F32 calc_light_dist(LLVOVolume* light, const LLVector3& cam_pos, F32 max_ return max_dist; } F32 radius = light->getLightRadius(); - BOOL selected = light->isSelected(); + bool selected = light->isSelected(); LLVector3 dpos = light->getRenderPosition() - cam_pos; F32 dist2 = dpos.lengthSquared(); if (!selected && dist2 > (max_dist + radius)*(max_dist + radius)) @@ -6658,9 +6658,9 @@ void LLPipeline::findReferences(LLDrawable *drawablep) } } -BOOL LLPipeline::verify() +bool LLPipeline::verify() { - BOOL ok = assertInitialized(); + bool ok = assertInitialized(); if (ok) { for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter) @@ -6668,7 +6668,7 @@ BOOL LLPipeline::verify() LLDrawPool *poolp = *iter; if (!poolp->verify()) { - ok = FALSE; + ok = false; } } } @@ -6713,7 +6713,7 @@ BOOL LLPipeline::verify() bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon) { - BOOL Inside = TRUE; + bool Inside = true; LLVector3 MinB = center - size; LLVector3 MaxB = center + size; LLVector3 MaxT; @@ -6725,7 +6725,7 @@ bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& if(origin.mV[i] < MinB.mV[i]) { coord.mV[i] = MinB.mV[i]; - Inside = FALSE; + Inside = false; // Calculate T distances to candidate planes if(IR(dir.mV[i])) MaxT.mV[i] = (MinB.mV[i] - origin.mV[i]) / dir.mV[i]; @@ -6733,7 +6733,7 @@ bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& else if(origin.mV[i] > MaxB.mV[i]) { coord.mV[i] = MaxB.mV[i]; - Inside = FALSE; + Inside = false; // Calculate T distances to candidate planes if(IR(dir.mV[i])) MaxT.mV[i] = (MaxB.mV[i] - origin.mV[i]) / dir.mV[i]; @@ -6779,7 +6779,7 @@ bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& // // -void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light) +void LLPipeline::setLight(LLDrawable *drawablep, bool is_light) { if (drawablep && assertInitialized()) { @@ -6807,9 +6807,8 @@ void LLPipeline::toggleRenderType(U32 type) } //static -void LLPipeline::toggleRenderTypeControl(void* data) +void LLPipeline::toggleRenderTypeControl(U32 type) { - U32 type = (U32)(intptr_t)data; U32 bit = (1<inBuildMode() ? FALSE : TRUE; + sPickAvatar = false; //! LLToolMgr::getInstance()->inBuildMode(); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -7177,7 +7170,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, const F32 ATTACHMENT_OVERRIDE_DIST = 0.1f; //check against avatars - sPickAvatar = TRUE; + sPickAvatar = true; for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -7249,7 +7242,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start, } LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + bool pick_transparent, S32* face_hit, LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -7264,11 +7257,11 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c { LLViewerRegion* region = *iter; - BOOL toggle = FALSE; + bool toggle = false; if (!hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { toggleRenderType(LLPipeline::RENDER_TYPE_HUD); - toggle = TRUE; + toggle = true; } LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD); @@ -7417,7 +7410,7 @@ void LLPipeline::doResetVertexBuffers(bool forced) LLVOPartGroup::restoreGL(); } -void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) +void LLPipeline::renderObjects(U32 type, U32 mask, bool texture, bool batch_texture) { assertInitialized(); gGL.loadMatrix(gGLModelView); @@ -7427,7 +7420,7 @@ void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_text gGLLastMatrix = NULL; } -void LLPipeline::renderMaskedObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) +void LLPipeline::renderMaskedObjects(U32 type, U32 mask, bool texture, bool batch_texture) { assertInitialized(); gGL.loadMatrix(gGLModelView); @@ -7500,7 +7493,7 @@ void LLPipeline::bindScreenToTexture() static LLTrace::BlockTimerStatHandle FTM_RENDER_BLOOM("Bloom"); -void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) +void LLPipeline::renderBloom(bool for_snapshot, F32 zoom_factor, int subfield) { if (!(gPipeline.canUseVertexShaders() && sRenderGlow)) @@ -8618,7 +8611,7 @@ void LLPipeline::renderDeferredLighting() gPipeline.popRenderTypeMask(); } - BOOL render_local = RenderLocalLights; + bool render_local = RenderLocalLights; if (render_local) { @@ -9171,7 +9164,7 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target) gPipeline.popRenderTypeMask(); } - BOOL render_local = RenderLocalLights; + bool render_local = RenderLocalLights; if (render_local) { @@ -9730,10 +9723,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) { if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { - BOOL skip_avatar_update = FALSE; + bool skip_avatar_update = false; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) { - skip_avatar_update = TRUE; + skip_avatar_update = true; } if (!skip_avatar_update) @@ -9748,7 +9741,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLCamera camera = camera_in; camera.setFar(camera.getFar()*0.87654321f); - LLPipeline::sReflectionRender = TRUE; + LLPipeline::sReflectionRender = true; gPipeline.pushRenderTypeMask(); @@ -9934,7 +9927,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) camera.setOrigin(camera_in.getOrigin()); //render distortion map - static BOOL last_update = TRUE; + static bool last_update = true; if (last_update) { camera.setFar(camera_in.getFar()); @@ -9944,7 +9937,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) END_RENDER_TYPES); stop_glerror(); - LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? FALSE : TRUE; + LLPipeline::sUnderWaterRender = ! LLViewerCamera::getInstance()->cameraUnderWater(); if (LLPipeline::sUnderWaterRender) { @@ -10006,12 +9999,12 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } mWaterDis.flush(); - LLPipeline::sUnderWaterRender = FALSE; + LLPipeline::sUnderWaterRender = false; } last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate; - LLPipeline::sReflectionRender = FALSE; + LLPipeline::sReflectionRender = false; if (!LLRenderTarget::sUseFBO) { @@ -10106,7 +10099,7 @@ static LLTrace::BlockTimerStatHandle FTM_SHADOW_RENDER("Render Shadows"); static LLTrace::BlockTimerStatHandle FTM_SHADOW_ALPHA("Alpha Shadow"); static LLTrace::BlockTimerStatHandle FTM_SHADOW_SIMPLE("Simple Shadow"); -void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion, U32 target_width) +void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, bool use_shader, bool use_occlusion, U32 target_width) { LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER); @@ -10116,7 +10109,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera { LLPipeline::sUseOcclusion = 0; } - LLPipeline::sShadowRender = TRUE; + LLPipeline::sShadowRender = true; U32 types[] = { LLRenderPass::PASS_SIMPLE, @@ -10259,18 +10252,18 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera gGLLastMatrix = NULL; LLPipeline::sUseOcclusion = occlude; - LLPipeline::sShadowRender = FALSE; + LLPipeline::sShadowRender = false; } static LLTrace::BlockTimerStatHandle FTM_VISIBLE_CLOUD("Visible Cloud"); -BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector& fp, LLVector3 light_dir) +bool LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector3& max, std::vector& fp, LLVector3 light_dir) { LL_RECORD_BLOCK_TIME(FTM_VISIBLE_CLOUD); //get point cloud of intersection of frust and min, max if (getVisibleExtents(camera, min, max)) { - return FALSE; + return false; } //get set of planes on bounding box @@ -10428,10 +10421,10 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector if (fp.empty()) { - return FALSE; + return false; } - return TRUE; + return true; } void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade) @@ -10523,11 +10516,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera) LL_RECORD_BLOCK_TIME(FTM_GEN_SUN_SHADOW); - BOOL skip_avatar_update = FALSE; + bool skip_avatar_update = false; if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson) { - skip_avatar_update = TRUE; + skip_avatar_update = true; } if (!skip_avatar_update) @@ -11287,7 +11280,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } } -void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture) +void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, bool texture) { for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i) { @@ -11373,10 +11366,10 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) S32 occlusion = sUseOcclusion; sUseOcclusion = 0; - sReflectionRender = sRenderDeferred ? FALSE : TRUE; + sReflectionRender = ! sRenderDeferred; - sShadowRender = TRUE; - sImpostorRender = TRUE; + sShadowRender = true; + sImpostorRender = true; LLViewerCamera* viewer_camera = LLViewerCamera::getInstance(); @@ -11625,9 +11618,9 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLVOAvatar::sUseImpostors = true; // @TODO ??? sUseOcclusion = occlusion; - sReflectionRender = FALSE; - sImpostorRender = FALSE; - sShadowRender = FALSE; + sReflectionRender = false; + sImpostorRender = false; + sShadowRender = false; popRenderTypeMask(); gGL.matrixMode(LLRender::MM_PROJECTION); @@ -11644,7 +11637,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar) LLGLState::checkClientArrays(); } -BOOL LLPipeline::hasRenderBatches(const U32 type) const +bool LLPipeline::hasRenderBatches(const U32 type) const { return sCull->getRenderMapSize(type) > 0; } @@ -11669,12 +11662,12 @@ LLCullResult::sg_iterator LLPipeline::endAlphaGroups() return sCull->endAlphaGroups(); } -BOOL LLPipeline::hasRenderType(const U32 type) const +bool LLPipeline::hasRenderType(const U32 type) const { // STORM-365 : LLViewerJointAttachment::setAttachmentVisibility() is setting type to 0 to actually mean "do not render" - // We then need to test that value here and return FALSE to prevent attachment to render (in mouselook for instance) - // TODO: reintroduce RENDER_TYPE_NONE in LLRenderTypeMask and initialize its mRenderTypeEnabled[RENDER_TYPE_NONE] to FALSE explicitely - return (type == 0 ? FALSE : mRenderTypeEnabled[type]); + // We then need to test that value here and return false to prevent attachment to render (in mouselook for instance) + // TODO: reintroduce RENDER_TYPE_NONE in LLRenderTypeMask and initialize its mRenderTypeEnabled[RENDER_TYPE_NONE] to false explicitely + return (type == 0 ? false : mRenderTypeEnabled[type]); } void LLPipeline::setRenderTypeMask(U32 type, ...) @@ -11684,7 +11677,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...) va_start(args, type); while (type < END_RENDER_TYPES) { - mRenderTypeEnabled[type] = TRUE; + mRenderTypeEnabled[type] = true; type = va_arg(args, U32); } va_end(args); @@ -11695,7 +11688,7 @@ void LLPipeline::setRenderTypeMask(U32 type, ...) } } -BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const +bool LLPipeline::hasAnyRenderType(U32 type, ...) const { va_list args; @@ -11704,7 +11697,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const { if (mRenderTypeEnabled[type]) { - return TRUE; + return true; } type = va_arg(args, U32); } @@ -11715,7 +11708,7 @@ BOOL LLPipeline::hasAnyRenderType(U32 type, ...) const LL_ERRS() << "Invalid render type." << LL_ENDL; } - return FALSE; + return false; } void LLPipeline::pushRenderTypeMask() @@ -11740,10 +11733,10 @@ void LLPipeline::andRenderTypeMask(U32 type, ...) { va_list args; - BOOL tmp[NUM_RENDER_TYPES]; + bool tmp[NUM_RENDER_TYPES]; for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) { - tmp[i] = FALSE; + tmp[i] = false; } va_start(args, type); @@ -11751,7 +11744,7 @@ void LLPipeline::andRenderTypeMask(U32 type, ...) { if (mRenderTypeEnabled[type]) { - tmp[type] = TRUE; + tmp[type] = true; } type = va_arg(args, U32); @@ -11777,7 +11770,7 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...) va_start(args, type); while (type < END_RENDER_TYPES) { - mRenderTypeEnabled[type] = FALSE; + mRenderTypeEnabled[type] = false; type = va_arg(args, U32); } @@ -11793,7 +11786,7 @@ void LLPipeline::setAllRenderTypes() { for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) { - mRenderTypeEnabled[i] = TRUE; + mRenderTypeEnabled[i] = true; } } @@ -11801,7 +11794,7 @@ void LLPipeline::clearAllRenderTypes() { for (U32 i = 0; i < NUM_RENDER_TYPES; ++i) { - mRenderTypeEnabled[i] = FALSE; + mRenderTypeEnabled[i] = false; } } @@ -11868,7 +11861,7 @@ void LLPipeline::restorePermanentObjects( const std::vector& restoreList ) skipRenderingOfTerrain( false ); } -void LLPipeline::skipRenderingOfTerrain( BOOL flag ) +void LLPipeline::skipRenderingOfTerrain( bool flag ) { pool_set_t::iterator iter = mPools.begin(); while ( iter != mPools.end() ) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index bba36351d9..c9670a60f2 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -57,10 +57,10 @@ typedef enum e_avatar_skinning_method SKIN_METHOD_VERTEX_PROGRAM } EAvatarSkinningMethod; -BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn't be defined here! +bool compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn't be defined here! bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0); -BOOL setup_hud_matrices(); // use whole screen to render hud -BOOL setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking) +bool setup_hud_matrices(); // use whole screen to render hud +bool setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking) glh::matrix4f glh_copy_matrix(F32* src); glh::matrix4f glh_get_current_modelview(); void glh_set_current_modelview(const glh::matrix4f& mat); @@ -133,11 +133,11 @@ public: void resetVertexBuffers(LLDrawable* drawable); void generateImpostor(LLVOAvatar* avatar); void bindScreenToTexture(); - void renderBloom(BOOL for_snapshot, F32 zoom_factor = 1.f, int subfield = 0); + void renderBloom(bool for_snapshot, F32 zoom_factor = 1.f, int subfield = 0); void init(); void cleanup(); - BOOL isInit() { return mInitialized; }; + bool isInit() { return mInitialized; }; /// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture. /// @return Draw pool, or NULL if not found. @@ -171,19 +171,19 @@ public: void doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderTarget& dest, LLRenderTarget* scratch_space = NULL); void doOcclusion(LLCamera& camera); void markNotCulled(LLSpatialGroup* group, LLCamera &camera); - void markMoved(LLDrawable *drawablep, BOOL damped_motion = FALSE); + void markMoved(LLDrawable *drawablep, bool damped_motion = false); void markShift(LLDrawable *drawablep); void markTextured(LLDrawable *drawablep); void markGLRebuild(LLGLUpdate* glu); - void markRebuild(LLSpatialGroup* group, BOOL priority = FALSE); - void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE); + void markRebuild(LLSpatialGroup* group, bool priority = false); + void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, bool priority = false); void markPartitionMove(LLDrawable* drawablep); void markMeshDirty(LLSpatialGroup* group); //get the object between start and end that's closest to start. LLViewerObject* lineSegmentIntersectInWorld(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, + bool pick_transparent, + bool pick_rigged, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -197,7 +197,7 @@ public: LLViewerObject* lineSegmentIntersectInHUD(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, + bool pick_transparent, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -212,20 +212,20 @@ public: U32 addObject(LLViewerObject *obj); - void enableShadows(const BOOL enable_shadows); + void enableShadows(const bool enable_shadows); -// void setLocalLighting(const BOOL local_lighting); -// BOOL isLocalLightingEnabled() const; +// void setLocalLighting(const bool local_lighting); +// bool isLocalLightingEnabled() const; S32 setLightingDetail(S32 level); S32 getLightingDetail() const { return mLightingDetail; } S32 getMaxLightingDetail() const; - void setUseVertexShaders(BOOL use_shaders); - BOOL getUseVertexShaders() const { return mVertexShadersEnabled; } - BOOL canUseVertexShaders(); - BOOL canUseWindLightShaders() const; - BOOL canUseWindLightShadersOnObjects() const; - BOOL canUseAntiAliasing() const; + void setUseVertexShaders(bool use_shaders); + bool getUseVertexShaders() const { return mVertexShadersEnabled; } + bool canUseVertexShaders(); + bool canUseWindLightShaders() const; + bool canUseWindLightShadersOnObjects() const; + bool canUseAntiAliasing() const; // phases void resetFrameStats(); @@ -234,9 +234,9 @@ public: void updateMoveNormalAsync(LLDrawable* drawablep); void updateMovedList(LLDrawable::drawable_vector_t& move_list); void updateMove(); - BOOL visibleObjectsInFrustum(LLCamera& camera); - BOOL getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max); - BOOL getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector& fp, LLVector3 light_dir = LLVector3(0,0,0)); + bool visibleObjectsInFrustum(LLCamera& camera); + bool getVisibleExtents(LLCamera& camera, LLVector3 &min, LLVector3& max); + bool getVisiblePointCloud(LLCamera& camera, LLVector3 &min, LLVector3& max, std::vector& fp, LLVector3 light_dir = LLVector3(0,0,0)); void updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip = 0, LLPlane* plane = NULL); //if water_clip is 0, ignore water plane, 1, cull to above plane, -1, cull to below plane void createObjects(F32 max_dtime); void createObject(LLViewerObject* vobj); @@ -259,10 +259,10 @@ public: void postSort(LLCamera& camera); void forAllVisibleDrawables(void (*func)(LLDrawable*)); - void renderObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE); - void renderMaskedObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE); + void renderObjects(U32 type, U32 mask, bool texture = true, bool batch_texture = false); + void renderMaskedObjects(U32 type, U32 mask, bool texture = true, bool batch_texture = false); - void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture); + void renderGroups(LLRenderPass* pass, U32 type, U32 mask, bool texture); void grabReferences(LLCullResult& result); void clearReferences(); @@ -274,7 +274,7 @@ public: void checkReferences(LLSpatialGroup* group); - void renderGeom(LLCamera& camera, BOOL forceVBOUpdate = FALSE); + void renderGeom(LLCamera& camera, bool forceVBOUpdate = false); void renderGeomDeferred(LLCamera& camera); void renderGeomPostDeferred(LLCamera& camera, bool do_occlusion=true); void renderGeomShadow(LLCamera& camera); @@ -292,7 +292,7 @@ public: void setHighlightObject(LLDrawable* obj) { mHighlightObject = obj; } - void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader, BOOL use_occlusion, U32 target_width); + void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool use_shader, bool use_occlusion, U32 target_width); void renderHighlights(); void renderDebug(); void renderPhysicsDisplay(); @@ -300,13 +300,13 @@ public: void rebuildPools(); // Rebuild pools void findReferences(LLDrawable *drawablep); // Find the lists which have references to this object - BOOL verify(); // Verify that all data in the pipeline is "correct" + bool verify(); // Verify that all data in the pipeline is "correct" S32 getLightCount() const { return mLights.size(); } void calcNearbyLights(LLCamera& camera); void setupHWLights(LLDrawPool* pool); - void setupAvatarLights(BOOL for_edit = FALSE); + void setupAvatarLights(bool for_edit = false); void enableLights(U32 mask); void enableLightsStatic(); void enableLightsDynamic(); @@ -318,9 +318,9 @@ public: void shiftObjects(const LLVector3 &offset); - void setLight(LLDrawable *drawablep, BOOL is_light); + void setLight(LLDrawable *drawablep, bool is_light); - BOOL hasRenderBatches(const U32 type) const; + bool hasRenderBatches(const U32 type) const; LLCullResult::drawinfo_iterator beginRenderMap(U32 type); LLCullResult::drawinfo_iterator endRenderMap(U32 type); LLCullResult::sg_iterator beginAlphaGroups(); @@ -329,15 +329,15 @@ public: void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES); - BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; } - BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; } + bool hasRenderDebugFeatureMask(const U32 mask) const { return bool(mRenderDebugFeatureMask & mask); } + bool hasRenderDebugMask(const U32 mask) const { return bool(mRenderDebugMask & mask); } void setAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0xffffffff; } void clearAllRenderDebugFeatures() { mRenderDebugFeatureMask = 0x0; } void setAllRenderDebugDisplays() { mRenderDebugMask = 0xffffffff; } void clearAllRenderDebugDisplays() { mRenderDebugMask = 0x0; } - BOOL hasRenderType(const U32 type) const; - BOOL hasAnyRenderType(const U32 type, ...) const; + bool hasRenderType(const U32 type) const; + bool hasAnyRenderType(const U32 type, ...) const; void setRenderTypeMask(U32 type, ...); // This is equivalent to 'setRenderTypeMask' @@ -356,53 +356,53 @@ public: static void toggleRenderType(U32 type); // For UI control of render features - static BOOL hasRenderTypeControl(void* data); - static void toggleRenderDebug(void* data); - static void toggleRenderDebugFeature(void* data); - static void toggleRenderTypeControl(void* data); - static BOOL toggleRenderTypeControlNegated(void* data); - static BOOL toggleRenderDebugControl(void* data); - static BOOL toggleRenderDebugFeatureControl(void* data); + static bool hasRenderTypeControl(U32 data); + static void toggleRenderDebug(U32 data); + static void toggleRenderDebugFeature(U32 data); + static void toggleRenderTypeControl(U32 data); + static bool toggleRenderTypeControlNegated(S32 data); + static bool toggleRenderDebugControl(U32 data); + static bool toggleRenderDebugFeatureControl(U32 data); static void setRenderDebugFeatureControl(U32 bit, bool value); - static void setRenderParticleBeacons(BOOL val); - static void toggleRenderParticleBeacons(void* data); - static BOOL getRenderParticleBeacons(void* data); + static void setRenderParticleBeacons(bool val); + static void toggleRenderParticleBeacons(); + static bool getRenderParticleBeacons(); - static void setRenderSoundBeacons(BOOL val); - static void toggleRenderSoundBeacons(void* data); - static BOOL getRenderSoundBeacons(void* data); + static void setRenderSoundBeacons(bool val); + static void toggleRenderSoundBeacons(); + static bool getRenderSoundBeacons(); - static void setRenderMOAPBeacons(BOOL val); - static void toggleRenderMOAPBeacons(void * data); - static BOOL getRenderMOAPBeacons(void * data); + static void setRenderMOAPBeacons(bool val); + static void toggleRenderMOAPBeacons(); + static bool getRenderMOAPBeacons(); - static void setRenderPhysicalBeacons(BOOL val); - static void toggleRenderPhysicalBeacons(void* data); - static BOOL getRenderPhysicalBeacons(void* data); + static void setRenderPhysicalBeacons(bool val); + static void toggleRenderPhysicalBeacons(); + static bool getRenderPhysicalBeacons(); - static void setRenderScriptedBeacons(BOOL val); - static void toggleRenderScriptedBeacons(void* data); - static BOOL getRenderScriptedBeacons(void* data); + static void setRenderScriptedBeacons(bool val); + static void toggleRenderScriptedBeacons(); + static bool getRenderScriptedBeacons(); - static void setRenderScriptedTouchBeacons(BOOL val); - static void toggleRenderScriptedTouchBeacons(void* data); - static BOOL getRenderScriptedTouchBeacons(void* data); + static void setRenderScriptedTouchBeacons(bool val); + static void toggleRenderScriptedTouchBeacons(); + static bool getRenderScriptedTouchBeacons(); - static void setRenderBeacons(BOOL val); - static void toggleRenderBeacons(void* data); - static BOOL getRenderBeacons(void* data); + static void setRenderBeacons(bool val); + static void toggleRenderBeacons(); + static bool getRenderBeacons(); - static void setRenderHighlights(BOOL val); - static void toggleRenderHighlights(void* data); - static BOOL getRenderHighlights(void* data); + static void setRenderHighlights(bool val); + static void toggleRenderHighlights(); + static bool getRenderHighlights(); static void setRenderHighlightTextureChannel(LLRender::eTexIndex channel); // sets which UV setup to display in highlight overlay static void updateRenderBump(); static void updateRenderDeferred(); static void refreshCachedSettings(); - static void throttleNewMemoryAllocation(BOOL disable); + static void throttleNewMemoryAllocation(bool disable); @@ -410,7 +410,7 @@ public: void hidePermanentObjects( std::vector& restoreList ); void restorePermanentObjects( const std::vector& restoreList ); - void skipRenderingOfTerrain( BOOL flag ); + void skipRenderingOfTerrain( bool flag ); void hideObject( const LLUUID& id ); void restoreHiddenObject( const LLUUID& id ); @@ -418,7 +418,7 @@ private: void unloadShaders(); void addToQuickLookup( LLDrawPool* new_poolp ); void removeFromQuickLookup( LLDrawPool* poolp ); - BOOL updateDrawableGeom(LLDrawable* drawable, BOOL priority); + bool updateDrawableGeom(LLDrawable* drawable, bool priority); void assertInitializedDoError(); bool assertInitialized() { const bool is_init = isInit(); if (!is_init) assertInitializedDoError(); return is_init; }; void connectRefreshCachedSettingsSafe(const std::string name); @@ -539,12 +539,12 @@ public: LLSpatialPartition* getSpatialPartition(LLViewerObject* vobj); - void updateCamera(BOOL reset = FALSE); + void updateCamera(bool reset = false); LLVector3 mFlyCamPosition; LLQuaternion mFlyCamRotation; - BOOL mBackfaceCull; + bool mBackfaceCull; S32 mMatrixOpCount; S32 mTextureMatrixOps; S32 mNumVisibleNodes; @@ -557,36 +557,36 @@ public: static S32 sCompiles; - static BOOL sShowHUDAttachments; - static BOOL sForceOldBakedUpload; // If true will not use capabilities to upload baked textures. + static bool sShowHUDAttachments; + static bool sForceOldBakedUpload; // If true will not use capabilities to upload baked textures. static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write - static BOOL sDelayVBUpdate; - static BOOL sAutoMaskAlphaDeferred; - static BOOL sAutoMaskAlphaNonDeferred; - static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders - static BOOL sRenderBump; - static BOOL sBakeSunlight; - static BOOL sNoAlpha; - static BOOL sUseTriStrips; - static BOOL sUseFarClip; - static BOOL sShadowRender; - static BOOL sWaterReflections; - static BOOL sDynamicLOD; - static BOOL sPickAvatar; - static BOOL sReflectionRender; - static BOOL sImpostorRender; - static BOOL sImpostorRenderAlphaDepthPass; - static BOOL sUnderWaterRender; - static BOOL sRenderGlow; - static BOOL sTextureBindTest; - static BOOL sRenderFrameTest; - static BOOL sRenderAttachedLights; - static BOOL sRenderAttachedParticles; - static BOOL sRenderDeferred; - static BOOL sMemAllocationThrottled; + static bool sDelayVBUpdate; + static bool sAutoMaskAlphaDeferred; + static bool sAutoMaskAlphaNonDeferred; + static bool sDisableShaders; // if true, rendering will be done without shaders + static bool sRenderBump; + static bool sBakeSunlight; + static bool sNoAlpha; + static bool sUseTriStrips; + static bool sUseFarClip; + static bool sShadowRender; + static bool sWaterReflections; + static bool sDynamicLOD; + static bool sPickAvatar; + static bool sReflectionRender; + static bool sImpostorRender; + static bool sImpostorRenderAlphaDepthPass; + static bool sUnderWaterRender; + static bool sRenderGlow; + static bool sTextureBindTest; + static bool sRenderFrameTest; + static bool sRenderAttachedLights; + static bool sRenderAttachedParticles; + static bool sRenderDeferred; + static bool sMemAllocationThrottled; static S32 sVisibleLightCount; static F32 sMinRenderSize; - static BOOL sRenderingHUDs; + static bool sRenderingHUDs; static LLTrace::EventStatHandle sStatBatchSize; @@ -659,13 +659,13 @@ public: LLVector3 mSunDir; LLVector3 mTransformedSunDir; - BOOL mInitialized; - BOOL mVertexShadersEnabled; + bool mInitialized; + bool mVertexShadersEnabled; S32 mVertexShadersLoaded; // 0 = no, 1 = yes, -1 = failed U32 mTransformFeedbackPrimitives; //number of primitives expected to be generated by transform feedback protected: - BOOL mRenderTypeEnabled[NUM_RENDER_TYPES]; + bool mRenderTypeEnabled[NUM_RENDER_TYPES]; std::stack mRenderTypeEnableStack; U32 mRenderDebugFeatureMask; @@ -843,15 +843,15 @@ protected: U32 mLightMovingMask; S32 mLightingDetail; - static BOOL sRenderPhysicalBeacons; - static BOOL sRenderMOAPBeacons; - static BOOL sRenderScriptedTouchBeacons; - static BOOL sRenderScriptedBeacons; - static BOOL sRenderParticleBeacons; - static BOOL sRenderSoundBeacons; + static bool sRenderPhysicalBeacons; + static bool sRenderMOAPBeacons; + static bool sRenderScriptedTouchBeacons; + static bool sRenderScriptedBeacons; + static bool sRenderParticleBeacons; + static bool sRenderSoundBeacons; public: - static BOOL sRenderBeacons; - static BOOL sRenderHighlight; + static bool sRenderBeacons; + static bool sRenderHighlight; // Determines which set of UVs to use in highlight display // @@ -861,26 +861,26 @@ public: static U32 sCurRenderPoolType ; //cached settings - static BOOL WindLightUseAtmosShaders; - static BOOL VertexShaderEnable; - static BOOL RenderAvatarVP; - static BOOL RenderDeferred; + static bool WindLightUseAtmosShaders; + static bool VertexShaderEnable; + static bool RenderAvatarVP; + static bool RenderDeferred; static F32 RenderDeferredSunWash; static U32 RenderFSAASamples; static U32 RenderResolutionDivisor; - static BOOL RenderUIBuffer; + static bool RenderUIBuffer; static S32 RenderShadowDetail; - static BOOL RenderDeferredSSAO; + static bool RenderDeferredSSAO; static F32 RenderShadowResolutionScale; - static BOOL RenderLocalLights; - static BOOL RenderDelayCreation; - static BOOL RenderAnimateRes; - static BOOL FreezeTime; + static bool RenderLocalLights; + static bool RenderDelayCreation; + static bool RenderAnimateRes; + static bool FreezeTime; static S32 DebugBeaconLineWidth; static F32 RenderHighlightBrightness; static LLColor4 RenderHighlightColor; static F32 RenderHighlightThickness; - static BOOL RenderSpotLightsInNondeferred; + static bool RenderSpotLightsInNondeferred; static LLColor4 PreviewAmbientColor; static LLColor4 PreviewDiffuse0; static LLColor4 PreviewSpecular0; @@ -900,8 +900,8 @@ public: static S32 RenderGlowIterations; static F32 RenderGlowWidth; static F32 RenderGlowStrength; - static BOOL RenderDepthOfField; - static BOOL RenderDepthOfFieldInEditMode; + static bool RenderDepthOfField; + static bool RenderDepthOfFieldInEditMode; static F32 CameraFocusTransitionTime; static F32 CameraFNumber; static F32 CameraFocalLength; @@ -922,7 +922,7 @@ public: static F32 RenderEdgeNormCutoff; static LLVector3 RenderShadowGaussian; static F32 RenderShadowBlurDistFactor; - static BOOL RenderDeferredAtmospheric; + static bool RenderDeferredAtmospheric; static S32 RenderReflectionDetail; static F32 RenderHighlightFadeTime; static LLVector3 RenderShadowClipPlanes; @@ -932,7 +932,7 @@ public: static LLVector3 RenderShadowSplitExponent; static F32 RenderShadowErrorCutoff; static F32 RenderShadowFOVCutoff; - static BOOL CameraOffset; + static bool CameraOffset; static F32 CameraMaxCoF; static F32 CameraDoFResScale; static F32 RenderAutoHideSurfaceAreaLimit; @@ -942,7 +942,7 @@ void render_bbox(const LLVector3 &min, const LLVector3 &max); void render_hud_elements(); extern LLPipeline gPipeline; -extern BOOL gDebugPipeline; +extern bool gDebugPipeline; extern const LLMatrix4* gGLLastMatrix; #endif -- cgit v1.2.3 From c20e57c48f957ef13d259e54de908153ac996ca7 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 20 Dec 2016 14:41:46 -0500 Subject: move debugging globals to the "lowest" library they are referenced in --- indra/newview/llspatialpartition.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 0fd36766b3..94b838e829 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -61,9 +61,6 @@ extern bool gShiftFrame; static U32 sZombieGroups = 0; U32 LLSpatialGroup::sNodeCount = 0; -U32 gOctreeMaxCapacity; -F32 gOctreeMinSize; - BOOL LLSpatialGroup::sNoDelete = FALSE; static F32 sLastMaxTexPriority = 1.f; -- cgit v1.2.3 From a1a395b6798f941969220f8a27cf927adafcba73 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 15:42:57 -0500 Subject: DRTVWR-418: Make viewer_manifest.py copy current libexpat.1.dylib. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a8049d874d..1a68bb0173 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -788,7 +788,7 @@ class DarwinManifest(ViewerManifest): "libapr-1.0.dylib", "libaprutil-1.0.dylib", "libcollada14dom.dylib", - "libexpat.1.5.2.dylib", + "libexpat.1.dylib", "libexception_handler.dylib", "libGLOD.dylib", ): -- cgit v1.2.3 From e575abe99f15adba967342ad3646ba57040c778e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 16:44:51 -0500 Subject: DRTVWR-418: Create CEF framework symlink from LLCefLib Helper.app. Without that symlink, the helper app can't find CEF and we get no web content. --- indra/newview/viewer_manifest.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1a68bb0173..f259826443 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -846,6 +846,14 @@ class DarwinManifest(ViewerManifest): self.path2basename(relpkgdir, helperappfile) pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework'); + # Putting a Frameworks directory under Contents/MacOS + # isn't canonical, but the path baked into LLCefLib + # Helper.app/Contents/MacOS/LLCefLib Helper is: + # @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework + # (notice, not @executable_path/../Frameworks/etc.) + # So we'll create a symlink (below) from there back to the + # Frameworks directory nested under SLPlugin.app. + helperframeworkpath = self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/Frameworks') self.end_prefix() @@ -879,11 +887,21 @@ class DarwinManifest(ViewerManifest): # Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative) # .app/Contents/Frameworks/Chromium Embedded Framework.framework/ # .app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -> - frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks", "Chromium Embedded Framework.framework") + frameworkdir = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks") + frameworkpath = os.path.join(frameworkdir, "Chromium Embedded Framework.framework") try: - symlinkf(frameworkpath, pluginframeworkpath) + # from SLPlugin.app/Contents/Frameworks/Chromium Embedded + # Framework.framework back to Second + # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework + origin, target = pluginframeworkpath, frameworkpath + symlinkf(target, origin) + # from SLPlugin.app/Contents/Frameworks/LLCefLib + # Helper.app/Contents/MacOS/Frameworks back to + # SLPlugin.app/Contents/Frameworks + origin, target = helperframeworkpath, frameworkdir + symlinkf(target, origin) except OSError as err: - print "Can't symlink %s -> %s: %s" % (frameworkpath, pluginframeworkpath, err) + print "Can't symlink %s -> %s: %s" % (origin, target, err) raise self.end_prefix("Contents") -- cgit v1.2.3 From d34530fd07e62c25e010e6373860b358855c96cd Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 20 Dec 2016 16:28:53 -0800 Subject: DRTVWR-418 fix BOOL/bool comparison that errors out as as warning on VS 2013 builds --- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llappviewer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 06d6f76cce..97a5ca3f07 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -333,10 +333,10 @@ BOOL gDisconnected = FALSE; // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; -BOOL gUseWireframe = FALSE; +bool gUseWireframe = FALSE; //use for remember deferred mode in wireframe switch -BOOL gInitialDeferredModeForWireframe = FALSE; +bool gInitialDeferredModeForWireframe = FALSE; // VFS globals - see llappviewer.h LLVFS* gStaticVFS = NULL; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 948d316009..d4875cc7c1 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -391,8 +391,8 @@ extern BOOL gDisconnected; extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; -extern BOOL gUseWireframe; -extern BOOL gInitialDeferredModeForWireframe; +extern bool gUseWireframe; +extern bool gInitialDeferredModeForWireframe; // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer -- cgit v1.2.3 From 1cbdfce396f165ab3ac18373901c0563088202df Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 21:27:40 -0500 Subject: DRTVWR-418: Avoid constructing symlink cycle for CEF framework. --- indra/newview/viewer_manifest.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f259826443..89c98a1cb3 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -853,7 +853,9 @@ class DarwinManifest(ViewerManifest): # (notice, not @executable_path/../Frameworks/etc.) # So we'll create a symlink (below) from there back to the # Frameworks directory nested under SLPlugin.app. - helperframeworkpath = self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/Frameworks') + helperframeworkpath = \ + self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/' + 'Frameworks/Chromium Embedded Framework.framework') self.end_prefix() @@ -882,13 +884,20 @@ class DarwinManifest(ViewerManifest): # this symlink, Second Life web media can't possibly work. # Real Framework folder: # Second Life.app/Contents/Frameworks/Chromium Embedded Framework.framework/ - # Location of symlink and why it'ds relative + # Location of symlink and why it's relative # Second Life.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework/ # Real Frameworks folder, with the symlink inside the bundled SLPlugin.app (and why it's relative) # .app/Contents/Frameworks/Chromium Embedded Framework.framework/ # .app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -> - frameworkdir = os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, "Frameworks") - frameworkpath = os.path.join(frameworkdir, "Chromium Embedded Framework.framework") + # It might seem simpler just to create a symlink Frameworks to + # the parent of Chromimum Embedded Framework.framework. But + # that would create a symlink cycle, which breaks our + # packaging step. So make a symlink from Chromium Embedded + # Framework.framework to the directory of the same name, which + # is NOT an ancestor of the symlink. + frameworkpath = os.path.join(os.pardir, os.pardir, os.pardir, + os.pardir, "Frameworks", + "Chromium Embedded Framework.framework") try: # from SLPlugin.app/Contents/Frameworks/Chromium Embedded # Framework.framework back to Second @@ -896,9 +905,12 @@ class DarwinManifest(ViewerManifest): origin, target = pluginframeworkpath, frameworkpath symlinkf(target, origin) # from SLPlugin.app/Contents/Frameworks/LLCefLib - # Helper.app/Contents/MacOS/Frameworks back to - # SLPlugin.app/Contents/Frameworks - origin, target = helperframeworkpath, frameworkdir + # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded + # Framework.framework back to + # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework + self.cmakedirs(os.path.dirname(helperframeworkpath)) + origin = helperframeworkpath + target = os.path.join(os.pardir, frameworkpath) symlinkf(target, origin) except OSError as err: print "Can't symlink %s -> %s: %s" % (origin, target, err) -- cgit v1.2.3 From 03d65d4ec49d66d1a095208b35dceccf36883cc2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Dec 2016 11:33:58 -0500 Subject: DRTVWR-418: Deal with fatal warning 'unsafe mix of bool and BOOL' --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b657726ef8..52dae4c0ac 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1221,7 +1221,7 @@ class LLAdvancedToggleWireframe : public view_listener_t LLPipeline::updateRenderDeferred(); gPipeline.resetVertexBuffers(); - if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != gInitialDeferredModeForWireframe && gPipeline.isInit()) + if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != bool(gInitialDeferredModeForWireframe) && gPipeline.isInit()) { LLPipeline::refreshCachedSettings(); gPipeline.releaseGLBuffers(); -- cgit v1.2.3 From 594221790bc359f55a52a0fdca84631f3c86e0b6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Dec 2016 12:46:28 -0500 Subject: DRTVWR-418: Fix a couple unused-variable fatal warnings in local builds. If the only use of a variable is within llassert(), have to make the declaration conditional on SHOW_ASSERT rather than guesswork about release builds. --- indra/newview/llmaterialmgr.cpp | 2 +- indra/newview/llskinningutil.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index f996557c17..ccbe13fb50 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -531,7 +531,7 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content) LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL; for (LLSD::array_const_iterator faceIter = response_data.beginArray(); faceIter != response_data.endArray(); ++faceIter) { -# ifndef LL_RELEASE_FOR_DOWNLOAD +# ifdef SHOW_ASSERT // same condition that controls llassert() const LLSD& face_data = *faceIter; // conditional to avoid unused variable warning # endif llassert(face_data.isMap()); diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index cf09f6f978..dba690242a 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -122,7 +122,7 @@ void LLSkinningUtil::initSkinningMatrixPalette( // static void LLSkinningUtil::checkSkinWeights(LLVector4a* weights, U32 num_vertices, const LLMeshSkinInfo* skin) { -#ifndef LL_RELEASE_FOR_DOWNLOAD +#ifdef SHOW_ASSERT // same condition that controls llassert() const S32 max_joints = skin->mJointNames.size(); for (U32 j=0; j Date: Thu, 22 Dec 2016 13:54:39 -0500 Subject: one more try... also fixing setting of viewer_channel without quotes --- indra/newview/CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index df855b0de2..f2eb8ff9d5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1770,7 +1770,7 @@ if (WINDOWS) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} --grid=${GRID} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat @@ -1833,7 +1833,7 @@ if (WINDOWS) --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} @@ -1972,7 +1972,7 @@ if (LINUX) --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged @@ -2000,7 +2000,7 @@ if (LINUX) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged --grid=${GRID} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS @@ -2059,7 +2059,7 @@ if (DARWIN) --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --grid=${GRID} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} DEPENDS @@ -2088,11 +2088,10 @@ if (DARWIN) --artwork=${ARTWORK_DIR} --build=${CMAKE_CURRENT_BINARY_DIR} --buildtype=${CMAKE_BUILD_TYPE} - --channel=${VIEWER_CHANNEL} --configuration=${CMAKE_CFG_INTDIR} --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app --grid=${GRID} - --channel=${VIEWER_CHANNEL} + "--channel=${VIEWER_CHANNEL}" --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt --source=${CMAKE_CURRENT_SOURCE_DIR} --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched -- cgit v1.2.3 From dcae92c0a306aaf6447089b340913d4a678855ac Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Fri, 27 Jan 2017 15:47:16 -0800 Subject: First batch of changes to add LibVLC media plugin to macOS viewer. Plugin fails to start because of an as-yet undiagnosed issue with VLC plugin files related to their extyended attributes --- indra/newview/CMakeLists.txt | 4 +-- .../skins/default/xui/en/mime_types_mac.xml | 32 +++++++++++----------- indra/newview/viewer_manifest.py | 18 ++++++++++-- 3 files changed, 33 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f2eb8ff9d5..e641741958 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1742,7 +1742,6 @@ if (WINDOWS) ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll SLPlugin - media_plugin_quicktime media_plugin_cef media_plugin_libvlc winmm_shim @@ -2067,7 +2066,7 @@ if (DARWIN) ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) - add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_libvlc media_plugin_cef mac-crash-logger) + add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef mac-crash-logger) add_dependencies(${VIEWER_BINARY_NAME} mac-crash-logger) if (ENABLE_SIGNING) @@ -2124,7 +2123,6 @@ if (PACKAGE) list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}") list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}") list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}") - list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}") set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin-$ENV{AUTOBUILD_ADDRSIZE}.tar.bz2") set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-crash-logger") set(VIEWER_EXE_GLOBS "'Second Life' mac-crash-logger") diff --git a/indra/newview/skins/default/xui/en/mime_types_mac.xml b/indra/newview/skins/default/xui/en/mime_types_mac.xml index f71c24b2e4..2d96708b86 100644 --- a/indra/newview/skins/default/xui/en/mime_types_mac.xml +++ b/indra/newview/skins/default/xui/en/mime_types_mac.xml @@ -130,7 +130,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -141,7 +141,7 @@ none - media_plugin_quicktime + media_plugin_libvlc @@ -163,7 +163,7 @@ audio - media_plugin_quicktime + media_plugin_libvlc @@ -174,7 +174,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -196,7 +196,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -218,7 +218,7 @@ audio - media_plugin_quicktime + media_plugin_libvlc @@ -295,7 +295,7 @@ audio - media_plugin_quicktime + media_plugin_libvlc @@ -306,7 +306,7 @@ audio - media_plugin_quicktime + media_plugin_libvlc @@ -317,7 +317,7 @@ audio - media_plugin_quicktime + media_plugin_libvlc @@ -328,7 +328,7 @@ audio - media_plugin_quicktime + media_plugin_libvlc @@ -438,7 +438,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -449,7 +449,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -460,7 +460,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -471,7 +471,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -482,7 +482,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc @@ -493,7 +493,7 @@ movie - media_plugin_quicktime + media_plugin_libvlc diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 89c98a1cb3..6fb9479564 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -861,10 +861,24 @@ class DarwinManifest(ViewerManifest): # SLPlugin plugins if self.prefix(src="", dst="llplugin"): - self.path2basename("../media_plugins/quicktime/" + self.args['configuration'], - "media_plugin_quicktime.dylib") self.path2basename("../media_plugins/cef/" + self.args['configuration'], "media_plugin_cef.dylib") + + # copy LibVLC plugin itself + self.path2basename("../media_plugins/libvlc/" + self.args['configuration'], + "media_plugin_libvlc.dylib") + + # copy LibVLC dynamic libraries + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release' ), dst="lib"): + self.path( "libvlc*.dylib*" ) + self.end_prefix() + + # copy LibVLC plugins folder + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="plugins"): + self.path( "lib*_plugin.dylib" ) + self.path( "plugins.dat" ) + self.end_prefix() + self.end_prefix("llplugin") self.end_prefix("Resources") -- cgit v1.2.3 From ac9777bd8eed3899c48ba203d88911085c09e65a Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 3 Feb 2017 16:25:33 -0800 Subject: Change destination location of updated VLC files to correct one --- indra/newview/viewer_manifest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 6fb9479564..d68c01351f 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -874,8 +874,8 @@ class DarwinManifest(ViewerManifest): self.end_prefix() # copy LibVLC plugins folder - if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="plugins"): - self.path( "lib*_plugin.dylib" ) + if self.prefix(src=os.path.join(os.pardir, 'packages', 'lib', 'release', 'plugins' ), dst="lib"): + self.path( "*.dylib" ) self.path( "plugins.dat" ) self.end_prefix() -- cgit v1.2.3 From 9472098e81b3381803237d2a87a4c5de6164b48d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 15 Feb 2017 15:27:05 -0500 Subject: improve dependency declarations for packages-info and other settings files --- indra/newview/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d1614b5f26..c4ded8c5ae 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1741,6 +1741,7 @@ if (WINDOWS) ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll + ${viewer_APPSETTINGS_FILES} SLPlugin media_plugin_cef media_plugin_libvlc -- cgit v1.2.3 From 5534ab4e182b8403cf0ed514059e346d55f18162 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 21 Feb 2017 15:06:21 -0800 Subject: First round of changes to replace LLCEFLib with Dullahan. Mostly Windows changes in this batch since I'm working on Windows box but some speculative macOS ones too although they are quite untested --- indra/newview/llappviewer.cpp | 10 ++++++---- indra/newview/skins/default/xui/da/floater_about.xml | 2 +- indra/newview/skins/default/xui/de/strings.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 2 +- indra/newview/skins/default/xui/es/strings.xml | 4 ++-- indra/newview/skins/default/xui/fr/strings.xml | 2 +- indra/newview/skins/default/xui/it/strings.xml | 2 +- indra/newview/skins/default/xui/ja/strings.xml | 2 +- indra/newview/skins/default/xui/pl/strings.xml | 2 +- indra/newview/skins/default/xui/pt/strings.xml | 2 +- indra/newview/skins/default/xui/ru/strings.xml | 2 +- indra/newview/skins/default/xui/tr/strings.xml | 2 +- indra/newview/skins/default/xui/zh/strings.xml | 2 +- indra/newview/viewer_manifest.py | 17 ++++++++--------- 14 files changed, 27 insertions(+), 26 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 65c3e70b66..d7b91ba741 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -125,7 +125,7 @@ #include "llcoros.h" #include "llexception.h" #if !LL_LINUX -#include "cef/llceflib.h" +#include "cef/dullahan.h" #if LL_WINDOWS #include "vlc/libvlc_version.h" #endif // LL_WINDOWS @@ -3393,13 +3393,15 @@ LLSD LLAppViewer::getViewerInfo() const } #if !LL_LINUX - info["LLCEFLIB_VERSION"] = LLCEFLIB_VERSION; + // TODO this is terrible, but how else to accurately get back entire version from + // both CEF and Dullahan when there is no #define anymore? + info["LIBCEF_VERSION"] = "Calculating..."; #else - info["LLCEFLIB_VERSION"] = "Undefined"; + info["LIBCEF_VERSION"] = "Undefined"; #endif -#if LL_WINDOWS +#if !LL_LINUX std::ostringstream ver_codec; ver_codec << LIBVLC_VERSION_MAJOR; ver_codec << "."; diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 779b168ae0..7654f0dcd6 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -24,7 +24,7 @@ Grafik kort: [GRAPHICS_CARD] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] +CEF Version: [LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 4a2cbcc81f..d3d0423d44 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -79,7 +79,7 @@ Erstellungszeit VFS (Cache): [VFS_TIME] J2C-Decoderversion: [J2C_VERSION] Audiotreiberversion: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF-Version: [LLCEFLIB_VERSION] +CEF-Version: [LIBCEF_VERSION] LibVLC-Version: [LIBVLC_VERSION] Voice-Server-Version: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 6b3422d892..c19ab5a570 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -61,7 +61,7 @@ VFS (cache) creation time: [VFS_TIME] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Version: [LLCEFLIB_VERSION] +CEF Version: [LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 192d32c267..a56d7d6de7 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -70,8 +70,8 @@ Tiempo de creación de VFS (caché): [VFS_TIME] Versión de J2C Decoder: [J2C_VERSION] Versión de Audio Driver: [AUDIO_DRIVER_VERSION] -Versión de LLCEFLib/CEF: [LLCEFLIB_VERSION] -Versión de LibVLC: [LLCEFLIB_VERSION] +Versión de CEF: [LIBCEF_VERSION] +Versión de LibVLC: [LIBVLC_VERSION] Versión de Voice Server: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 40a41b93ab..10c9be0795 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -79,7 +79,7 @@ Durée de création VFS (cache) : [VFS_TIME] Version J2C Decoder : [J2C_VERSION] Version Audio Driver : [AUDIO_DRIVER_VERSION] -Version LLCEFLib/CEF : [LLCEFLIB_VERSION] +Version CEF : [LIBCEF_VERSION] Version LibVLC : [LIBVLC_VERSION] Version serveur vocal : [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 8246f91d17..d158cfd311 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -76,7 +76,7 @@ Data/ora creazione VFS (cache): [VFS_TIME] Versione J2C Decoder: [J2C_VERSION] Versione Driver audio: [AUDIO_DRIVER_VERSION] -Versione LLCEFLib/CEF: [LLCEFLIB_VERSION] +Versione CEF: [LIBCEF_VERSION] Versione LibVLC: [LIBVLC_VERSION] Versione Server voice: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index 586b8ab2d3..b3c92dbe8d 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -79,7 +79,7 @@ VFS(キャッシュ)作成時間: [VFS_TIME] J2C デコーダバージョン:[J2C_VERSION] オーディオドライババージョン:[AUDIO_DRIVER_VERSION] -LLCEFLib/CEF バージョン: [LLCEFLIB_VERSION] +CEF バージョン: [LIBCEF_VERSION] LibVLC バージョン: [LIBVLC_VERSION] ボイスサーバーバージョン:[VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml index e9dd18043d..9aece1221d 100644 --- a/indra/newview/skins/default/xui/pl/strings.xml +++ b/indra/newview/skins/default/xui/pl/strings.xml @@ -43,7 +43,7 @@ Wersja OpenGL: [OPENGL_VERSION] Wersja dekodera J2C: [J2C_VERSION] Wersja sterownika dźwięku (Audio Driver): [AUDIO_DRIVER_VERSION] -Wersja LLCEFLib/CEF: [LLCEFLIB_VERSION] +Wersja CEF: [LIBCEF_VERSION] Wersja LibVLC: [LIBVLC_VERSION] Wersja serwera głosu (Voice Server): [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 207b4e7097..0d7585a424 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -70,7 +70,7 @@ Tempo de criação de VFS (cache): [VFS_TIME] Versão do J2C Decoder: [J2C_VERSION] Versão do driver de áudio: [AUDIO_DRIVER_VERSION] -Versão de LLCEFLib/CEF: [LLCEFLIB_VERSION] +Versão de CEF: [LIBCEF_VERSION] Versão da LibVLC: [LIBVLC_VERSION] Versão do servidor de voz: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index e44d63b3b9..7b1dcae021 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -79,7 +79,7 @@ SLURL: <nolink>[SLURL]</nolink> Версия декодера J2C: [J2C_VERSION] Версия драйвера звука: [AUDIO_DRIVER_VERSION] -Версия LLCEFLib/CEF: [LLCEFLIB_VERSION] +Версия CEF: [LIBCEF_VERSION] Версия LibVLC: [LIBVLC_VERSION] Версия голосового сервера: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index 7b4bf1fca6..dda7902e94 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -79,7 +79,7 @@ VFS (önbellek) oluşturma zamanı: [VFS_TIME] J2C Kod Çözücü Sürümü: [J2C_VERSION] Ses Sürücüsü Sürümü: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF Sürümü: [LLCEFLIB_VERSION] +CEF Sürümü: [LIBCEF_VERSION] LibVLC Sürümü: [LIBVLC_VERSION] Ses Sunucusu Sürümü: [VOICE_VERSION] diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index ec08c9f91e..9e88e96284 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -79,7 +79,7 @@ VFS(快取)建立時間:[VFS_TIME] J2C 解碼器版本: [J2C_VERSION] 音效驅動程式版本: [AUDIO_DRIVER_VERSION] -LLCEFLib/CEF版本:[LLCEFLIB_VERSION] +CEF版本:[LIBCEF_VERSION] LibVLC版本:[LIBVLC_VERSION]N] 語音伺服器版本: [VOICE_VERSION] diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d68c01351f..c5bd91e396 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -447,7 +447,7 @@ class WindowsManifest(ViewerManifest): self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("llceflib_host.exe") + self.path("dullahan_host.exe") self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") @@ -461,7 +461,7 @@ class WindowsManifest(ViewerManifest): self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("llceflib_host.exe") + self.path("dullahan_host.exe") self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") @@ -839,22 +839,21 @@ class DarwinManifest(ViewerManifest): except OSError as err: print "Can't symlink %s -> %s: %s" % (src, dst, err) - # LLCefLib helper apps go inside SLPlugin.app + # Dullahan helper apps go inside SLPlugin.app if self.prefix(src="", dst="SLPlugin.app/Contents/Frameworks"): - for helperappfile in ('LLCefLib Helper.app', - 'LLCefLib Helper EH.app'): + for helperappfile in ('DullahanHelper.app'): self.path2basename(relpkgdir, helperappfile) pluginframeworkpath = self.dst_path_of('Chromium Embedded Framework.framework'); # Putting a Frameworks directory under Contents/MacOS - # isn't canonical, but the path baked into LLCefLib - # Helper.app/Contents/MacOS/LLCefLib Helper is: + # isn't canonical, but the path baked into Dullahan + # Helper.app/Contents/MacOS/DullahanHelper is: # @executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework # (notice, not @executable_path/../Frameworks/etc.) # So we'll create a symlink (below) from there back to the # Frameworks directory nested under SLPlugin.app. helperframeworkpath = \ - self.dst_path_of('LLCefLib Helper.app/Contents/MacOS/' + self.dst_path_of('DullahanHelper.app/Contents/MacOS/' 'Frameworks/Chromium Embedded Framework.framework') self.end_prefix() @@ -918,7 +917,7 @@ class DarwinManifest(ViewerManifest): # Life.app/Contents/Frameworks/Chromium Embedded Framework.framework origin, target = pluginframeworkpath, frameworkpath symlinkf(target, origin) - # from SLPlugin.app/Contents/Frameworks/LLCefLib + # from SLPlugin.app/Contents/Frameworks/Dullahan # Helper.app/Contents/MacOS/Frameworks/Chromium Embedded # Framework.framework back to # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework -- cgit v1.2.3 From 8f4cb2bc15656e705e0037ea62aec13c923ba78f Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 22 Feb 2017 19:22:15 -0800 Subject: Use new version info from CEF plugin to display in About box --- indra/newview/llappviewer.cpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d7b91ba741..15b8ecfcea 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -126,9 +126,7 @@ #include "llexception.h" #if !LL_LINUX #include "cef/dullahan.h" -#if LL_WINDOWS #include "vlc/libvlc_version.h" -#endif // LL_WINDOWS #endif // LL_LINUX // Third party library includes @@ -3393,22 +3391,28 @@ LLSD LLAppViewer::getViewerInfo() const } #if !LL_LINUX - // TODO this is terrible, but how else to accurately get back entire version from - // both CEF and Dullahan when there is no #define anymore? - info["LIBCEF_VERSION"] = "Calculating..."; + std::ostringstream cef_ver_codec; + cef_ver_codec << "Dullahan: "; + cef_ver_codec << DULLAHAN_VERSION_MAJOR; + cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_MINOR; + cef_ver_codec << "."; + cef_ver_codec << DULLAHAN_VERSION_BUILD; + cef_ver_codec << " - CEF: "; + cef_ver_codec << CEF_VERSION; + info["LIBCEF_VERSION"] = cef_ver_codec.str(); #else info["LIBCEF_VERSION"] = "Undefined"; - #endif #if !LL_LINUX - std::ostringstream ver_codec; - ver_codec << LIBVLC_VERSION_MAJOR; - ver_codec << "."; - ver_codec << LIBVLC_VERSION_MINOR; - ver_codec << "."; - ver_codec << LIBVLC_VERSION_REVISION; - info["LIBVLC_VERSION"] = ver_codec.str(); + std::ostringstream vlc_ver_codec; + vlc_ver_codec << LIBVLC_VERSION_MAJOR; + vlc_ver_codec << "."; + vlc_ver_codec << LIBVLC_VERSION_MINOR; + vlc_ver_codec << "."; + vlc_ver_codec << LIBVLC_VERSION_REVISION; + info["LIBVLC_VERSION"] = vlc_ver_codec.str(); #else info["LIBVLC_VERSION"] = "Undefined"; #endif -- cgit v1.2.3 From ae0b3149badf369eb2b1f10aba830eef8b4af9b4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 23 Feb 2017 16:49:49 -0500 Subject: DRTVWR-418: Fix a round of compile errors surfaced by -std=c++11. These are mostly things that were in fact erroneous, but accepted by older compilers. This changeset has not yet been built with Visual Studio 2013 or Linux gcc, even with -std=c++11. This changeset has not been built *without* -std=c++11. It should be used in conjunction with a corresponding change to LL_BUILD_DARWIN_BASE_SWITCHES in viewer-build-variables/variables. This is a work in progress. We do not assert that this changeset completes the work needed to turn on -std=c++11, even on the Mac. --- indra/newview/llappdelegate-objc.mm | 2 +- indra/newview/llappviewermacosx.cpp | 3 ++- indra/newview/llpanelexperiencelisteditor.cpp | 9 ++++++++- indra/newview/llpresetsmanager.cpp | 3 +-- indra/newview/llviewerstats.cpp | 3 ++- 5 files changed, 14 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 8188c6c3f9..aebae4c434 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -97,7 +97,7 @@ callWindowUnhide(); } -- (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender +- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender { // run one frame to assess state if (!pumpMainLoop()) diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index bb3bcf2886..d472f8926b 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -302,7 +302,8 @@ void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze) std::string appname = gDirUtilp->getExecutableFilename(); std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() }; std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) ); - LL_WARNS() << "about to launch mac-crash-logger" << pid_str << " " << logdir << " " << appname << LL_ENDL; + LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str() + << " " << logdir << " " << appname << LL_ENDL; launchApplication(&command_str, &args); } diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 32ec4930ab..0fdb9a57f3 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -39,6 +39,8 @@ #include "llagent.h" #include "lltextbox.h" #include "lltrans.h" +#include "llsdutil.h" +#include static LLPanelInjector t_panel_experience_list_editor("panel_experience_list_editor"); @@ -94,7 +96,12 @@ void LLPanelExperienceListEditor::addExperienceIds( const uuid_vec_t& experience void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids ) { mExperienceIds.clear(); - mExperienceIds.insert(experience_ids.beginArray(), experience_ids.endArray()); + BOOST_FOREACH(LLSD uuid, llsd::inArray(experience_ids)) + { + // Using insert(range) doesn't work here because the conversion from + // LLSD to LLUUID is ambiguous: have to specify asUUID() for each entry. + mExperienceIds.insert(uuid.asUUID()); + } onItems(); } diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index f40b3e0295..214d221716 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -165,8 +165,7 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n } else if(PRESETS_CAMERA == subdirectory) { - name_list = boost::assign::list_of - ("Placeholder"); + name_list = {"Placeholder"}; } else { diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f52c82dab7..e918c7352c 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -307,7 +307,8 @@ U32Bytes gTotalWorldData, U32 gSimPingCount = 0; U32Bits gObjectData; F32Milliseconds gAvgSimPing(0.f); -U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)}; +// rely on default initialization +U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY]; extern U32 gVisCompared; extern U32 gVisTested; -- cgit v1.2.3 From 08940da90ee944dd838b1db65658c39bb0aa80d4 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Fri, 24 Feb 2017 15:44:36 -0800 Subject: First round of changes to make the macOS 64 build work --- indra/newview/viewer_manifest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c5bd91e396..3b80f519f4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -858,6 +858,13 @@ class DarwinManifest(ViewerManifest): self.end_prefix() + # the helper app needs to have it's @executable_path modified to point to the + # same location we drop the CEF framework shortcut + helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') + self.run_command('install_name_tool -change ' + '"@executable_path/Chromium Embedded Framework" ' + '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) + # SLPlugin plugins if self.prefix(src="", dst="llplugin"): self.path2basename("../media_plugins/cef/" + self.args['configuration'], -- cgit v1.2.3 From e6ed0b0ae7b2eebeb569373ad561b182f5d9d541 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Wed, 8 Mar 2017 14:29:02 -0800 Subject: Second Life SL-643 viewer_manifest.py still tried to copy the CEF file wow_helper.exe but it's no longer present --- indra/newview/viewer_manifest.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3b80f519f4..2d868c407d 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -451,7 +451,6 @@ class WindowsManifest(ViewerManifest): self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") - self.path("wow_helper.exe") self.end_prefix() else: # CEF runtime files - not debug (release, relwithdebinfo etc.) @@ -465,7 +464,6 @@ class WindowsManifest(ViewerManifest): self.path("natives_blob.bin") self.path("snapshot_blob.bin") self.path("widevinecdmadapter.dll") - self.path("wow_helper.exe") self.end_prefix() # MSVC DLLs needed for CEF and have to be in same directory as plugin -- cgit v1.2.3 From 39ebb2d093e0709b9b2bb118f04d5b382076fd98 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 10 Mar 2017 12:20:13 -0800 Subject: Fix for MAINT-7047 No information about 32bit or 64bit version of 'Project Alex Ivy' viewer in non-English locales --- indra/newview/skins/default/xui/de/strings.xml | 2 +- indra/newview/skins/default/xui/es/strings.xml | 2 +- indra/newview/skins/default/xui/fr/strings.xml | 2 +- indra/newview/skins/default/xui/it/strings.xml | 2 +- indra/newview/skins/default/xui/ja/strings.xml | 2 +- indra/newview/skins/default/xui/pt/strings.xml | 2 +- indra/newview/skins/default/xui/ru/strings.xml | 2 +- indra/newview/skins/default/xui/tr/strings.xml | 2 +- indra/newview/skins/default/xui/zh/strings.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index d3d0423d44..de20ed88a3 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -38,7 +38,7 @@ Grafikinitialisierung fehlgeschlagen. Bitte aktualisieren Sie Ihren Grafiktreiber. - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index a56d7d6de7..765226e6bd 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -29,7 +29,7 @@ Error de inicialización de gráficos. Actualiza tu controlador de gráficos. - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 10c9be0795..7c1d05bb83 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -38,7 +38,7 @@ Échec d'initialisation des graphiques. Veuillez mettre votre pilote graphique à jour. - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [Notes de version]] diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index d158cfd311..e6edfb6de4 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -35,7 +35,7 @@ Inizializzazione grafica non riuscita. Aggiorna il driver della scheda grafica! - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index b3c92dbe8d..92b62c9c2f 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -38,7 +38,7 @@ グラフィックを初期化できませんでした。グラフィックドライバを更新してください。 - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 0d7585a424..94b69634d4 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -29,7 +29,7 @@ Falha na inicialização dos gráficos. Atualize seu driver gráfico! - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index 7b1dcae021..7a003b536a 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -38,7 +38,7 @@ Ошибка инициализации графики. Обновите графический драйвер! - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index dda7902e94..53b95d69dd 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -38,7 +38,7 @@ Grafik başlatma başarılamadı. Lütfen grafik sürücünüzü güncelleştirin! - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index 9e88e96284..51a108126b 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -38,7 +38,7 @@ 顯像初始化失敗。 請更新你的顯像卡驅動程式! - [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([CHANNEL]) + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2].[VIEWER_VERSION_3] ([ADDRESS_SIZE]bit) ([CHANNEL]) [[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] -- cgit v1.2.3 From 10bcd510b59fe73bf9e948de3dce9cea6d7d8b93 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 10 Mar 2017 15:11:44 -0800 Subject: MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. --- indra/newview/installers/windows/installer_template.nsi | 2 +- indra/newview/viewer_manifest.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 89317f2793..42f8e0ce1f 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -90,7 +90,7 @@ InstProgressFlags smooth colored # New colored smooth look SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window -InstallDir "$PROGRAMFILES\${INSTNAME}" +InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 2d868c407d..1b2c502729 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -631,6 +631,11 @@ class WindowsManifest(ViewerManifest): Caption "%(caption)s" """ + if(self.args['arch'].lower() == 'x86_64'): + program_files="$PROGRAMFILES64" + else: + program_files="$PROGRAMFILES32" + tempfile = "secondlife_setup_tmp.nsi" # the following replaces strings in the nsi template # it also does python-style % substitution @@ -639,6 +644,7 @@ class WindowsManifest(ViewerManifest): "%%SOURCE%%":self.get_src_prefix(), "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), + "%%$PROGRAMFILES%%":program_files, "%%DELETE_FILES%%":self.nsi_file_commands(False)}) # We use the Unicode version of NSIS, available from -- cgit v1.2.3 From 1053c5ca407917c3bc842cbcb80786d43206c5b3 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Sat, 11 Mar 2017 16:15:37 -0800 Subject: Update: (thanks Drake) MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. Added option to engage 32 or 64 bit registry --- indra/newview/installers/windows/installer_template.nsi | 1 + indra/newview/viewer_manifest.py | 3 +++ 2 files changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 42f8e0ce1f..7a135fa53c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -91,6 +91,7 @@ SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" +%%REGISTRY%% InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1b2c502729..7ea600f24a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -632,8 +632,10 @@ class WindowsManifest(ViewerManifest): """ if(self.args['arch'].lower() == 'x86_64'): + registry="SetRegView 64" program_files="$PROGRAMFILES64" else: + registry="SetRegView 32" program_files="$PROGRAMFILES32" tempfile = "secondlife_setup_tmp.nsi" @@ -645,6 +647,7 @@ class WindowsManifest(ViewerManifest): "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), "%%$PROGRAMFILES%%":program_files, + "%%REGISTRY%%":registry, "%%DELETE_FILES%%":self.nsi_file_commands(False)}) # We use the Unicode version of NSIS, available from -- cgit v1.2.3 From 656457e79b47cf1dd7c34bee1e0ab98ec759f634 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Sat, 11 Mar 2017 18:01:43 -0800 Subject: MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. (Update: call to select registry needs to be inside a function) --- indra/newview/installers/windows/installer_template.nsi | 2 +- indra/newview/viewer_manifest.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7a135fa53c..a266156a47 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -91,7 +91,6 @@ SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" -%%REGISTRY%% InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) @@ -137,6 +136,7 @@ FunctionEnd ;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit +%%ENGAGEREGISTRY%% Call CheckCPUFlags # Make sure we have SSE2 support Call CheckWindowsVersion # Don't install On unsupported systems Push $0 diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7ea600f24a..743df609aa 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -632,10 +632,10 @@ class WindowsManifest(ViewerManifest): """ if(self.args['arch'].lower() == 'x86_64'): - registry="SetRegView 64" + engage_registry="SetRegView 64" program_files="$PROGRAMFILES64" else: - registry="SetRegView 32" + engage_registry="SetRegView 32" program_files="$PROGRAMFILES32" tempfile = "secondlife_setup_tmp.nsi" @@ -647,7 +647,7 @@ class WindowsManifest(ViewerManifest): "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), "%%$PROGRAMFILES%%":program_files, - "%%REGISTRY%%":registry, + "%%ENGAGEREGISTRY%%":engage_registry, "%%DELETE_FILES%%":self.nsi_file_commands(False)}) # We use the Unicode version of NSIS, available from -- cgit v1.2.3 From 17c8eadb3d89bc78019f0b50eb8b109f25616781 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Sun, 12 Mar 2017 10:09:34 -0700 Subject: MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. (Update2: evidently the registry set call is needed on un.init() too --- indra/newview/installers/windows/installer_template.nsi | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index a266156a47..eb07b54d8d 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -195,6 +195,7 @@ FunctionEnd ;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit +%%ENGAGEREGISTRY%% # Read language from registry and set for uninstaller. Key will be removed on successful uninstall ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" IfErrors lbl_end -- cgit v1.2.3 From 04c3f2b0f0e6cc2a2a64007ae179072ed45102b5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 13 Mar 2017 13:58:59 -0400 Subject: DRTVWR-418: Tweak shutdown sequence to avoid resurrecting singletons. The LLSingletonBase::deleteAll() call late in LLAppViewer::cleanup() deletes the LLSingleton(s) used by the logging machinery, among other things. Attempting further logging after that call (such as our cheery "Goodbye!") has the unfortunate effect of attempting to resurrect the deleted LLSingleton(s). Move "Goodbye!" to just *before* the call. Also, given that call, the manual references to a couple specific LLSingletons in ~LLAppViewer() are (a) unnecessary and (b) cause attempted resurrection. Eliminate both. --- indra/newview/llappviewer.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b58af54985..616e084119 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -738,10 +738,7 @@ LLAppViewer::LLAppViewer() LLAppViewer::~LLAppViewer() { delete mSettingsLocationList; - LLViewerEventRecorder::deleteSingleton(); - LLLoginInstance::instance().setUpdaterService(0); - destroyMainloopTimeout(); // If we got to this destructor somehow, the app didn't hang. @@ -2110,6 +2107,10 @@ bool LLAppViewer::cleanup() // realtime, or might throw an exception. LLSingletonBase::cleanupAll(); + // The logging subsystem depends on an LLSingleton. Any logging after + // LLSingletonBase::deleteAll() won't be recorded. + LL_INFOS() << "Goodbye!" << LL_ENDL; + // This calls every remaining LLSingleton's deleteSingleton() method. // No class destructor should perform any cleanup that might take // significant realtime, or throw an exception. @@ -2122,8 +2123,6 @@ bool LLAppViewer::cleanup() // probably useful to be able to log that order. LLSingletonBase::deleteAll(); - LL_INFOS() << "Goodbye!" << LL_ENDL; - removeDumpDir(); // return 0; -- cgit v1.2.3 From 062c345556ef74d33f6cdcaaae513211ced7c410 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 14 Mar 2017 12:37:52 -0700 Subject: Tweak CEF plugin version to include Chrome equivalent --- indra/newview/llappviewer.cpp | 7 ++++++- indra/newview/skins/default/xui/en/strings.xml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b58af54985..ff54977634 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3393,8 +3393,13 @@ LLSD LLAppViewer::getViewerInfo() const cef_ver_codec << DULLAHAN_VERSION_MINOR; cef_ver_codec << "."; cef_ver_codec << DULLAHAN_VERSION_BUILD; - cef_ver_codec << " - CEF: "; + + cef_ver_codec << " / CEF: "; cef_ver_codec << CEF_VERSION; + + cef_ver_codec << " / Chrome: "; + cef_ver_codec << CHROME_VERSION_MAJOR; + info["LIBCEF_VERSION"] = cef_ver_codec.str(); #else info["LIBCEF_VERSION"] = "Undefined"; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 2ae78901f6..9533407c51 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -61,7 +61,7 @@ VFS (cache) creation time: [VFS_TIME] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] -CEF Version: [LIBCEF_VERSION] +[LIBCEF_VERSION] LibVLC Version: [LIBVLC_VERSION] Voice Server Version: [VOICE_VERSION] -- cgit v1.2.3 From c1f7c00869653e50a6599cc80ab755a773fadbff Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 14 Mar 2017 12:40:25 -0700 Subject: SL-641 - Update CEF -> cef-bin -> Dullahan -> p64_3p-Dullahan -> media_plugin_cef.cpp to latest versionPull in p64_3p-dullahan that has the cef 2897/chrome 57 --- indra/newview/viewer_manifest.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 743df609aa..3dd44fb19e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -442,6 +442,7 @@ class WindowsManifest(ViewerManifest): # CEF runtime files - debug if self.args['configuration'].lower() == 'debug': if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): + self.path("chrome_elf.dll") self.path("d3dcompiler_43.dll") self.path("d3dcompiler_47.dll") self.path("libcef.dll") @@ -455,6 +456,7 @@ class WindowsManifest(ViewerManifest): else: # CEF runtime files - not debug (release, relwithdebinfo etc.) if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'release'), dst="llplugin"): + self.path("chrome_elf.dll") self.path("d3dcompiler_43.dll") self.path("d3dcompiler_47.dll") self.path("libcef.dll") -- cgit v1.2.3 From bdecc9cce982ab35ce1d74444515f536e66d4356 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Wed, 15 Mar 2017 16:33:51 -0700 Subject: Next part of the 'SL-641 Update CEF -> cef-bin -> Dullahan -> p64_3p-Dullahan -> media_plugin_cef.cpp to current latest version' puzzle - fix @rpath/@executable paths for macOS --- indra/newview/viewer_manifest.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3dd44fb19e..3a8cd0c626 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -867,11 +867,9 @@ class DarwinManifest(ViewerManifest): self.end_prefix() - # the helper app needs to have it's @executable_path modified to point to the - # same location we drop the CEF framework shortcut helperexecutablepath = self.dst_path_of('SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper') self.run_command('install_name_tool -change ' - '"@executable_path/Chromium Embedded Framework" ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' '"@executable_path/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % helperexecutablepath) # SLPlugin plugins @@ -896,6 +894,12 @@ class DarwinManifest(ViewerManifest): self.end_prefix("llplugin") + # do this install_name_tool *after* media plugin is copied over + dylibexecutablepath = self.dst_path_of('llplugin/media_plugin_cef.dylib') + self.run_command('install_name_tool -change ' + '"@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" ' + '"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" "%s"' % dylibexecutablepath) + self.end_prefix("Resources") # CEF framework goes inside Second Life.app/Contents/Frameworks -- cgit v1.2.3 From e9fe0714ad422c2b9250c8ce13d3b2837dff5430 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 30 Mar 2017 15:39:47 -0400 Subject: DRTVWR-418: Xcode 8.3 complains about LLSafeHandle implementation. The previous LLSafeHandle implementation declares a static data member of the template class but provides no (generic) definition, relying on particular specializations to provide the definition. The data member is a function pointer, which is called in one of the methods to produce a pointer to a "null" T instance: that is, a dummy instance to be dereferenced in case the wrapped T* is null. Xcode 8.3's version of clang is bothered by the call, in a generic method, through this (usually) uninitialized pointer. It happens that the only specializations of LLSafeHandle do both provide definitions. I don't know whether that's formally valid C++03 or not; but I agree with the compiler: I don't like it. Instead of declaring a public static function pointer which each specialization is required to define, add a protected static method to the template class. This protected static method simply returns a pointer to a function-static T instance. This is functionally similar to a static LLPointer set on demand (as in the two specializations), including lazy instantiation. Unlike the previous implementation, this approach prohibits a given specialization from customizing the "null" instance function. Although there exist reasonable ways to support that (e.g. a related traits template), I decided not to complicate the LLSafeHandle implementation to make it more generally useful. I don't really approve of LLSafeHandle, and don't want to see it proliferate. It's not clear that unconditionally dereferencing LLSafeHandle is in any way better than conditionally dereferencing LLPointer. It doesn't even skip the runtime conditional test; it simply obscures it. (There exist hints in the code that at one time it might have immediately replaced any wrapped null pointer value with the pointer to the "null" instance, obviating the test at dereference time, but this is not the current functionality. Perhaps it was only ever wishful thinking.) Remove the corresponding functions and static LLPointers from the two classes that use LLSafeHandle. --- indra/newview/llparcelselection.cpp | 18 ------------------ indra/newview/llparcelselection.h | 5 +---- indra/newview/llselectmgr.cpp | 17 ----------------- indra/newview/llselectmgr.h | 1 + 4 files changed, 2 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llparcelselection.cpp b/indra/newview/llparcelselection.cpp index 4d1901adc9..5c62159b93 100644 --- a/indra/newview/llparcelselection.cpp +++ b/indra/newview/llparcelselection.cpp @@ -31,13 +31,6 @@ #include "llparcel.h" -// static -LLPointer LLParcelSelection::sNullSelection; - -template<> - const LLSafeHandle::NullFunc - LLSafeHandle::sNullFunc = LLParcelSelection::getNullParcelSelection; - // // LLParcelSelection // @@ -87,14 +80,3 @@ bool LLParcelSelection::hasOthersSelected() const { return mSelectedOtherCount != 0; } - -// static -LLParcelSelection* LLParcelSelection::getNullParcelSelection() -{ - if (sNullSelection.isNull()) - { - sNullSelection = new LLParcelSelection; - } - - return sNullSelection; -} diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h index 1cbdfc6f74..06d9141efb 100644 --- a/indra/newview/llparcelselection.h +++ b/indra/newview/llparcelselection.h @@ -35,6 +35,7 @@ class LLParcel; class LLParcelSelection : public LLRefCount { friend class LLViewerParcelMgr; + friend class LLSafeHandle; protected: ~LLParcelSelection(); @@ -61,8 +62,6 @@ public: // Is the entire parcel selected, or just a part? BOOL getWholeParcelSelected() const; - static LLParcelSelection* getNullParcelSelection(); - private: void setParcel(LLParcel* parcel) { mParcel = parcel; } @@ -73,8 +72,6 @@ private: S32 mSelectedSelfCount; S32 mSelectedOtherCount; S32 mSelectedPublicCount; - - static LLPointer sNullSelection; }; typedef LLSafeHandle LLParcelSelectionHandle; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ee7c22800a..cbcd905ab6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -132,11 +132,6 @@ LLColor4 LLSelectMgr::sHighlightParentColor; LLColor4 LLSelectMgr::sHighlightChildColor; LLColor4 LLSelectMgr::sContextSilhouetteColor; -static LLObjectSelection *get_null_object_selection(); -template<> - const LLSafeHandle::NullFunc - LLSafeHandle::sNullFunc = get_null_object_selection; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // struct LLDeRezInfo // @@ -156,27 +151,15 @@ struct LLDeRezInfo // -static LLPointer sNullSelection; - // // Functions // void LLSelectMgr::cleanupGlobals() { - sNullSelection = NULL; LLSelectMgr::getInstance()->clearSelections(); } -LLObjectSelection *get_null_object_selection() -{ - if (sNullSelection.isNull()) - { - sNullSelection = new LLObjectSelection; - } - return sNullSelection; -} - // Build time optimization, generate this function once here template class LLSelectMgr* LLSingleton::getInstance(); //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 2a893af266..fbf889b2f1 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -233,6 +233,7 @@ protected: class LLObjectSelection : public LLRefCount { friend class LLSelectMgr; + friend class LLSafeHandle; protected: ~LLObjectSelection(); -- cgit v1.2.3 From e2b56c9bbafdf9908361f43d68b4ce0c56e90d85 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 30 Mar 2017 16:13:26 -0400 Subject: DRTVWR-418: Eliminate reference to LLParcelSelection::sNullSelection. --- indra/newview/llviewerparcelmgr.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2a126c9f01..325d523992 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -2456,7 +2456,6 @@ void sanitize_corners(const LLVector3d &corner1, void LLViewerParcelMgr::cleanupGlobals() { - LLParcelSelection::sNullSelection = NULL; } LLViewerTexture* LLViewerParcelMgr::getBlockedImage() const -- cgit v1.2.3 From 510e101627970c62a479ec01d26a26124c9c7991 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 30 Mar 2017 17:36:33 -0700 Subject: fix for MAINT-6998 64bit viewer installs to Program Files (x86) by default. - this change also fixes MAINT-5365 Windows viewer uninstall icon is system default not SL logo --- .../installers/windows/installer_template.nsi | 31 +++++++++++++++++++--- indra/newview/viewer_manifest.py | 2 +- 2 files changed, 29 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index eb07b54d8d..71a33a0dc0 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -90,8 +90,11 @@ InstProgressFlags smooth colored # New colored smooth look SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window -InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" -InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" +# initial location of install (default when not already installed) +# note: Now we defer looking for existing install until onInit when we +# are able to engage the 32/64 registry function +InstallDir "%%PROGRAMFILES%%\${INSTNAME}" + UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) Page directory dirPre @@ -118,6 +121,8 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !insertmacro GetParameters !insertmacro GetOptions !include WinVer.nsh # For OS and SP detection +!include 'LogicLib.nsh' # for value comparison +!include "x64.nsh" # for 64bit detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Pre-directory page callback @@ -136,7 +141,21 @@ FunctionEnd ;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit + %%ENGAGEREGISTRY%% + +# read the current location of the install for this version +# if $0 is empty, this is the first time for this viewer name +ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\\Linden Research, Inc.\\${INSTNAME}" "" + +# viewer with this name not installed before +${If} $0 == "" + # nothing to do here +${Else} + # use the value we got from registry as install location + StrCpy $INSTDIR $0 +${EndIf} + Call CheckCPUFlags # Make sure we have SSE2 support Call CheckWindowsVersion # Don't install On unsupported systems Push $0 @@ -195,7 +214,9 @@ FunctionEnd ;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit + %%ENGAGEREGISTRY%% + # Read language from registry and set for uninstaller. Key will be removed on successful uninstall ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" IfErrors lbl_end @@ -320,6 +341,10 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB + +# from FS:Ansariel +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayIcon" '"$INSTDIR\$INSTEXE"' + # BUG-2707 Disable SEHOP for installed viewer. WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 @@ -561,7 +586,7 @@ FunctionEnd Function RemoveProgFilesOnInst # Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 -Delete "$INSTDIR\SecondLife.exe" +Delete "$INSTDIR\$INSTEXE" # Remove old shader files first so fallbacks will work. See DEV-5663 RMDir /r "$INSTDIR\app_settings\shaders" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3a8cd0c626..bce94263c4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -648,7 +648,7 @@ class WindowsManifest(ViewerManifest): "%%SOURCE%%":self.get_src_prefix(), "%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INSTALL_FILES%%":self.nsi_file_commands(True), - "%%$PROGRAMFILES%%":program_files, + "%%PROGRAMFILES%%":program_files, "%%ENGAGEREGISTRY%%":engage_registry, "%%DELETE_FILES%%":self.nsi_file_commands(False)}) -- cgit v1.2.3 From 45f67f4ed7922e87ae5dd471bd82506f1e2300da Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 19 Apr 2017 13:22:32 -0700 Subject: Hopeful fix for MAINT-7220 Windows Error Message 'SLPlugin.exe has stopped working ' appears. --- indra/newview/llviewermedia.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9f05ee61bd..900075488f 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -604,7 +604,9 @@ void LLViewerMedia::updateMedia(void *dummy_arg) LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); // HACK: we always try to keep a spare running webkit plugin around to improve launch times. - createSpareBrowserMediaSource(); + // 2017-04-19 Removed CP - this doesn't appear to buy us much and consumes a lot of resources so + // removing it for now. + //createSpareBrowserMediaSource(); sAnyMediaShowing = false; sAnyMediaPlaying = false; -- cgit v1.2.3 From c49eeb9a6202c5c38338ef229851bd84901ee24c Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Wed, 19 Apr 2017 15:59:29 -0700 Subject: Add back the missing pieces and updated code for the example plugin. It was useful during testing SLPlugin changes. Not shipped with release versions of viewer --- indra/newview/CMakeLists.txt | 1 + indra/newview/skins/default/xui/en/mime_types.xml | 35 +++++++++++++++-------- indra/newview/viewer_manifest.py | 6 ++++ 3 files changed, 30 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c4ded8c5ae..35d2df3744 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1745,6 +1745,7 @@ if (WINDOWS) SLPlugin media_plugin_cef media_plugin_libvlc + media_plugin_example winmm_shim windows-crash-logger ) diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 8d8d546b24..8a810f32a6 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -133,18 +133,29 @@ media_plugin_libvlc - - - - movie - - - media_plugin_libvlc - - - + + + + movie + + + media_plugin_example + + + + + + movie + + + media_plugin_libvlc + + + diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index bce94263c4..fba8a8b159 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -439,6 +439,12 @@ class WindowsManifest(ViewerManifest): self.path("media_plugin_libvlc.dll") self.end_prefix() + # Media plugins - Example (useful for debugging - not shipped with release viewer) + if self.channel_type() != 'release': + if self.prefix(src='../media_plugins/example/%s' % self.args['configuration'], dst="llplugin"): + self.path("media_plugin_example.dll") + self.end_prefix() + # CEF runtime files - debug if self.args['configuration'].lower() == 'debug': if self.prefix(src=os.path.join(os.pardir, 'packages', 'bin', 'debug'), dst="llplugin"): -- cgit v1.2.3 From e625a65a5be42d517016714d297fb3e5df60d8fc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 20 Apr 2017 19:45:17 -0400 Subject: DRTVWR-418: Boost fixed max size of temporary Mac volume used during construction of the eventual installation .dmg. With newer 64-bit Havok packages, we need more elbow room on the temporary volume. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3a8cd0c626..3792adc06c 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -980,7 +980,7 @@ class DarwinManifest(ViewerManifest): # make sure we don't have stale files laying about self.remove(sparsename, finalname) - self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1000 -layout SPUD' % { + self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1100 -layout SPUD' % { 'sparse':sparsename, 'vol':volname}) -- cgit v1.2.3 From 7a6a2db289581e43c509ca7dfff7d9b72897a10e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Apr 2017 15:27:10 -0400 Subject: DRTVWR-418: Send address_size with login and viewer stats. --- indra/newview/lllogininstance.cpp | 1 + indra/newview/llviewerstats.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index b4d0bb6823..a49a9ca840 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -606,6 +606,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["channel"] = LLVersionInfo::getChannel(); request_params["platform"] = mPlatform; request_params["platform_version"] = mPlatformVersion; + request_params["address_size"] = ADDRESS_SIZE; request_params["id0"] = mSerialNumber; request_params["host_id"] = gSavedSettings.getString("HostID"); request_params["extended_errors"] = true; // request message_id and message_args diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index f52c82dab7..b907783b1f 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -491,6 +491,7 @@ void send_stats() system["ram"] = (S32) gSysMemory.getPhysicalMemoryKB().value(); system["os"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple(); system["cpu"] = gSysCPU.getCPUString(); + system["address_size"] = ADDRESS_SIZE; unsigned char MACAddress[MAC_ADDRESS_BYTES]; LLUUID::getNodeID(MACAddress); std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", -- cgit v1.2.3 From 62ecf7091821c37e89d79e94880fcf585f27ba5c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 22 Apr 2017 17:37:03 -0400 Subject: DRTVWR-418: Make temporary .sparseimage drive bigger for signing. --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3792adc06c..0d03965858 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -980,7 +980,7 @@ class DarwinManifest(ViewerManifest): # make sure we don't have stale files laying about self.remove(sparsename, finalname) - self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1100 -layout SPUD' % { + self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 2000 -layout SPUD' % { 'sparse':sparsename, 'vol':volname}) -- cgit v1.2.3 From e4cd2028ea01f31a20296d407512159dc942f977 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 22 Apr 2017 18:45:18 -0400 Subject: DRTVWR-418: Binary search for a good size for temp Mac disk image --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0d03965858..4e516db121 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -980,7 +980,7 @@ class DarwinManifest(ViewerManifest): # make sure we don't have stale files laying about self.remove(sparsename, finalname) - self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 2000 -layout SPUD' % { + self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1500 -layout SPUD' % { 'sparse':sparsename, 'vol':volname}) -- cgit v1.2.3 From fad8c7edd7da7e43b0129282c790daa8b4c04ffb Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 22 Apr 2017 19:51:40 -0400 Subject: DRTVWR-418: Binary search for a good size for temp Mac disk image --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 4e516db121..2aaa041eda 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -980,7 +980,7 @@ class DarwinManifest(ViewerManifest): # make sure we don't have stale files laying about self.remove(sparsename, finalname) - self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1500 -layout SPUD' % { + self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 1300 -layout SPUD' % { 'sparse':sparsename, 'vol':volname}) -- cgit v1.2.3 From 0d0f2a8aebd8b992764c227daac75c6964052645 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Apr 2017 08:32:19 -0400 Subject: DRTVWR-418: Remove misleading comment -- no more implicit deleteAll(). The comment indicates that calling LLSingletonBase::deleteAll() is optional because the LLSingleton machinery implicitly calls that during final static-object cleanup. That is no longer true. --- indra/newview/llappviewer.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ae4e3df70f..27edb29681 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2114,13 +2114,6 @@ bool LLAppViewer::cleanup() // This calls every remaining LLSingleton's deleteSingleton() method. // No class destructor should perform any cleanup that might take // significant realtime, or throw an exception. - // LLSingleton machinery includes a last-gasp implicit deleteAll() call, - // so this explicit call shouldn't strictly be necessary. However, by the - // time the runtime engages that implicit call, it may already have - // destroyed things like std::cerr -- so the implicit deleteAll() refrains - // from logging anything. Since both cleanupAll() and deleteAll() call - // their respective cleanup methods in computed dependency order, it's - // probably useful to be able to log that order. LLSingletonBase::deleteAll(); removeDumpDir(); -- cgit v1.2.3 From c04073da377a222d2d244c94683816c412dfad36 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Apr 2017 08:40:01 -0400 Subject: DRTVWR-418: Use conventional LLSingleton init/cleanup for LLWinDebug. LLWinDebug, though an LLSingleton, had (and required explicit calls to) special init() and cleanup() methods. Kitty Barnett points out that the cleanup() method was actually being called after LLSingletonBase::deleteAll(), requiring resurrection of the deleted LLWinDebug, which sometimes led to crashes. (Resurrecting deleted LLSingletons is always suspect.) Change LLWinDebug::init() and cleanup() to the conventional initSingleton() and cleanupSingleton() methods. This eliminates the need to make special method calls at all. In particular, cleanupSingleton() will be called by the existing LLSingletonBase::cleanupAll() call near viewer shutdown. We retain the early LLWinDebug::instance() call, which implicitly initializes the LLWinDebug instance, because evidently we want that initialized early. But we no longer require a separate init() call. --- indra/newview/llappviewerwin32.cpp | 7 ++----- indra/newview/llwindebug.cpp | 4 ++-- indra/newview/llwindebug.h | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 5107030476..d6039f6d7f 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -502,7 +502,8 @@ bool LLAppViewerWin32::init() disableWinErrorReporting(); #ifndef LL_RELEASE_FOR_DOWNLOAD - LLWinDebug::instance().init(); + // Merely requesting the LLSingleton instance initializes it. + LLWinDebug::instance(); #endif #if LL_WINDOWS @@ -526,10 +527,6 @@ bool LLAppViewerWin32::cleanup() gDXHardware.cleanup(); -#ifndef LL_RELEASE_FOR_DOWNLOAD - LLWinDebug::instance().cleanup(); -#endif - if (mIsConsoleAllocated) { FreeConsole(); diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index eff70ca0b2..92c80ce534 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -90,7 +90,7 @@ LONG NTAPI vectoredHandler(PEXCEPTION_POINTERS exception_infop) } // static -void LLWinDebug::init() +void LLWinDebug::initSingleton() { static bool s_first_run = true; // Load the dbghelp dll now, instead of waiting for the crash. @@ -135,7 +135,7 @@ void LLWinDebug::init() } } -void LLWinDebug::cleanup () +void LLWinDebug::cleanupSingleton() { gEmergencyMemoryReserve.release(); } diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h index 90882cf04a..5a0d63f027 100644 --- a/indra/newview/llwindebug.h +++ b/indra/newview/llwindebug.h @@ -36,9 +36,9 @@ class LLWinDebug: { LLSINGLETON_EMPTY_CTOR(LLWinDebug); public: - static void init(); + static void initSingleton(); static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void cleanup(); + static void cleanupSingleton(); private: static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); }; -- cgit v1.2.3 From b94e2d0103168f143ee7579f01f0d45fc63a4e84 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Apr 2017 09:02:37 -0400 Subject: DRTVWR-418: initSingleton(), cleanupSingleton() must be non-static. --- indra/newview/llwindebug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h index 5a0d63f027..7e5818ba1c 100644 --- a/indra/newview/llwindebug.h +++ b/indra/newview/llwindebug.h @@ -36,9 +36,9 @@ class LLWinDebug: { LLSINGLETON_EMPTY_CTOR(LLWinDebug); public: - static void initSingleton(); + void initSingleton(); static void generateMinidump(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL); - static void cleanupSingleton(); + void cleanupSingleton(); private: static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename); }; -- cgit v1.2.3 From 7005310541b9b9b002b2bd52cb1f28c0d25a8281 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 1 May 2017 12:42:12 -0700 Subject: Fix MAINT-7360 Investigate removal of MSVCR100.DLL and MSVCP100.DLL --- indra/newview/viewer_manifest.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index fba8a8b159..7ea59ad5ea 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -391,13 +391,9 @@ class WindowsManifest(ViewerManifest): if self.args['configuration'].lower() == 'debug': self.path("msvcr120d.dll") self.path("msvcp120d.dll") - self.path("msvcr100d.dll") - self.path("msvcp100d.dll") else: self.path("msvcr120.dll") self.path("msvcp120.dll") - self.path("msvcr100.dll") - self.path("msvcp100.dll") # Vivox runtimes self.path("SLVoice.exe") -- cgit v1.2.3 From 52899ed62a241d7875277b0f3412e2be78f7b3af Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 May 2017 10:51:18 -0400 Subject: DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support. There were two distinct LLMemory methods getCurrentRSS() and getWorkingSetSize(). It was pointless to have both: on Windows they were completely redundant; on other platforms getWorkingSetSize() always returned 0. (Amusingly, though the Windows implementations both made exactly the same GetProcessMemoryInfo() call and used exactly the same logic, the code was different in the two -- as though the second was implemented without awareness of the first, even though they were adjacent in the source file.) One of the actual MAINT-6996 problems was due to the fact that getWorkingSetSize() returned U32, where getCurrentRSS() returns U64. In other words, getWorkingSetSize() was both useless *and* wrong. Remove it, and change its one call to getCurrentRSS() instead. The other culprit was that in several places, the 64-bit WorkingSetSize returned by the Windows GetProcessMemoryInfo() call (and by getCurrentRSS()) was explicitly cast to a 32-bit data type. That works only when explicitly or implicitly (using LLUnits type conversion) scaling the value to kilobytes or megabytes. When the size in bytes is desired, use 64-bit types instead. In addition to the symptoms, LLMemory was overdue for a bit of cleanup. There was a 16K block of memory called reserveMem, the comment on which read: "reserve 16K for out of memory error handling." Yet *nothing* was ever done with that block! If it were going to be useful, one would think someone would at some point explicitly free the block. In fact there was a method freeReserve(), apparently for just that purpose -- which was never called. As things stood, reserveMem served only to *prevent* the viewer from ever using that chunk of memory. Remove reserveMem and the unused freeReserve(). The only function of initClass() and cleanupClass() was to allocate and free reserveMem. Remove initClass(), cleanupClass() and the LLCommon calls to them. In a similar vein, there was an LLMemoryInfo::getPhysicalMemoryClamped() method that returned U32Bytes. Its job was simply to return a size in bytes that could fit into a U32 data type, returning U32_MAX if the 64-bit value exceeded 4GB. Eliminate that; change all its calls to getPhysicalMemoryKB() (which getPhysicalMemoryClamped() used internally anyway). We no longer care about any platform that cannot handle 64-bit data types. --- indra/newview/llappviewer.cpp | 9 ++++----- indra/newview/llfeaturemanager.cpp | 2 +- indra/newview/llviewerdisplay.cpp | 4 ++-- indra/newview/llviewertexturelist.cpp | 8 ++++---- indra/newview/llviewerwindow.cpp | 4 +++- 5 files changed, 14 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ae4e3df70f..e4b2c7ad77 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1099,7 +1099,7 @@ bool LLAppViewer::init() minSpecs += "\n"; unsupported = true; } - if(gSysMemory.getPhysicalMemoryClamped() < minRAM) + if(gSysMemory.getPhysicalMemoryKB() < minRAM) { minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM"); minSpecs += "\n"; @@ -3743,11 +3743,10 @@ void LLAppViewer::handleViewerCrash() { gDebugInfo["Dynamic"]["ParcelMediaURL"] = parcel->getMediaURL(); } - - + gDebugInfo["Dynamic"]["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds()); - gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = (LLSD::Integer) LLMemory::getCurrentRSS() >> 10; - + gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = LLSD::Integer(LLMemory::getCurrentRSS() >> 10); + if(gLogoutInProgress) { gDebugInfo["Dynamic"]["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index d4ba230feb..ad048f6668 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -789,7 +789,7 @@ void LLFeatureManager::applyBaseMasks() maskFeatures(gpustr); // now mask cpu type ones - if (gSysMemory.getPhysicalMemoryClamped() <= U32Megabytes(256)) + if (gSysMemory.getPhysicalMemoryKB() <= U32Megabytes(256)) { maskFeatures("RAM256MB"); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 13eccaefc1..960a36a251 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -220,9 +220,9 @@ void display_stats() F32 mem_log_freq = gSavedSettings.getF32("MemoryLogFrequency"); if (mem_log_freq > 0.f && gRecentMemoryTime.getElapsedTimeF32() >= mem_log_freq) { - gMemoryAllocated = (U64Bytes)LLMemory::getCurrentRSS(); + gMemoryAllocated = U64Bytes(LLMemory::getCurrentRSS()); U32Megabytes memory = gMemoryAllocated; - LL_INFOS() << llformat("MEMORY: %d MB", memory.value()) << LL_ENDL; + LL_INFOS() << "MEMORY: " << memory << LL_ENDL; LLMemory::logMemoryInfo(TRUE) ; gRecentMemoryTime.reset(); } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index d7080051da..0a3012ffef 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1341,9 +1341,9 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointer S32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; + return (system_ram > U32Megabytes(1500)) ? S32Megabytes(64) : gMinVideoRam ; } //static @@ -1386,7 +1386,7 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); // In MB //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL; if (get_recommended) max_texmem = llmin(max_texmem, system_ram/2); @@ -1439,7 +1439,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem) } //system mem - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryKB(); //minimum memory reserved for non-texture use. //if system_raw >= 1GB, reserve at least 512MB for non-texture use; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index efad739bd3..feed5ba43d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -53,6 +53,7 @@ #include "llrender.h" #include "llvoiceclient.h" // for push-to-talk button handling +#include "stringize.h" // // TODO: Many of these includes are unnecessary. Remove them. @@ -394,7 +395,8 @@ public: #if LL_WINDOWS if (gSavedSettings.getBOOL("DebugShowMemory")) { - addText(xpos, ypos, llformat("Memory: %d (KB)", LLMemory::getWorkingSetSize() / 1024)); + addText(xpos, ypos, + STRINGIZE("Memory: " << (LLMemory::getCurrentRSS() / 1024) << " (KB)")); ypos += y_inc; } #endif -- cgit v1.2.3 From e4996c5d8182a0ef24f0eb445db82121fe5733d7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 May 2017 14:39:59 -0400 Subject: DRTVWR-418, MAINT-6996: clarify divide-by-1024 (not shift-right 10) --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e4b2c7ad77..d41f33700f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3745,7 +3745,7 @@ void LLAppViewer::handleViewerCrash() } gDebugInfo["Dynamic"]["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds()); - gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = LLSD::Integer(LLMemory::getCurrentRSS() >> 10); + gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = LLSD::Integer(LLMemory::getCurrentRSS() / 1024); if(gLogoutInProgress) { -- cgit v1.2.3 From b78065ec5519b2eced35061e3e0e83e3100ea054 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 May 2017 22:55:18 -0400 Subject: DRTVWR-418: 64-bit Windows viewer requests "win64" updates from VVM. This is only transitional, until we integrate the Viewer Management Process (soon now). --- indra/newview/llappviewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ae4e3df70f..6ce5f6943e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3111,7 +3111,12 @@ void LLAppViewer::initUpdater() mUpdater->setAppExitCallback(boost::bind(&LLAppViewer::forceQuit, this)); mUpdater->initialize(channel, version, +// DRTVWR-418 transitional: query using "win64" until VMP is in place +#if LL_WINDOWS && (ADDRESS_SIZE == 64) + "win64", +#else gPlatform, +#endif getOSInfo().getOSVersionString(), unique_id, willing_to_test -- cgit v1.2.3 From ccc42830ee51e4721e6fb9f09ca6953672de7f53 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 8 May 2017 10:05:15 -0400 Subject: DRTVWR-418: Fix vector assignment for C++03. For the time being we're still compiling for production with C++03. Although assigning an initializer list to a vector is valid C++11, in C++03 mode clang rejects it. --- indra/newview/llpresetsmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 214d221716..76d721ecdc 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -165,7 +165,8 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n } else if(PRESETS_CAMERA == subdirectory) { - name_list = {"Placeholder"}; + name_list.clear(); + name_list.push_back("Placeholder"); } else { -- cgit v1.2.3