diff options
Diffstat (limited to 'indra/newview')
57 files changed, 1027 insertions, 1584 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index dabad38f99..a52107ffa5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1493,7 +1493,7 @@ if (DARWIN) set(viewer_RESOURCE_FILES secondlife.icns Info-SecondLife.plist - SecondLife.xib/ + SecondLife.xib # CMake doesn't seem to support Xcode language variants well just yet English.lproj/InfoPlist.strings English.lproj/language.txt @@ -1886,7 +1886,7 @@ if (WINDOWS) # And of course it's straightforward to read a text file in Python. set(COPY_INPUT_DEPENDENCIES - # The following commented dependencies are determined at variably at build time. Can't do this here. + # The following commented dependencies are determined variably at build time. Can't do this here. app_settings/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg ${SHARED_LIB_STAGING_DIR}/openjp2.dll @@ -2086,7 +2086,9 @@ if (WINDOWS) elseif (DARWIN) set_target_properties(${VIEWER_BINARY_NAME} PROPERTIES - LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" + RESOURCE SecondLife.xib + #LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP" + LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip" ) else (WINDOWS) # Linux @@ -2147,6 +2149,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} llappearance ${LLPHYSICSEXTENSIONS_LIBRARIES} ll::bugsplat + ll::ndof ll::tracy ll::openxr ) @@ -2435,10 +2438,6 @@ if (DARWIN) PROPERTIES OUTPUT_NAME "${product}" # From Contents/MacOS/SecondLife, look in Contents/Frameworks - INSTALL_RPATH "@loader_path/../Frameworks" - # SIGH, as of 2018-05-24 (cmake 3.11.1) the INSTALL_RPATH property simply - # does not work. Try this: - LINK_FLAGS "-rpath @loader_path/../Frameworks" MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist" XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}" MACOSX_BUNDLE TRUE diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index 7a2d9d2510..e47c70aee6 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -139,6 +139,7 @@ fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/MacOS/${VIEWER_ file(CHMOD "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper" + "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Alerts).app/Contents/MacOS/DullahanHelper (Alerts)" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)" @@ -276,6 +277,7 @@ execute_process( COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libEGL.dylib Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libGLESv2.dylib + Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libcef_sandbox.dylib Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libvk_swiftshader.dylib Frameworks/Chromium\ Embedded\ Framework.framework Frameworks/libalut.0.dylib @@ -671,6 +673,7 @@ execute_process( Resources/llplugin/plugins/libyuy2_i420_plugin.dylib Resources/llplugin/plugins/libyuy2_i422_plugin.dylib Resources/llplugin/plugins/libzvbi_plugin.dylib + Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(GPU\).app/Contents/MacOS/DullahanHelper\ \(Alerts\) Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(GPU\).app/Contents/MacOS/DullahanHelper\ \(GPU\) Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(Plugin\).app/Contents/MacOS/DullahanHelper\ \(Plugin\) WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents @@ -683,6 +686,7 @@ execute_process( DullahanHelper\ \(Renderer\).app/Contents/MacOS/DullahanHelper\ \(Renderer\) COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} --deep + DullahanHelper\ \(Alerts\).app DullahanHelper\ \(GPU\).app DullahanHelper\ \(Plugin\).app WORKING_DIRECTORY ${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in index 01ec38de57..5b0e38c9cd 100644 --- a/indra/newview/FixPackage.cmake.in +++ b/indra/newview/FixPackage.cmake.in @@ -139,6 +139,7 @@ fixup_bundle(${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/ file(CHMOD "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper" + "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Alerts).app/Contents/MacOS/DullahanHelper (Alerts)" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)" @@ -276,6 +277,7 @@ execute_process( COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libEGL.dylib Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libGLESv2.dylib + Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libcef_sandbox.dylib Frameworks/Chromium\ Embedded\ Framework.framework/Libraries/libvk_swiftshader.dylib Frameworks/Chromium\ Embedded\ Framework.framework Frameworks/libalut.0.dylib @@ -672,6 +674,7 @@ execute_process( Resources/llplugin/plugins/libyuy2_i422_plugin.dylib Resources/llplugin/plugins/libzvbi_plugin.dylib Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app + Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(Alerts\).app/Contents/MacOS/DullahanHelper\ \(Alerts\) Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(GPU\).app/Contents/MacOS/DullahanHelper\ \(GPU\) Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper\ \(Plugin\).app/Contents/MacOS/DullahanHelper\ \(Plugin\) WORKING_DIRECTORY ${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents @@ -682,6 +685,7 @@ execute_process( DullahanHelper\ \(Renderer\).app/Contents/MacOS/DullahanHelper\ \(Renderer\) COMMAND sudo codesign -f -s ${SIGNING_IDENTITY} --timestamp -o runtime --runtime-version ${CMAKE_OSX_DEPLOYMENT_TARGET} --deep + DullahanHelper\ \(Alerts\).app DullahanHelper\ \(GPU\).app DullahanHelper\ \(Plugin\).app WORKING_DIRECTORY ${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks diff --git a/indra/newview/SecondLife.xib b/indra/newview/SecondLife.xib index 8302392f5d..d123eee79e 100644 --- a/indra/newview/SecondLife.xib +++ b/indra/newview/SecondLife.xib @@ -1,1136 +1,193 @@ <?xml version="1.0" encoding="UTF-8"?> -<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> - <data> - <int key="IBDocument.SystemTarget">1060</int> - <string key="IBDocument.SystemVersion">12E55</string> - <string key="IBDocument.InterfaceBuilderVersion">4457.6</string> - <string key="IBDocument.AppKitVersion">1187.39</string> - <string key="IBDocument.HIToolboxVersion">626.00</string> - <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">4457.6</string> - </object> - <array key="IBDocument.IntegratedClassDependencies"> - <string>NSCustomObject</string> - <string>NSMenu</string> - <string>NSMenuItem</string> - <string>NSScrollView</string> - <string>NSScroller</string> - <string>NSTextView</string> - <string>NSView</string> - <string>NSWindowTemplate</string> - </array> - <array key="IBDocument.PluginDependencies"> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - </array> - <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <string key="NS.key.0">PluginDependencyRecalculationVersion</string> - <integer value="1" key="NS.object.0"/> - </object> - <array class="NSMutableArray" key="IBDocument.RootObjects" id="1048"> - <object class="NSCustomObject" id="1021"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSCustomObject" id="1014"> - <string key="NSClassName">FirstResponder</string> - </object> - <object class="NSCustomObject" id="1050"> - <string key="NSClassName">NSApplication</string> - </object> - <object class="NSMenu" id="649796088"> - <string key="NSTitle">Main Menu</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="694149608"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Megapahit</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <object class="NSCustomResource" key="NSOnImage" id="353210768"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuCheckmark</string> - </object> - <object class="NSCustomResource" key="NSMixedImage" id="549394948"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuMixedState</string> - </object> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="110575045"> - <string key="NSTitle">Megapahit</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="238522557"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">About Megapahit</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="304266470"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="609285721"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Preferences…</string> - <string key="NSKeyEquiv">,</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="481834944"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="1046388886"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Services</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="752062318"> - <string key="NSTitle">Services</string> - <array class="NSMutableArray" key="NSMenuItems"/> - <string key="NSName">_NSServicesMenu</string> - </object> - </object> - <object class="NSMenuItem" id="646227648"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="755159360"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide Megapahit</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="342932134"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Hide Others</string> - <string key="NSKeyEquiv">h</string> - <int key="NSKeyEquivModMask">1572864</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="908899353"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Show All</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="1056857174"> - <reference key="NSMenu" ref="110575045"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="632727374"> - <reference key="NSMenu" ref="110575045"/> - <string key="NSTitle">Quit Megapahit</string> - <string key="NSKeyEquiv">q</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - </array> - <string key="NSName">_NSAppleMenu</string> - </object> - </object> - <object class="NSMenuItem" id="725688984"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Edit</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="701759256"> - <string key="NSTitle">Edit</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="521487141"> - <reference key="NSMenu" ref="701759256"/> - <string key="NSTitle">Undo</string> - <string key="NSKeyEquiv">z</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="668936019"> - <reference key="NSMenu" ref="701759256"/> - <string key="NSTitle">Redo</string> - <string key="NSKeyEquiv">Z</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="383018193"> - <reference key="NSMenu" ref="701759256"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="984623395"> - <reference key="NSMenu" ref="701759256"/> - <string key="NSTitle">Cut</string> - <string key="NSKeyEquiv">x</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="656529582"> - <reference key="NSMenu" ref="701759256"/> - <string key="NSTitle">Copy</string> - <string key="NSKeyEquiv">c</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="1032676691"> - <reference key="NSMenu" ref="701759256"/> - <string key="NSTitle">Paste</string> - <string key="NSKeyEquiv">v</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="538907583"> - <reference key="NSMenu" ref="701759256"/> - <string key="NSTitle">Select All</string> - <string key="NSKeyEquiv">a</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - </array> - </object> - </object> - <object class="NSMenuItem" id="713487014"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Window</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="835318025"> - <string key="NSTitle">Window</string> - <array class="NSMutableArray" key="NSMenuItems"> - <object class="NSMenuItem" id="1011231497"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Minimize</string> - <string key="NSKeyEquiv">m</string> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="575023229"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Zoom</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="86356408"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Enter Full Screen</string> - <string key="NSKeyEquiv">f</string> - <int key="NSKeyEquivModMask">1310720</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="299356726"> - <reference key="NSMenu" ref="835318025"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - <object class="NSMenuItem" id="625202149"> - <reference key="NSMenu" ref="835318025"/> - <string key="NSTitle">Bring All to Front</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - </array> - <string key="NSName">_NSWindowsMenu</string> - </object> - </object> - <object class="NSMenuItem" id="391199113"> - <reference key="NSMenu" ref="649796088"/> - <string key="NSTitle">Help</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="353210768"/> - <reference key="NSMixedImage" ref="549394948"/> - </object> - </array> - <string key="NSName">_NSMainMenu</string> - </object> - <object class="NSCustomObject" id="756173070"> - <string key="NSClassName">LLAppDelegate</string> - </object> - <object class="NSWindowTemplate" id="110292814"> - <int key="NSWindowStyleMask">15</int> - <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{196, 240}, {1024, 600}}</string> - <int key="NSWTFlags">74974208</int> - <string key="NSWindowTitle">Megapahit</string> - <string key="NSWindowClass">LLNSWindow</string> - <nil key="NSViewClass"/> - <nil key="NSUserInterfaceItemIdentifier"/> - <object class="NSView" key="NSWindowView" id="305280978"> - <reference key="NSNextResponder"/> - <int key="NSvFlags">256</int> - <array class="NSMutableArray" key="NSSubviews"/> - <string key="NSFrameSize">{1024, 600}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> - <string key="NSReuseIdentifierKey">_NS:20</string> - </object> - <string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string> - <string key="NSMaxSize">{10000000000000, 10000000000000}</string> - <string key="NSFrameAutosaveName">Megapahit</string> - <int key="NSWindowCollectionBehavior">128</int> - <bool key="NSWindowIsRestorable">NO</bool> - </object> - <object class="NSWindowTemplate" id="979091056"> - <int key="NSWindowStyleMask">31</int> - <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{272, 176}, {938, 42}}</string> - <int key="NSWTFlags">-1535638528</int> - <string key="NSWindowTitle">Input Window</string> - <string key="NSWindowClass">LLUserInputWindow</string> - <nil key="NSViewClass"/> - <nil key="NSUserInterfaceItemIdentifier"/> - <object class="NSView" key="NSWindowView" id="1044753903"> - <reference key="NSNextResponder"/> - <int key="NSvFlags">256</int> - <array class="NSMutableArray" key="NSSubviews"> - <object class="NSScrollView" id="238626476"> - <reference key="NSNextResponder" ref="1044753903"/> - <int key="NSvFlags">256</int> - <array class="NSMutableArray" key="NSSubviews"> - <object class="NSClipView" id="871543330"> - <reference key="NSNextResponder" ref="238626476"/> - <int key="NSvFlags">2322</int> - <array class="NSMutableArray" key="NSSubviews"> - <object class="NSTextView" id="395788163"> - <reference key="NSNextResponder" ref="871543330"/> - <int key="NSvFlags">2322</int> - <set class="NSMutableSet" key="NSDragTypes"> - <string>Apple HTML pasteboard type</string> - <string>Apple PDF pasteboard type</string> - <string>Apple PICT pasteboard type</string> - <string>Apple PNG pasteboard type</string> - <string>Apple URL pasteboard type</string> - <string>CorePasteboardFlavorType 0x6D6F6F76</string> - <string>NSColor pasteboard type</string> - <string>NSFilenamesPboardType</string> - <string>NSStringPboardType</string> - <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string> - <string>NeXT RTFD pasteboard type</string> - <string>NeXT Rich Text Format v1.0 pasteboard type</string> - <string>NeXT TIFF v4.0 pasteboard type</string> - <string>NeXT font pasteboard type</string> - <string>NeXT ruler pasteboard type</string> - <string>WebURLsWithTitlesPboardType</string> - <string>public.url</string> - </set> - <string key="NSFrameSize">{938, 42}</string> - <reference key="NSSuperview" ref="871543330"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="339833963"/> - <string key="NSReuseIdentifierKey">_NS:13</string> - <object class="NSTextContainer" key="NSTextContainer" id="648552009"> - <object class="NSLayoutManager" key="NSLayoutManager"> - <object class="NSTextStorage" key="NSTextStorage"> - <object class="NSMutableString" key="NSString"> - <characters key="NS.bytes"/> - </object> - <nil key="NSDelegate"/> - </object> - <array class="NSMutableArray" key="NSTextContainers"> - <reference ref="648552009"/> - </array> - <int key="NSLMFlags">166</int> - <nil key="NSDelegate"/> - </object> - <reference key="NSTextView" ref="395788163"/> - <double key="NSWidth">938</double> - <int key="NSTCFlags">1</int> - </object> - <object class="NSTextViewSharedData" key="NSSharedData"> - <int key="NSFlags">67121127</int> - <int key="NSTextCheckingTypes">0</int> - <nil key="NSMarkedAttributes"/> - <object class="NSColor" key="NSBackgroundColor" id="535647664"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MQA</bytes> - </object> - <dictionary key="NSSelectedAttributes"> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">selectedTextBackgroundColor</string> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> - </object> - </object> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">selectedTextColor</string> - <object class="NSColor" key="NSColor" id="835883401"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MAA</bytes> - </object> - </object> - </dictionary> - <reference key="NSInsertionColor" ref="835883401"/> - <dictionary key="NSLinkAttributes"> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">1</int> - <bytes key="NSRGB">MCAwIDEAA</bytes> - </object> - <object class="NSCursor" key="NSCursor"> - <string key="NSHotSpot">{8, -8}</string> - <int key="NSCursorType">13</int> - </object> - <integer value="1" key="NSUnderline"/> - </dictionary> - <nil key="NSDefaultParagraphStyle"/> - <nil key="NSTextFinder"/> - <int key="NSPreferredTextFinderStyle">1</int> - </object> - <int key="NSTVFlags">6</int> - <string key="NSMaxSize">{939, 10000000}</string> - <nil key="NSDelegate"/> - </object> - </array> - <string key="NSFrame">{{1, 1}, {938, 42}}</string> - <reference key="NSSuperview" ref="238626476"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="395788163"/> - <string key="NSReuseIdentifierKey">_NS:11</string> - <reference key="NSDocView" ref="395788163"/> - <reference key="NSBGColor" ref="535647664"/> - <object class="NSCursor" key="NSCursor"> - <string key="NSHotSpot">{4, 5}</string> - <object class="NSImage" key="NSImage"> - <int key="NSImageFlags">79691776</int> - <array key="NSReps"> - <array> - <integer value="5"/> - <object class="NSURL"> - <nil key="NS.base"/> - <string key="NS.relative">file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff</string> - </object> - </array> - </array> - <object class="NSColor" key="NSColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MCAwAA</bytes> - </object> - </object> - </object> - <int key="NScvFlags">4</int> - </object> - <object class="NSScroller" id="339833963"> - <reference key="NSNextResponder" ref="238626476"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{923, 1}, {16, 42}}</string> - <reference key="NSSuperview" ref="238626476"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView"/> - <string key="NSReuseIdentifierKey">_NS:83</string> - <bool key="NSAllowsLogicalLayoutDirection">NO</bool> - <reference key="NSTarget" ref="238626476"/> - <string key="NSAction">_doScroller:</string> - <double key="NSPercent">0.96666666666666667</double> - </object> - <object class="NSScroller" id="1067057765"> - <reference key="NSNextResponder" ref="238626476"/> - <int key="NSvFlags">-2147483392</int> - <string key="NSFrame">{{-100, -100}, {87, 18}}</string> - <reference key="NSSuperview" ref="238626476"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="871543330"/> - <string key="NSReuseIdentifierKey">_NS:33</string> - <bool key="NSAllowsLogicalLayoutDirection">NO</bool> - <int key="NSsFlags">1</int> - <reference key="NSTarget" ref="238626476"/> - <string key="NSAction">_doScroller:</string> - <double key="NSCurValue">1</double> - <double key="NSPercent">0.94565218687057495</double> - </object> - </array> - <string key="NSFrame">{{-1, -1}, {940, 44}}</string> - <reference key="NSSuperview" ref="1044753903"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="1067057765"/> - <string key="NSReuseIdentifierKey">_NS:9</string> - <int key="NSsFlags">133138</int> - <reference key="NSVScroller" ref="339833963"/> - <reference key="NSHScroller" ref="1067057765"/> - <reference key="NSContentView" ref="871543330"/> - <double key="NSMinMagnification">0.25</double> - <double key="NSMaxMagnification">4</double> - <double key="NSMagnification">1</double> - </object> - </array> - <string key="NSFrameSize">{938, 42}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> - <reference key="NSNextKeyView" ref="238626476"/> - <string key="NSReuseIdentifierKey">_NS:21</string> - </object> - <string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string> - <string key="NSMaxSize">{10000000000000, 10000000000000}</string> - <bool key="NSWindowIsRestorable">YES</bool> - </object> - </array> - <object class="IBObjectContainer" key="IBDocument.Objects"> - <array class="NSMutableArray" key="connectionRecords"> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">terminate:</string> - <reference key="source" ref="1050"/> - <reference key="destination" ref="632727374"/> - </object> - <int key="connectionID">823</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">orderFrontStandardAboutPanel:</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="238522557"/> - </object> - <int key="connectionID">142</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="1021"/> - <reference key="destination" ref="756173070"/> - </object> - <int key="connectionID">845</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performMiniaturize:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1011231497"/> - </object> - <int key="connectionID">37</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">arrangeInFront:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="625202149"/> - </object> - <int key="connectionID">39</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">performZoom:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="575023229"/> - </object> - <int key="connectionID">240</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hide:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="755159360"/> - </object> - <int key="connectionID">369</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">hideOtherApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="342932134"/> - </object> - <int key="connectionID">370</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">unhideAllApplications:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="908899353"/> - </object> - <int key="connectionID">372</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">cut:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="984623395"/> - </object> - <int key="connectionID">768</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">paste:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="1032676691"/> - </object> - <int key="connectionID">769</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">undo:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="521487141"/> - </object> - <int key="connectionID">776</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">copy:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="656529582"/> - </object> - <int key="connectionID">782</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">selectAll:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="538907583"/> - </object> - <int key="connectionID">785</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">toggleFullScreen:</string> - <reference key="source" ref="1014"/> - <reference key="destination" ref="86356408"/> - </object> - <int key="connectionID">842</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">window</string> - <reference key="source" ref="756173070"/> - <reference key="destination" ref="110292814"/> - </object> - <int key="connectionID">850</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">inputWindow</string> - <reference key="source" ref="756173070"/> - <reference key="destination" ref="979091056"/> - </object> - <int key="connectionID">953</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">inputView</string> - <reference key="source" ref="756173070"/> - <reference key="destination" ref="395788163"/> - </object> - <int key="connectionID">954</int> - </object> - </array> - <object class="IBMutableOrderedSet" key="objectRecords"> - <array key="orderedObjects"> - <object class="IBObjectRecord"> - <int key="objectID">0</int> - <array key="object" id="0"/> - <reference key="children" ref="1048"/> - <nil key="parent"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-2</int> - <reference key="object" ref="1021"/> - <reference key="parent" ref="0"/> - <string key="objectName">File's Owner</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-1</int> - <reference key="object" ref="1014"/> - <reference key="parent" ref="0"/> - <string key="objectName">First Responder</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">-3</int> - <reference key="object" ref="1050"/> - <reference key="parent" ref="0"/> - <string key="objectName">Application</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">29</int> - <reference key="object" ref="649796088"/> - <array class="NSMutableArray" key="children"> - <reference ref="713487014"/> - <reference ref="694149608"/> - <reference ref="391199113"/> - <reference ref="725688984"/> - </array> - <reference key="parent" ref="0"/> - <string key="objectName">Main Menu</string> - </object> - <object class="IBObjectRecord"> - <int key="objectID">19</int> - <reference key="object" ref="713487014"/> - <array class="NSMutableArray" key="children"> - <reference ref="835318025"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">56</int> - <reference key="object" ref="694149608"/> - <array class="NSMutableArray" key="children"> - <reference ref="110575045"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">103</int> - <reference key="object" ref="391199113"/> - <array class="NSMutableArray" key="children"/> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">57</int> - <reference key="object" ref="110575045"/> - <array class="NSMutableArray" key="children"> - <reference ref="238522557"/> - <reference ref="755159360"/> - <reference ref="908899353"/> - <reference ref="632727374"/> - <reference ref="646227648"/> - <reference ref="609285721"/> - <reference ref="481834944"/> - <reference ref="304266470"/> - <reference ref="1046388886"/> - <reference ref="1056857174"/> - <reference ref="342932134"/> - </array> - <reference key="parent" ref="694149608"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">58</int> - <reference key="object" ref="238522557"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">134</int> - <reference key="object" ref="755159360"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">150</int> - <reference key="object" ref="908899353"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">136</int> - <reference key="object" ref="632727374"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">144</int> - <reference key="object" ref="646227648"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">129</int> - <reference key="object" ref="609285721"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">143</int> - <reference key="object" ref="481834944"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">236</int> - <reference key="object" ref="304266470"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">131</int> - <reference key="object" ref="1046388886"/> - <array class="NSMutableArray" key="children"> - <reference ref="752062318"/> - </array> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">149</int> - <reference key="object" ref="1056857174"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">145</int> - <reference key="object" ref="342932134"/> - <reference key="parent" ref="110575045"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">130</int> - <reference key="object" ref="752062318"/> - <reference key="parent" ref="1046388886"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">24</int> - <reference key="object" ref="835318025"/> - <array class="NSMutableArray" key="children"> - <reference ref="299356726"/> - <reference ref="625202149"/> - <reference ref="575023229"/> - <reference ref="1011231497"/> - <reference ref="86356408"/> - </array> - <reference key="parent" ref="713487014"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">92</int> - <reference key="object" ref="299356726"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">5</int> - <reference key="object" ref="625202149"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">239</int> - <reference key="object" ref="575023229"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">23</int> - <reference key="object" ref="1011231497"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">711</int> - <reference key="object" ref="725688984"/> - <array class="NSMutableArray" key="children"> - <reference ref="701759256"/> - </array> - <reference key="parent" ref="649796088"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">712</int> - <reference key="object" ref="701759256"/> - <array class="NSMutableArray" key="children"> - <reference ref="521487141"/> - <reference ref="668936019"/> - <reference ref="383018193"/> - <reference ref="984623395"/> - <reference ref="656529582"/> - <reference ref="1032676691"/> - <reference ref="538907583"/> - </array> - <reference key="parent" ref="725688984"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">716</int> - <reference key="object" ref="984623395"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">717</int> - <reference key="object" ref="656529582"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">718</int> - <reference key="object" ref="1032676691"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">721</int> - <reference key="object" ref="538907583"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">824</int> - <reference key="object" ref="756173070"/> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">841</int> - <reference key="object" ref="86356408"/> - <reference key="parent" ref="835318025"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">828</int> - <reference key="object" ref="110292814"/> - <array class="NSMutableArray" key="children"> - <reference ref="305280978"/> - </array> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">829</int> - <reference key="object" ref="305280978"/> - <array class="NSMutableArray" key="children"/> - <reference key="parent" ref="110292814"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">713</int> - <reference key="object" ref="521487141"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">714</int> - <reference key="object" ref="668936019"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">715</int> - <reference key="object" ref="383018193"/> - <reference key="parent" ref="701759256"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">941</int> - <reference key="object" ref="979091056"/> - <array class="NSMutableArray" key="children"> - <reference ref="1044753903"/> - </array> - <reference key="parent" ref="0"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">942</int> - <reference key="object" ref="1044753903"/> - <array class="NSMutableArray" key="children"> - <reference ref="238626476"/> - </array> - <reference key="parent" ref="979091056"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">943</int> - <reference key="object" ref="238626476"/> - <array class="NSMutableArray" key="children"> - <reference ref="395788163"/> - <reference ref="1067057765"/> - <reference ref="339833963"/> - </array> - <reference key="parent" ref="1044753903"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">944</int> - <reference key="object" ref="395788163"/> - <reference key="parent" ref="238626476"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">945</int> - <reference key="object" ref="1067057765"/> - <reference key="parent" ref="238626476"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">946</int> - <reference key="object" ref="339833963"/> - <reference key="parent" ref="238626476"/> - </object> - </array> - </object> - <dictionary class="NSMutableDictionary" key="flattenedProperties"> - <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="103.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="711.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="712.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="713.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="714.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="715.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="716.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="717.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="718.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="721.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="824.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES" key="828.IBNSWindowAutoPositionCentersHorizontal"/> - <boolean value="YES" key="828.IBNSWindowAutoPositionCentersVertical"/> - <string key="828.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="YES" key="828.NSWindowTemplate.visibleAtLaunch"/> - <string key="829.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="841.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="941.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <boolean value="NO" key="941.NSWindowTemplate.visibleAtLaunch"/> - <string key="942.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="943.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="944.CustomClassName">LLNonInlineTextView</string> - <string key="944.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="945.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="946.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> - <nil key="activeLocalization"/> - <dictionary class="NSMutableDictionary" key="localizations"/> - <nil key="sourceID"/> - <int key="maxID">954</int> - </object> - <object class="IBClassDescriber" key="IBDocument.Classes"> - <array class="NSMutableArray" key="referencedPartialClassDescriptions"> - <object class="IBPartialClassDescription"> - <string key="className">LLAppDelegate</string> - <string key="superclassName">NSObject</string> - <dictionary class="NSMutableDictionary" key="outlets"> - <string key="inputView">LLNonInlineTextView</string> - <string key="inputWindow">NSWindow</string> - <string key="window">LLNSWindow</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> - <object class="IBToOneOutletInfo" key="inputView"> - <string key="name">inputView</string> - <string key="candidateClassName">LLNonInlineTextView</string> - </object> - <object class="IBToOneOutletInfo" key="inputWindow"> - <string key="name">inputWindow</string> - <string key="candidateClassName">NSWindow</string> - </object> - <object class="IBToOneOutletInfo" key="window"> - <string key="name">window</string> - <string key="candidateClassName">LLNSWindow</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/LLAppDelegate.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">LLNSWindow</string> - <string key="superclassName">NSWindow</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/LLNSWindow.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">LLNonInlineTextView</string> - <string key="superclassName">NSTextView</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/LLNonInlineTextView.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">LLUserInputWindow</string> - <string key="superclassName">NSPanel</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/LLUserInputWindow.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">NSTextView</string> - <dictionary class="NSMutableDictionary" key="actions"> - <string key="orderFrontSharingServicePicker:">id</string> - <string key="toggleQuickLookPreviewPanel:">id</string> - </dictionary> - <dictionary class="NSMutableDictionary" key="actionInfosByName"> - <object class="IBActionInfo" key="orderFrontSharingServicePicker:"> - <string key="name">orderFrontSharingServicePicker:</string> - <string key="candidateClassName">id</string> - </object> - <object class="IBActionInfo" key="toggleQuickLookPreviewPanel:"> - <string key="name">toggleQuickLookPreviewPanel:</string> - <string key="candidateClassName">id</string> - </object> - </dictionary> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">./Classes/NSTextView.h</string> - </object> - </object> - </array> - </object> - <int key="IBDocument.localizationMode">0</int> - <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> - <real value="1060" key="NS.object.0"/> - </object> - <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string> - <integer value="4600" key="NS.object.0"/> - </object> - <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> - <int key="IBDocument.defaultPropertyAccessControl">3</int> - <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> - <string key="NSMenuCheckmark">{11, 11}</string> - <string key="NSMenuMixedState">{10, 3}</string> - </dictionary> - </data> -</archive> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23727" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> + <dependencies> + <deployment version="110000" identifier="macosx"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23727"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <customObject id="-2" userLabel="File's Owner" customClass="NSApplication"> + <connections> + <outlet property="delegate" destination="824" id="845"/> + </connections> + </customObject> + <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> + <customObject id="-3" userLabel="Application" customClass="NSObject"/> + <menu title="Main Menu" systemMenu="main" id="29" userLabel="Main Menu"> + <items> + <menuItem title="Megapahit" id="56"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Megapahit" systemMenu="apple" id="57"> + <items> + <menuItem title="About Megapahit" id="58"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="236"/> + <menuItem title="Preferences…" keyEquivalent="," id="129"/> + <menuItem isSeparatorItem="YES" id="143"/> + <menuItem title="Services" id="131"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Services" systemMenu="services" id="130"/> + </menuItem> + <menuItem isSeparatorItem="YES" id="144"/> + <menuItem title="Hide Megapahit" keyEquivalent="h" id="134"> + <connections> + <action selector="hide:" target="-1" id="369"/> + </connections> + </menuItem> + <menuItem title="Hide Others" keyEquivalent="h" id="145"> + <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/> + <connections> + <action selector="hideOtherApplications:" target="-1" id="370"/> + </connections> + </menuItem> + <menuItem title="Show All" id="150"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="unhideAllApplications:" target="-1" id="372"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="149"/> + <menuItem title="Quit Megapahit" keyEquivalent="q" id="136"> + <connections> + <action selector="terminate:" target="-3" id="823"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Edit" id="711"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Edit" id="712"> + <items> + <menuItem title="Undo" keyEquivalent="z" id="713"> + <connections> + <action selector="undo:" target="-1" id="776"/> + </connections> + </menuItem> + <menuItem title="Redo" keyEquivalent="Z" id="714"/> + <menuItem isSeparatorItem="YES" id="715"/> + <menuItem title="Cut" keyEquivalent="x" id="716"> + <connections> + <action selector="cut:" target="-1" id="768"/> + </connections> + </menuItem> + <menuItem title="Copy" keyEquivalent="c" id="717"> + <connections> + <action selector="copy:" target="-1" id="782"/> + </connections> + </menuItem> + <menuItem title="Paste" keyEquivalent="v" id="718"> + <connections> + <action selector="paste:" target="-1" id="769"/> + </connections> + </menuItem> + <menuItem title="Select All" keyEquivalent="a" id="721"> + <connections> + <action selector="selectAll:" target="-1" id="785"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Window" id="19"> + <modifierMask key="keyEquivalentModifierMask"/> + <menu key="submenu" title="Window" systemMenu="window" id="24"> + <items> + <menuItem title="Minimize" keyEquivalent="m" id="23"> + <connections> + <action selector="performMiniaturize:" target="-1" id="37"/> + </connections> + </menuItem> + <menuItem title="Zoom" id="239"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="performZoom:" target="-1" id="240"/> + </connections> + </menuItem> + <menuItem title="Enter Full Screen" keyEquivalent="f" id="841"> + <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/> + <connections> + <action selector="toggleFullScreen:" target="-1" id="842"/> + </connections> + </menuItem> + <menuItem isSeparatorItem="YES" id="92"/> + <menuItem title="Bring All to Front" id="5"> + <modifierMask key="keyEquivalentModifierMask"/> + <connections> + <action selector="arrangeInFront:" target="-1" id="39"/> + </connections> + </menuItem> + </items> + </menu> + </menuItem> + <menuItem title="Help" id="103"> + <modifierMask key="keyEquivalentModifierMask"/> + </menuItem> + </items> + <point key="canvasLocation" x="87" y="149"/> + </menu> + <customObject id="824" customClass="LLAppDelegate"> + <connections> + <outlet property="inputView" destination="944" id="954"/> + <outlet property="inputWindow" destination="941" id="953"/> + <outlet property="window" destination="828" id="850"/> + </connections> + </customObject> + <window title="Megapahit" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" deferred="NO" frameAutosaveName="Megapahit" animationBehavior="default" id="828" customClass="LLNSWindow"> + <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/> + <windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/> + <rect key="contentRect" x="196" y="240" width="1024" height="600"/> + <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/> + <view key="contentView" id="829"> + <rect key="frame" x="0.0" y="0.0" width="1024" height="600"/> + <autoresizingMask key="autoresizingMask"/> + </view> + <point key="canvasLocation" x="-48" y="-285"/> + </window> + <window title="Input Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" visibleAtLaunch="NO" animationBehavior="default" id="941" customClass="LLUserInputWindow"> + <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" utility="YES"/> + <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> + <rect key="contentRect" x="272" y="176" width="938" height="42"/> + <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/> + <view key="contentView" id="942"> + <rect key="frame" x="0.0" y="0.0" width="938" height="42"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <scrollView fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="943"> + <rect key="frame" x="-1" y="-1" width="940" height="44"/> + <autoresizingMask key="autoresizingMask"/> + <clipView key="contentView" id="Mvi-Vb-2zK"> + <rect key="frame" x="1" y="1" width="938" height="42"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <textView importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" spellingCorrection="YES" smartInsertDelete="YES" id="944" customClass="LLNonInlineTextView"> + <rect key="frame" x="0.0" y="0.0" width="938" height="42"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + <size key="minSize" width="938" height="42"/> + <size key="maxSize" width="940" height="10000000"/> + <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/> + </textView> + </subviews> + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + </clipView> + <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="945"> + <rect key="frame" x="-100" y="-100" width="87" height="18"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + <scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="946"> + <rect key="frame" x="924" y="1" width="15" height="42"/> + <autoresizingMask key="autoresizingMask"/> + </scroller> + </scrollView> + </subviews> + </view> + <point key="canvasLocation" x="87" y="144"/> + </window> + </objects> +</document> diff --git a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl index 017855325c..8e12d09443 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/CASF.glsl @@ -2545,12 +2545,31 @@ A_STATIC void CasSetup( #endif #ifdef A_GPU + +#ifdef LEGACY_GAMMA +uniform float gamma; + +vec3 legacyGamma(vec3 color) +{ + vec3 c = 1. - clamp(color, vec3(0.), vec3(1.)); + c = 1. - pow(c, vec3(gamma)); // s/b inverted already CPU-side + + return c; +} +#endif + void main() { vec4 diff = vec4(0.f); uvec2 point = uvec2(vary_fragcoord * out_screen_res.xy); CasFilter(diff.r, diff.g, diff.b, point, cas_param_0, cas_param_1, true); diff.a = texture(diffuseRect, vary_fragcoord).a; + diff.rgb = linear_to_srgb(diff.rgb); + +#ifdef LEGACY_GAMMA + diff.rgb = legacyGamma(diff.rgb); +#endif + frag_color = diff; } #endif diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl index fdb77cce6e..5837308965 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl @@ -1351,6 +1351,10 @@ float4 SMAABlendingWeightCalculationPS(float2 texcoord, //----------------------------------------------------------------------------- // Neighborhood Blending Pixel Shader (Third Pass) +vec3 srgb_to_linear(vec3 cs); +vec4 srgb_to_linear4(vec4 cs); +vec3 linear_to_srgb(vec3 cl); + float4 SMAANeighborhoodBlendingPS(float2 texcoord, float4 offset, SMAATexture2D(colorTex), @@ -1369,6 +1373,7 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord, SMAA_BRANCH if (dot(a, float4(1.0, 1.0, 1.0, 1.0)) < 1e-5) { float4 color = SMAASampleLevelZero(colorTex, texcoord); + color.rgb = srgb_to_linear(color.rgb); #if SMAA_REPROJECTION float2 velocity = SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, texcoord)); @@ -1377,6 +1382,7 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord, color.a = sqrt(5.0 * length(velocity)); #endif + color.rgb = linear_to_srgb(color.rgb); return color; } else { bool h = max(a.x, a.z) > max(a.y, a.w); // max(horizontal) > max(vertical) @@ -1393,8 +1399,13 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord, // We exploit bilinear filtering to mix current pixel with the chosen // neighbor: - float4 color = blendingWeight.x * SMAASampleLevelZero(colorTex, blendingCoord.xy); - color += blendingWeight.y * SMAASampleLevelZero(colorTex, blendingCoord.zw); + float4 color = SMAASampleLevelZero(colorTex, blendingCoord.xy); + color.rgb = srgb_to_linear(color.rgb); + color = blendingWeight.x * color; + + float4 color2 = SMAASampleLevelZero(colorTex, blendingCoord.zw); + color2.rgb = srgb_to_linear(color2.rgb); + color += blendingWeight.y * color2; #if SMAA_REPROJECTION // Antialias velocity for proper reprojection in a later stage: @@ -1405,6 +1416,7 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord, color.a = sqrt(5.0 * length(velocity)); #endif + color.rgb = linear_to_srgb(color.rgb); return color; } } diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index 197ce48a45..a24e7c0b90 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -43,8 +43,6 @@ vec3 legacyGamma(vec3 color) return c; } -vec3 clampHDRRange(vec3 color); - void main() { //this is the one of the rare spots where diffuseRect contains linear color values (not sRGB) @@ -55,7 +53,7 @@ void main() diff.rgb = legacyGamma(diff.rgb); #endif - diff.rgb = clampHDRRange(diff.rgb); + diff.rgb = clamp(diff.rgb, vec3(0.0), vec3(1.0)); frag_color = diff; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl index 1f01c7f16a..b1218d61af 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredTonemap.glsl @@ -31,11 +31,25 @@ uniform sampler2D diffuseRect; in vec2 vary_fragcoord; +#ifdef GAMMA_CORRECT +uniform float gamma; +#endif + vec3 linear_to_srgb(vec3 cl); vec3 toneMap(vec3 color); vec3 clampHDRRange(vec3 color); +#ifdef GAMMA_CORRECT +vec3 legacyGamma(vec3 color) +{ + vec3 c = 1. - clamp(color, vec3(0.), vec3(1.)); + c = 1. - pow(c, vec3(gamma)); // s/b inverted already CPU-side + + return c; +} +#endif + void main() { //this is the one of the rare spots where diffuseRect contains linear color values (not sRGB) @@ -47,8 +61,18 @@ void main() diff.rgb = clamp(diff.rgb, vec3(0.0), vec3(1.0)); #endif - diff.rgb = clampHDRRange(diff.rgb); +#ifdef GAMMA_CORRECT + diff.rgb = linear_to_srgb(diff.rgb); + +#ifdef LEGACY_GAMMA + diff.rgb = legacyGamma(diff.rgb); +#endif + +#endif + + diff.rgb = clamp(diff.rgb, vec3(0.0), vec3(1.0)); // We should always be 0-1 past this point + //debugExposure(diff.rgb); - frag_color = max(diff, vec4(0)); + frag_color = diff; } diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index d4b05dde72..b8fd3dc189 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -372,7 +372,7 @@ struct AttachmentInfo - (void)sendEvent:(NSEvent *)event { [super sendEvent:event]; - if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask)) + if ([event type] == NSEventTypeKeyUp && ([event modifierFlags] & NSEventModifierFlagCommand)) { [[self keyWindow] sendEvent:event]; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 98a1fd740b..6422d1befa 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1388,6 +1388,7 @@ bool LLAppViewer::doFrame() #endif LL_RECORD_BLOCK_TIME(FTM_FRAME); + LL_PROFILE_GPU_ZONE("Frame"); { // and now adjust the visuals from previous frame. if(LLPerfStats::tunables.userAutoTuneEnabled && LLPerfStats::tunables.tuningFlag != LLPerfStats::Tunables::Nothing) @@ -1477,24 +1478,26 @@ bool LLAppViewer::doFrame() if (!LLApp::isExiting()) { - LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df JoystickKeyboard"); - pingMainloopTimeout("Main:JoystickKeyboard"); - - // Scan keyboard for movement keys. Command keys and typing - // are handled by windows callbacks. Don't do this until we're - // done initializing. JC - if (gViewerWindow - && (gHeadlessClient || gViewerWindow->getWindow()->getVisible()) - && gViewerWindow->getActive() - && !gViewerWindow->getWindow()->getMinimized() - && LLStartUp::getStartupState() == STATE_STARTED - && (gHeadlessClient || !gViewerWindow->getShowProgress()) - && !gFocusMgr.focusLocked()) { - LLPerfStats::RecordSceneTime T (LLPerfStats::StatType_t::RENDER_IDLE); - joystick->scanJoystick(); - gKeyboard->scanKeyboard(); - gViewerInput.scanMouse(); + LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df JoystickKeyboard"); + pingMainloopTimeout("Main:JoystickKeyboard"); + + // Scan keyboard for movement keys. Command keys and typing + // are handled by windows callbacks. Don't do this until we're + // done initializing. JC + if (gViewerWindow + && (gHeadlessClient || gViewerWindow->getWindow()->getVisible()) + && gViewerWindow->getActive() + && !gViewerWindow->getWindow()->getMinimized() + && LLStartUp::getStartupState() == STATE_STARTED + && (gHeadlessClient || !gViewerWindow->getShowProgress()) + && !gFocusMgr.focusLocked()) + { + LLPerfStats::RecordSceneTime T(LLPerfStats::StatType_t::RENDER_IDLE); + joystick->scanJoystick(); + gKeyboard->scanKeyboard(); + gViewerInput.scanMouse(); + } } // Update state based on messages, user input, object idle. @@ -3230,17 +3233,6 @@ bool LLAppViewer::initWindow() LLNotificationsUI::LLNotificationManager::getInstance(); - -#ifdef LL_DARWIN - //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later) - LLOSInfo& os_info = LLOSInfo::instance(); - if (os_info.mMajorVer == 10 && os_info.mMinorVer < 7) - { - if ( os_info.mMinorVer == 6 && os_info.mBuild < 8 ) - gViewerWindow->getWindow()->setOldResize(true); - } -#endif - if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->getWindow()->maximize(); @@ -3355,6 +3347,11 @@ LLSD LLAppViewer::getViewerInfo() const info["VIEWER_VERSION_STR"] = versionInfo.getVersion(); info["CHANNEL"] = versionInfo.getChannel(); info["ADDRESS_SIZE"] = ADDRESS_SIZE; +#if LL_ARM64 + info["ARCHITECTURE"] = "ARM"; +#else + info["ARCHITECTURE"] = "x86"; +#endif std::string build_config = versionInfo.getBuildConfig(); if (build_config != "Release") { @@ -4490,6 +4487,9 @@ bool LLAppViewer::initCache() const U32 CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS = 128; LLVOCache::getInstance()->initCache(LL_PATH_CACHE, CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS, getObjectCacheVersion()); + // Remove old, stale CEF cache folders + purgeCefStaleCaches(); + return true; } @@ -4514,18 +4514,27 @@ void LLAppViewer::loadKeyBindings() LLUrlRegistry::instance().setKeybindingHandler(&gViewerInput); } +// As per GHI #4498, remove old, stale CEF cache folders from previous sessions +void LLAppViewer::purgeCefStaleCaches() +{ + // TODO: we really shouldn't use a hard coded name for the cache folder here... + const std::string browser_parent_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache"); + if (LLFile::isdir(browser_parent_cache)) + { + // This is a sledgehammer approach - nukes the cef_cache dir entirely + // which is then recreated the first time a CEF instance creates an + // individual cache folder. If we ever decide to retain some folders + // e.g. Search UI cache - then we will need a more granular approach. + gDirUtilp->deleteDirAndContents(browser_parent_cache); + } +} + void LLAppViewer::purgeCache() { LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL; LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); LLVOCache::getInstance()->removeCache(LL_PATH_CACHE); LLViewerShaderMgr::instance()->clearShaderCache(); - std::string browser_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache"); - if (LLFile::isdir(browser_cache)) - { - // cef does not support clear_cache and clear_cookies, so clear what we can manually. - gDirUtilp->deleteDirAndContents(browser_cache); - } gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*"); } @@ -5712,6 +5721,8 @@ void LLAppViewer::forceErrorBreakpoint() DebugBreak(); #elif __i386__ || __x86_64__ asm ("int $3"); +#else + __builtin_trap(); #endif return; } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index e7de2d9b28..3afde6b9f5 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -220,6 +220,7 @@ public: void initGeneralThread(); void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; } + void purgeCefStaleCaches(); // Remove old, stale CEF cache folders void purgeCache(); // Clear the local cache. void purgeCacheImmediate(); //clear local cache immediately. S32 updateTextureThreads(F32 max_time); diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 18ac523e0c..ae7ed17359 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -118,6 +118,11 @@ static void exceptionTerminateHandler() int main( int argc, char **argv ) { + // Call Tracy first thing to have it allocate memory + // https://github.com/wolfpld/tracy/issues/196 + LL_PROFILER_FRAME_END; + LL_PROFILER_SET_THREAD_NAME("App"); + gArgC = argc; gArgV = argv; diff --git a/indra/newview/llappviewermacosx-objc.h b/indra/newview/llappviewermacosx-objc.h index d0ae0a7fc2..3fbf4202f1 100644 --- a/indra/newview/llappviewermacosx-objc.h +++ b/indra/newview/llappviewermacosx-objc.h @@ -30,9 +30,6 @@ #include <string> #include <vector> -//Why? Because BOOL -void launchApplication(const std::string* app_name, const std::vector<std::string>* args); - void force_ns_sxeption(); #endif // LL_LLAPPVIEWERMACOSX_OBJC_H diff --git a/indra/newview/llappviewermacosx-objc.mm b/indra/newview/llappviewermacosx-objc.mm index 9b6bfe621b..2ea3f2f171 100644 --- a/indra/newview/llappviewermacosx-objc.mm +++ b/indra/newview/llappviewermacosx-objc.mm @@ -33,45 +33,6 @@ #include "llappviewermacosx-objc.h" -void launchApplication(const std::string* app_name, const std::vector<std::string>* args) -{ - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - if (app_name->empty()) return; - - NSMutableString* app_name_ns = [NSMutableString stringWithString:[[NSBundle mainBundle] resourcePath]]; //Path to resource dir - [app_name_ns appendFormat:@"/%@", [NSString stringWithCString:app_name->c_str() - encoding:[NSString defaultCStringEncoding]]]; - - NSMutableArray *args_ns = nil; - args_ns = [[NSMutableArray alloc] init]; - - for (int i=0; i < args->size(); ++i) - { - NSLog(@"Adding string %s", (*args)[i].c_str()); - [args_ns addObject: - [NSString stringWithCString:(*args)[i].c_str() - encoding:[NSString defaultCStringEncoding]]]; - } - - NSTask *task = [[NSTask alloc] init]; - NSBundle *bundle = [NSBundle bundleWithPath:[[NSWorkspace sharedWorkspace] fullPathForApplication:app_name_ns]]; - [task setLaunchPath:[bundle executablePath]]; - [task setArguments:args_ns]; - [task launch]; - -// NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; -// NSURL *url = [NSURL fileURLWithPath:[workspace fullPathForApplication:app_name_ns]]; -// -// NSError *error = nil; -// [workspace launchApplicationAtURL:url options:0 configuration:[NSDictionary dictionaryWithObject:args_ns forKey:NSWorkspaceLaunchConfigurationArguments] error:&error]; - //TODO Handle error - - [pool release]; - return; -} - void force_ns_sxeption() { NSException *exception = [NSException exceptionWithName:@"Forced NSException" reason:nullptr userInfo:nullptr]; diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index aab6d00573..b074c40c17 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -258,6 +258,11 @@ void infos(const std::string& message) int main( int argc, char **argv ) { + // Call Tracy first thing to have it allocate memory + // https://github.com/wolfpld/tracy/issues/196 + LL_PROFILER_FRAME_END; + LL_PROFILER_SET_THREAD_NAME("App"); + // Store off the command line args for use later. gArgC = argc; gArgV = argv; diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index d5cce28a3d..f612495953 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -260,8 +260,8 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) NvAPI_UnicodeString profile_name; std::string app_name = LLTrans::getString("APP_NAME"); - llutf16string w_app_name = utf8str_to_utf16str(app_name); - wsprintf(profile_name, L"%s", w_app_name.c_str()); + std::wstring w_app_name = ll_convert<std::wstring>(app_name); + wsprintf(reinterpret_cast<wchar_t*>(profile_name), L"%s", w_app_name.c_str()); NvDRSProfileHandle hProfile = 0; // (3) Check if we already have an application profile for the viewer status = NvAPI_DRS_FindProfileByName(hSession, profile_name, &hProfile); @@ -278,7 +278,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) NVDRS_PROFILE profileInfo; profileInfo.version = NVDRS_PROFILE_VER; profileInfo.isPredefined = 0; - wsprintf(profileInfo.profileName, L"%s", w_app_name.c_str()); + wsprintf(reinterpret_cast<wchar_t*>(profileInfo.profileName), L"%s", w_app_name.c_str()); status = NvAPI_DRS_CreateProfile(hSession, &profileInfo, &hProfile); if (status != NVAPI_OK) @@ -293,9 +293,9 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) NVDRS_APPLICATION profile_application; profile_application.version = NVDRS_APPLICATION_VER; - llutf16string w_exe_name = utf8str_to_utf16str(exe_name); + std::wstring w_exe_name = ll_convert<std::wstring>(exe_name); NvAPI_UnicodeString profile_app_name; - wsprintf(profile_app_name, L"%s", w_exe_name.c_str()); + wsprintf(reinterpret_cast<wchar_t*>(profile_app_name), L"%s", w_exe_name.c_str()); status = NvAPI_DRS_GetApplicationInfo(hSession, hProfile, profile_app_name, &profile_application); if (status != NVAPI_OK && status != NVAPI_EXECUTABLE_NOT_FOUND) @@ -311,10 +311,10 @@ void ll_nvapi_init(NvDRSSessionHandle hSession) NVDRS_APPLICATION application; application.version = NVDRS_APPLICATION_VER; application.isPredefined = 0; - wsprintf(application.appName, L"%s", w_exe_name.c_str()); - wsprintf(application.userFriendlyName, L"%s", w_exe_name.c_str()); - wsprintf(application.launcher, L"%s", w_exe_name.c_str()); - wsprintf(application.fileInFolder, L"%s", ""); + wsprintf(reinterpret_cast<wchar_t*>(application.appName), L"%s", w_exe_name.c_str()); + wsprintf(reinterpret_cast<wchar_t*>(application.userFriendlyName), L"%s", w_exe_name.c_str()); + wsprintf(reinterpret_cast<wchar_t*>(application.launcher), L"%s", w_exe_name.c_str()); + wsprintf(reinterpret_cast<wchar_t*>(application.fileInFolder), L"%s", ""); status = NvAPI_DRS_CreateApplication(hSession, hProfile, &application); if (status != NVAPI_OK) @@ -597,7 +597,7 @@ void LLAppViewerWin32::disableWinErrorReporting() { std::string executable_name = gDirUtilp->getExecutableFilename(); - if( S_OK == WerAddExcludedApplication( utf8str_to_utf16str(executable_name).c_str(), FALSE ) ) + if( S_OK == WerAddExcludedApplication(ll_convert<std::wstring>(executable_name).c_str(), FALSE ) ) { LL_INFOS() << "WerAddExcludedApplication() succeeded for " << executable_name << LL_ENDL; } diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index 1c8864a9df..46696fc4a4 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -204,7 +204,7 @@ public: NUM_RENDER_TYPES, }; - #ifdef LL_PROFILER_ENABLE_RENDER_DOC + #if LL_PROFILER_ENABLE_RENDER_DOC static inline const char* lookupPassName(U32 pass) { switch (pass) @@ -340,7 +340,7 @@ public: } } #else - static inline const char* lookupPass(U32 pass) { return ""; } + static inline const char* lookupPassName(U32 pass) { return ""; } #endif LLRenderPass(const U32 type); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index e4b81ba00a..d2b862eb58 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -771,9 +771,6 @@ static void xform4a(LLVector4a &tex_coord, const LLVector4a& trans, const LLVect // Texture transforms are done about the center of the face. st.setAdd(tex_coord, trans); - // Handle rotation - LLVector4a rot_st; - // <s0 * cosAng, s0*-sinAng, s1*cosAng, s1*-sinAng> LLVector4a s0; s0.splat(st, 0); @@ -2258,8 +2255,6 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) if (joint) { - LLVector4a jointPos; - LLMatrix4a worldMat; worldMat.loadu((F32*)&joint->getWorldMatrix().mMatrix[0][0]); diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 9e19d16957..d26a3784a2 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -292,7 +292,7 @@ bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) success = GetOpenFileName(&mOFN); if (success) { - std::string filename = utf16str_to_utf8str(llutf16string(mFilesW)); + std::string filename = ll_convert<std::string>(std::wstring(mFilesW)); mFiles.push_back(filename); } @@ -358,7 +358,7 @@ bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) // lengths. if( wcslen(mOFN.lpstrFile) > mOFN.nFileOffset ) /*Flawfinder: ignore*/ { - std::string filename = utf16str_to_utf8str(llutf16string(mFilesW)); + std::string filename = ll_convert<std::string>(std::wstring(mFilesW)); mFiles.push_back(filename); } else @@ -372,7 +372,7 @@ bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) break; if (*tptrw == 0) tptrw++; // shouldn't happen? - std::string filename = utf16str_to_utf8str(llutf16string(tptrw)); + std::string filename = ll_convert<std::string>(std::wstring(tptrw)); if (dirname.empty()) dirname = filename + "\\"; else @@ -418,7 +418,7 @@ bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, mOFN.lpstrFile = mFilesW; if (!filename.empty()) { - llutf16string tstring = utf8str_to_utf16str(filename); + std::wstring tstring = ll_convert<std::wstring>(filename); wcsncpy(mFilesW, tstring.c_str(), FILENAME_BUFFER_SIZE); } /*Flawfinder: ignore*/ else { @@ -600,7 +600,7 @@ bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, success = GetSaveFileName(&mOFN); if (success) { - std::string filename = utf16str_to_utf8str(llutf16string(mFilesW)); + std::string filename = ll_convert<std::string>(std::wstring(mFilesW)); mFiles.push_back(filename); } } diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm index b21bc724fb..978069457c 100644 --- a/indra/newview/llfilepicker_mac.mm +++ b/indra/newview/llfilepicker_mac.mm @@ -86,7 +86,7 @@ std::unique_ptr<std::vector<std::string>> doLoadDialog(const std::vector<std::st result = [panel runModal]; - if (result == NSOKButton) + if (result == NSModalResponseOK) { NSArray *filesToOpen = [panel URLs]; int i, count = [filesToOpen count]; @@ -173,7 +173,7 @@ std::unique_ptr<std::string> doSaveDialog(const std::string* file, [panel setNameFieldStringValue: fileName]; [panel setDirectoryURL: url]; if([panel runModal] == - NSFileHandlingPanelOKButton) + NSModalResponseOK) { NSURL* url = [panel URL]; NSString* p = [url path]; @@ -211,7 +211,7 @@ void doSaveDialogModeless(const std::string* file, [panel beginWithCompletionHandler:^(NSModalResponse result) { - if (result == NSOKButton) + if (result == NSModalResponseOK) { NSURL* url = [panel URL]; NSString* p = [url path]; diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index ffbda0265d..af0ef7223d 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -1285,7 +1285,7 @@ void LLFloaterEmojiPicker::saveState() if (!recentlyUsed.empty()) recentlyUsed += ","; char buffer[32]; - sprintf(buffer, "%u", (U32)emoji); + snprintf(buffer, sizeof(buffer), "%u", (U32)emoji); recentlyUsed += buffer; if (!--maxCount) break; @@ -1302,7 +1302,7 @@ void LLFloaterEmojiPicker::saveState() if (!frequentlyUsed.empty()) frequentlyUsed += ","; char buffer[32]; - sprintf(buffer, "%u:%u", (U32)it.first, (U32)it.second); + snprintf(buffer, sizeof(buffer), "%u:%u", (U32)it.first, (U32)it.second); frequentlyUsed += buffer; if (!--maxCount) break; diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 68b11ec92b..871f924316 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -78,7 +78,7 @@ BOOL CALLBACK di8_list_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr, // Capable of detecting devices like Oculus Rift if (device_instance_ptr && pvRef) { - std::string product_name = utf16str_to_utf8str(llutf16string(device_instance_ptr->tszProductName)); + std::string product_name = ll_convert<std::string>(std::wstring(device_instance_ptr->tszProductName)); S32 size = sizeof(GUID); LLSD::Binary data; //just an std::vector data.resize(size); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index c2d7d34287..c93b837e82 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -238,7 +238,7 @@ private: std::unique_ptr< ll::prefs::SearchData > mSearchData; bool mSearchDataDirty; - boost::signals2::connection mImpostorsChangedSignal; + boost::signals2::connection mImpostorsChangedSignal; boost::signals2::connection mComplexityChangedSignal; void onUpdateFilterTerm( bool force = false ); diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h index a1a54f238d..6f793c1379 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h @@ -61,7 +61,7 @@ protected: void onBtnOK(const LLSD& userdata); void onBtnCancel(const LLSD& userdata); - boost::signals2::connection mImpostorsChangedSignal; + boost::signals2::connection mImpostorsChangedSignal; boost::signals2::connection mComplexityChangedSignal; boost::signals2::connection mComplexityModeChangedSignal; boost::signals2::connection mLODFactorChangedSignal; diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index d8b3f996aa..8da835ed7d 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -45,7 +45,9 @@ #include "llworld.h" #include "tinygltf/tiny_gltf.h" -#include <strstream> + +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> #include <unordered_set> @@ -555,8 +557,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp LLSD asset; // read file into buffer - std::istrstream str(&buffer[0], static_cast<S32>(buffer.size())); - + boost::iostreams::stream<boost::iostreams::array_source> str(buffer.data(), buffer.size()); if (LLSDSerialize::deserialize(asset, str, buffer.size())) { if (asset.has("version") && LLGLTFMaterial::isAcceptedVersion(asset["version"].asString())) diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp index 0b792efa1f..02b6751307 100644 --- a/indra/newview/llgltfmaterialpreviewmgr.cpp +++ b/indra/newview/llgltfmaterialpreviewmgr.cpp @@ -530,12 +530,21 @@ bool LLGLTFPreviewTexture::render() gPipeline.copyScreenSpaceReflections(&screen, &gPipeline.mSceneMap); gPipeline.generateLuminance(&screen, &gPipeline.mLuminanceMap); gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap, /*use_history = */ false); +/* + gPipeline.gammaCorrect(&screen, &gPipeline.mPostPingMap); +*/ } U16 activeRT = 0; gPipeline.gammaCorrect(&screen, &gPipeline.mPostMaps[activeRT]); LLVertexBuffer::unbind(); +/* + gPipeline.generateGlow(&gPipeline.mPostPingMap); + gPipeline.combineGlow(&gPipeline.mPostPingMap, &screen); + gPipeline.renderDoF(&screen, &gPipeline.mPostPingMap); + gPipeline.applyFXAA(&gPipeline.mPostPingMap, &screen); +*/ gPipeline.generateGlow(&gPipeline.mPostMaps[activeRT]); gPipeline.combineGlow(&gPipeline.mPostMaps[activeRT], &gPipeline.mPostMaps[1-activeRT]); diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index 343bb01072..9efe70786d 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -92,6 +92,7 @@ void LLHeroProbeManager::update() } LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + LL_PROFILE_GPU_ZONE("hero manager update"); llassert(!gCubeSnapshot); // assert a snapshot is not in progress if (LLAppViewer::instance()->logoutRequestSent()) { @@ -293,6 +294,9 @@ void LLHeroProbeManager::renderProbes() // In effect this simulates single-bounce lighting. void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, bool is_dynamic, F32 near_clip) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + LL_PROFILE_GPU_ZONE("hero probe update"); + // hacky hot-swap of camera specific render targets gPipeline.mRT = &gPipeline.mHeroProbeRT; @@ -363,7 +367,7 @@ void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, bool for (int i = 0; i < mMipChain.size(); ++i) { - LL_PROFILE_GPU_ZONE("probe mip"); + LL_PROFILE_GPU_ZONE("hero probe mip"); mMipChain[i].bindTarget(); if (i == 0) { @@ -390,7 +394,7 @@ void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, bool if (mip >= 0) { - LL_PROFILE_GPU_ZONE("probe mip copy"); + LL_PROFILE_GPU_ZONE("hero probe mip copy"); mTexture->bind(0); glCopyTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, mip, 0, 0, sourceIdx * 6 + face, 0, 0, res, res); @@ -440,7 +444,7 @@ void LLHeroProbeManager::generateRadiance(LLReflectionMap* probe) for (int i = 0; i < mMipChain.size() / 4; ++i) { - LL_PROFILE_GPU_ZONE("probe radiance gen"); + LL_PROFILE_GPU_ZONE("hero probe radiance gen"); static LLStaticHashedString sMipLevel("mipLevel"); static LLStaticHashedString sRoughness("roughness"); static LLStaticHashedString sWidth("u_width"); @@ -487,6 +491,7 @@ void LLHeroProbeManager::updateUniforms() } LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + LL_PROFILE_GPU_ZONE("hpmu - uniforms") LLMatrix4a modelview; modelview.loadu(gGLModelView); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index d1fd82a7f1..e6b33453d5 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -3890,6 +3890,31 @@ void LLInventoryAction::fileUploadLocation(const LLUUID& dest_id, const std::str } } +bool LLInventoryAction::isFileUploadLocation(const LLUUID& dest_id, const std::string& action) +{ + if (action == "def_model") + { + return gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT) == dest_id; + } + else if (action == "def_texture") + { + return gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE) == dest_id; + } + else if (action == "def_sound") + { + return gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_SOUND) == dest_id; + } + else if (action == "def_animation") + { + return gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_ANIMATION) == dest_id; + } + else if (action == "def_pbr_material") + { + return gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_MATERIAL) == dest_id; + } + return false; +} + void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index ae7bb8770d..77a2a18877 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -653,6 +653,7 @@ struct LLInventoryAction static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root); static void removeItemFromDND(LLFolderView* root); static void fileUploadLocation(const LLUUID& dest_id, const std::string& action); + static bool isFileUploadLocation(const LLUUID& dest_id, const std::string& action); static void saveMultipleTextures(const std::vector<std::string>& filenames, std::set<LLFolderViewItem*> selected_items, LLInventoryModel* model); diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 388e1604ea..b9d4f4471a 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -112,6 +112,7 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu() enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2)); enable_registrar.add("Inventory.CanSetFavoriteFolder", boost::bind(&LLInventoryGalleryContextMenu::canSetFavoriteFolder, this)); + enable_registrar.add("Inventory.FileUploadLocation.Check", boost::bind(&LLInventoryGalleryContextMenu::isUploadLocationSelected, this, _2)); enable_registrar.add("Inventory.EnvironmentEnabled", [](LLUICtrl*, const LLSD&) { @@ -491,6 +492,12 @@ void LLInventoryGalleryContextMenu::fileUploadLocation(const LLSD& userdata) LLInventoryAction::fileUploadLocation(mUUIDs.front(), param); } +bool LLInventoryGalleryContextMenu::isUploadLocationSelected(const LLSD& userdata) +{ + const std::string param = userdata.asString(); + return LLInventoryAction::isFileUploadLocation(mUUIDs.front(), param); +} + bool LLInventoryGalleryContextMenu::canSetUploadLocation(const LLSD& userdata) { if (mUUIDs.size() != 1) diff --git a/indra/newview/llinventorygallerymenu.h b/indra/newview/llinventorygallerymenu.h index 7f6598e171..d91c752544 100644 --- a/indra/newview/llinventorygallerymenu.h +++ b/indra/newview/llinventorygallerymenu.h @@ -47,6 +47,7 @@ protected: void updateMenuItemsVisibility(LLContextMenu* menu); void fileUploadLocation(const LLSD& userdata); + bool isUploadLocationSelected(const LLSD& userdata); bool canSetUploadLocation(const LLSD& userdata); void setFavoriteFolder(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 0da7e35c38..4b436e894a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -188,6 +188,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2)); mCommitCallbackRegistrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryPanel::setFavoriteFolder, this)); + mEnableCallbackRegistrar.add("Inventory.FileUploadLocation.Check", boost::bind(&LLInventoryPanel::isUploadLocationSelected, this, _2)); mCommitCallbackRegistrar.add("Inventory.OpenNewFolderWindow", boost::bind(&LLInventoryPanel::openSingleViewInventory, this, LLUUID())); } @@ -1838,6 +1839,13 @@ void LLInventoryPanel::setFavoriteFolder() gSavedPerAccountSettings.setString("FavoriteFolder", LLFolderBridge::sSelf.get()->getUUID().asString()); } +bool LLInventoryPanel::isUploadLocationSelected(const LLSD& userdata) +{ + const std::string param = userdata.asString(); + const LLUUID dest = LLFolderBridge::sSelf.get()->getUUID(); + return LLInventoryAction::isFileUploadLocation(dest, param); +} + void LLInventoryPanel::openSingleViewInventory(LLUUID folder_id) { LLPanelMainInventory::newFolderWindow(folder_id.isNull() ? LLFolderBridge::sSelf.get()->getUUID() : folder_id); @@ -2103,7 +2111,7 @@ void LLInventoryPanel::removeItemID(const LLUUID& id) ++it) { mItemMap.erase((*it)->getUUID()); - } +} for (LLInventoryModel::item_array_t::iterator it = items.begin(), end_it = items.end(); it != end_it; diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index b7fef98413..5a73df54b0 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -226,6 +226,7 @@ public: bool beginIMSession(); void fileUploadLocation(const LLSD& userdata); void setFavoriteFolder(); + bool isUploadLocationSelected(const LLSD& userdata); void openSingleViewInventory(LLUUID folder_id = LLUUID()); void purgeSelectedItems(); bool attachObject(const LLSD& userdata); diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index e31fbb188a..a99c9df0ff 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -196,7 +196,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) #ifndef LL_WINDOWS const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(mFilename)); #else - const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(utf8str_to_utf16str(mFilename))); + const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(ll_convert<std::wstring>(mFilename))); #endif LLSD new_last_modified = asctime(localtime(&temp_time)); diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp index fab18f2d26..d6facad23d 100644 --- a/indra/newview/lllocalgltfmaterials.cpp +++ b/indra/newview/lllocalgltfmaterials.cpp @@ -134,7 +134,7 @@ bool LLLocalGLTFMaterial::updateSelf() #ifndef LL_WINDOWS const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(mFilename)); #else - const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(utf8str_to_utf16str(mFilename))); + const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(ll_convert<std::wstring>(mFilename))); #endif LLSD new_last_modified = asctime(localtime(&temp_time)); diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp index aa03001389..51c38aba3a 100644 --- a/indra/newview/llmachineid.cpp +++ b/indra/newview/llmachineid.cpp @@ -293,7 +293,7 @@ bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &var if (validate_as_uuid) { std::wstring ws(serialNumber, serial_size); - std::string str = ll_convert_wide_to_string(ws); + std::string str = ll_convert<std::string>(ws); if (!LLUUID::validate(str)) { @@ -315,7 +315,7 @@ bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &var continue; } } - LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; + LL_INFOS("AppInit") << " Serial Number : " << ll_convert_wide_to_string(std::wstring(vtProp.bstrVal, SysStringLen(vtProp.bstrVal))) << LL_ENDL; unsigned int j = 0; diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 3e5d6d1171..cac72bb085 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -63,8 +63,9 @@ #include "tinygltf/tiny_gltf.h" #include "lltinygltfhelper.h" -#include <strstream> +#include <boost/iostreams/device/array.hpp> +#include <boost/iostreams/stream.hpp> const std::string MATERIAL_BASE_COLOR_DEFAULT_NAME = "Base Color"; const std::string MATERIAL_NORMAL_DEFAULT_NAME = "Normal"; @@ -1246,7 +1247,7 @@ bool LLMaterialEditor::decodeAsset(const std::vector<char>& buffer) { LLSD asset; - std::istrstream str(&buffer[0], buffer.size()); + boost::iostreams::stream<boost::iostreams::array_source> str(buffer.data(), buffer.size()); if (LLSDSerialize::deserialize(asset, str, buffer.size())) { if (asset.has("version") && LLGLTFMaterial::isAcceptedVersion(asset["version"].asString())) diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 202008f7f9..c7b60b2fd5 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -347,6 +347,7 @@ bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar; registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this)); + registar.add("Open.ShowSource", boost::bind(&LLMediaCtrl::onShowSource, this)); // stinson 05/05/2014 : use this as the parent of the context menu if the static menu // container has yet to be created @@ -364,8 +365,9 @@ bool LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) { // hide/show debugging options bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging"); + menu->setItemVisible("debug_separator", media_plugin_debugging_enabled); menu->setItemVisible("open_webinspector", media_plugin_debugging_enabled ); - menu->setItemVisible("debug_separator", media_plugin_debugging_enabled ); + menu->setItemVisible("show_page_source", media_plugin_debugging_enabled); menu->show(x, y); LLMenuGL::showPopup(this, menu, x, y); @@ -444,6 +446,12 @@ void LLMediaCtrl::onOpenWebInspector() mMediaSource->getMediaPlugin()->showWebInspector( true ); } +void LLMediaCtrl::onShowSource() +{ + if (mMediaSource && mMediaSource->hasMedia()) + mMediaSource->getMediaPlugin()->showPageSource(); +} + //////////////////////////////////////////////////////////////////////////////// // bool LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 9f9564af46..a644ef3071 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -171,6 +171,7 @@ public: // right click debugging item void onOpenWebInspector(); + void onShowSource(); LLUUID getTextureID() {return mMediaTextureID;} diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index b1c8b5f36a..86071e38e1 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -645,7 +645,7 @@ void LLPanelPrimMediaControls::updateShape() vert_it = vect_face.begin(); vert_end = vect_face.end(); - glm::mat4 mat; + glm::mat4 mat = glm::identity<glm::mat4>(); if (!is_hud) { mat = get_current_projection() * get_current_modelview(); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index fa4a725fda..eb3d2eb715 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -212,6 +212,7 @@ void LLReflectionMapManager::update() } LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + LL_PROFILE_GPU_ZONE("reflection manager update"); llassert(!gCubeSnapshot); // assert a snapshot is not in progress if (LLAppViewer::instance()->logoutRequestSent()) { @@ -841,6 +842,8 @@ void LLReflectionMapManager::doProbeUpdate() // In effect this simulates single-bounce lighting. void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + LL_PROFILE_GPU_ZONE("probe update"); // hacky hot-swap of camera specific render targets gPipeline.mRT = &gPipeline.mAuxillaryRT; @@ -1217,6 +1220,7 @@ void LLReflectionMapManager::updateUniforms() } LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; + LL_PROFILE_GPU_ZONE("rmmu - uniforms") mReflectionMaps.resize(mReflectionProbeCount); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 8f5585b6b1..f6ad29d085 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -410,6 +410,7 @@ static void update_tp_display(bool minimized) void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) { LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Render"); + LL_PROFILE_GPU_ZONE("Render"); LLPerfStats::RecordSceneTime T (LLPerfStats::StatType_t::RENDER_DISPLAY); // render time capture - This is the main stat for overall rendering. @@ -716,6 +717,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) if (gPipeline.RenderMirrors && !gSnapshot) { LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Update hero probes"); + LL_PROFILE_GPU_ZONE("hero manager") gPipeline.mHeroProbeManager.update(); gPipeline.mHeroProbeManager.renderProbes(); } diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 9d45ea24b9..8edb21956f 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -144,7 +144,7 @@ BOOL CALLBACK di8_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr, LPVO // Capable of detecting devices like Oculus Rift if (device_instance_ptr) { - std::string product_name = utf16str_to_utf8str(llutf16string(device_instance_ptr->tszProductName)); + std::string product_name = ll_convert<std::string>(std::wstring(device_instance_ptr->tszProductName)); LLSD guid = LLViewerJoystick::getInstance()->getDeviceUUID(); @@ -211,7 +211,7 @@ BOOL CALLBACK di8_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr, LPVO // This is GUID2 so teoretically it can be memcpy copied into LLUUID void guid_from_string(GUID &guid, const std::string &input) { - CLSIDFromString(utf8str_to_utf16str(input).c_str(), &guid); + CLSIDFromString(ll_convert<std::wstring>(input).c_str(), &guid); } std::string string_from_guid(const GUID &guid) @@ -221,7 +221,7 @@ std::string string_from_guid(const GUID &guid) // use guidString... - std::string res = utf16str_to_utf8str(llutf16string(guidString)); + std::string res = ll_convert<std::string>(std::wstring(guidString)); // ensure memory is freed ::CoTaskMemFree(guidString); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 09bb4a35ad..10a29f3fb2 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3528,6 +3528,46 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla //////////////////////////////////////////////////////////////////////////////// // virtual void +LLViewerMediaImpl::undo() +{ + if (mMediaSource) + mMediaSource->undo(); +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +bool +LLViewerMediaImpl::canUndo() const +{ + if (mMediaSource) + return mMediaSource->canUndo(); + else + return FALSE; +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +void +LLViewerMediaImpl::redo() +{ + if (mMediaSource) + mMediaSource->redo(); +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +bool +LLViewerMediaImpl::canRedo() const +{ + if (mMediaSource) + return mMediaSource->canRedo(); + else + return FALSE; +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +void LLViewerMediaImpl::cut() { if (mMediaSource) @@ -3585,6 +3625,46 @@ LLViewerMediaImpl::canPaste() const return false; } +//////////////////////////////////////////////////////////////////////////////// +// virtual +void +LLViewerMediaImpl::doDelete() +{ + if (mMediaSource) + mMediaSource->doDelete(); +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +bool +LLViewerMediaImpl::canDoDelete() const +{ + if (mMediaSource) + return mMediaSource->canDoDelete(); + else + return FALSE; +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +void +LLViewerMediaImpl::selectAll() +{ + if (mMediaSource) + mMediaSource->selectAll(); +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual +bool +LLViewerMediaImpl::canSelectAll() const +{ + if (mMediaSource) + return mMediaSource->canSelectAll(); + else + return FALSE; +} + void LLViewerMediaImpl::setUpdated(bool updated) { mIsUpdated = updated ; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 5753615a43..c17cf59815 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -341,6 +341,12 @@ public: /*virtual*/ void handleMediaEvent(LLPluginClassMedia* plugin, LLPluginClassMediaOwner::EMediaEvent); // LLEditMenuHandler overrides + /*virtual*/ void undo(); + /*virtual*/ bool canUndo() const; + + /*virtual*/ void redo(); + /*virtual*/ bool canRedo() const; + /*virtual*/ void cut(); /*virtual*/ bool canCut() const; @@ -350,6 +356,12 @@ public: /*virtual*/ void paste(); /*virtual*/ bool canPaste() const; + /*virtual*/ void doDelete(); + /*virtual*/ bool canDoDelete() const; + + /*virtual*/ void selectAll(); + /*virtual*/ bool canSelectAll() const; + void addObject(LLVOVolume* obj) ; void removeObject(LLVOVolume* obj) ; const std::list< LLVOVolume* >* getObjectList() const ; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 3e9f67bf29..f32d0aebda 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -200,6 +200,10 @@ LLGLSLShader gDeferredCoFProgram; LLGLSLShader gDeferredDoFCombineProgram; LLGLSLShader gDeferredPostTonemapProgram; LLGLSLShader gNoPostTonemapProgram; +LLGLSLShader gDeferredPostTonemapGammaCorrectProgram; +LLGLSLShader gNoPostTonemapGammaCorrectProgram; +LLGLSLShader gDeferredPostTonemapLegacyGammaCorrectProgram; +LLGLSLShader gNoPostTonemapLegacyGammaCorrectProgram; LLGLSLShader gDeferredPostGammaCorrectProgram; LLGLSLShader gLegacyPostGammaCorrectProgram; LLGLSLShader gHDRGammaCorrectProgram; @@ -211,6 +215,7 @@ LLGLSLShader gSMAAEdgeDetectProgram[4]; LLGLSLShader gSMAABlendWeightsProgram[4]; LLGLSLShader gSMAANeighborhoodBlendProgram[4]; LLGLSLShader gCASProgram; +LLGLSLShader gCASLegacyGammaProgram; LLGLSLShader gDeferredPostNoDoFProgram; LLGLSLShader gDeferredPostNoDoFNoiseProgram; LLGLSLShader gDeferredWLSkyProgram; @@ -448,6 +453,11 @@ void LLViewerShaderMgr::finalizeShaderList() mShaderList.push_back(&gHUDPBRAlphaProgram); mShaderList.push_back(&gDeferredPostTonemapProgram); mShaderList.push_back(&gNoPostTonemapProgram); + mShaderList.push_back(&gDeferredPostTonemapGammaCorrectProgram); + mShaderList.push_back(&gNoPostTonemapGammaCorrectProgram); + mShaderList.push_back(&gDeferredPostTonemapLegacyGammaCorrectProgram); + mShaderList.push_back(&gNoPostTonemapLegacyGammaCorrectProgram); + mShaderList.push_back(&gCASLegacyGammaProgram); mShaderList.push_back(&gDeferredPostGammaCorrectProgram); // for gamma mShaderList.push_back(&gLegacyPostGammaCorrectProgram); mShaderList.push_back(&gHDRGammaCorrectProgram); @@ -1173,6 +1183,11 @@ bool LLViewerShaderMgr::loadShadersDeferred() gHDRGammaCorrectProgram.unload(); gDeferredPostTonemapProgram.unload(); gNoPostTonemapProgram.unload(); + gDeferredPostTonemapGammaCorrectProgram.unload(); + gNoPostTonemapGammaCorrectProgram.unload(); + gDeferredPostTonemapLegacyGammaCorrectProgram.unload(); + gNoPostTonemapLegacyGammaCorrectProgram.unload(); + for (auto i = 0; i < 4; ++i) { gFXAAProgram[i].unload(); @@ -1181,6 +1196,7 @@ bool LLViewerShaderMgr::loadShadersDeferred() gSMAANeighborhoodBlendProgram[i].unload(); } gCASProgram.unload(); + gCASLegacyGammaProgram.unload(); gEnvironmentMapProgram.unload(); gDeferredWLSkyProgram.unload(); gDeferredWLCloudProgram.unload(); @@ -2558,6 +2574,74 @@ bool LLViewerShaderMgr::loadShadersDeferred() llassert(success); } + if (success) + { + gDeferredPostTonemapGammaCorrectProgram.mName = "Deferred Tonemap Gamma Post Process"; + gDeferredPostTonemapGammaCorrectProgram.mFeatures.hasSrgb = true; + gDeferredPostTonemapGammaCorrectProgram.mFeatures.isDeferred = true; + gDeferredPostTonemapGammaCorrectProgram.mFeatures.hasTonemap = true; + gDeferredPostTonemapGammaCorrectProgram.mShaderFiles.clear(); + gDeferredPostTonemapGammaCorrectProgram.clearPermutations(); + gDeferredPostTonemapGammaCorrectProgram.addPermutation("GAMMA_CORRECT", "1"); + gDeferredPostTonemapGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredPostTonemapGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredTonemap.glsl", GL_FRAGMENT_SHADER)); + gDeferredPostTonemapGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gDeferredPostTonemapGammaCorrectProgram.createShader(); + llassert(success); + } + + if (success) + { + gNoPostTonemapGammaCorrectProgram.mName = "No Post Tonemap Gamma Post Process"; + gNoPostTonemapGammaCorrectProgram.mFeatures.hasSrgb = true; + gNoPostTonemapGammaCorrectProgram.mFeatures.isDeferred = true; + gNoPostTonemapGammaCorrectProgram.mFeatures.hasTonemap = true; + gNoPostTonemapGammaCorrectProgram.mShaderFiles.clear(); + gNoPostTonemapGammaCorrectProgram.clearPermutations(); + gNoPostTonemapGammaCorrectProgram.addPermutation("GAMMA_CORRECT", "1"); + gNoPostTonemapGammaCorrectProgram.addPermutation("NO_POST", "1"); + gNoPostTonemapGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gNoPostTonemapGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredTonemap.glsl", GL_FRAGMENT_SHADER)); + gNoPostTonemapGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gNoPostTonemapGammaCorrectProgram.createShader(); + llassert(success); + } + + if (success) + { + gDeferredPostTonemapLegacyGammaCorrectProgram.mName = "Deferred Tonemap Legacy Gamma Post Process"; + gDeferredPostTonemapLegacyGammaCorrectProgram.mFeatures.hasSrgb = true; + gDeferredPostTonemapProgram.mFeatures.isDeferred = true; + gDeferredPostTonemapLegacyGammaCorrectProgram.mFeatures.hasTonemap = true; + gDeferredPostTonemapLegacyGammaCorrectProgram.mShaderFiles.clear(); + gDeferredPostTonemapLegacyGammaCorrectProgram.clearPermutations(); + gDeferredPostTonemapLegacyGammaCorrectProgram.addPermutation("GAMMA_CORRECT", "1"); + gDeferredPostTonemapLegacyGammaCorrectProgram.addPermutation("LEGACY_GAMMA", "1"); + gDeferredPostTonemapLegacyGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredPostTonemapLegacyGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredTonemap.glsl", GL_FRAGMENT_SHADER)); + gDeferredPostTonemapLegacyGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gDeferredPostTonemapLegacyGammaCorrectProgram.createShader(); + llassert(success); + } + + if (success) + { + gNoPostTonemapLegacyGammaCorrectProgram.mName = "No Post Tonemap Legacy Gamma Post Process"; + gNoPostTonemapLegacyGammaCorrectProgram.mFeatures.hasSrgb = true; + gNoPostTonemapLegacyGammaCorrectProgram.mFeatures.isDeferred = true; + gNoPostTonemapLegacyGammaCorrectProgram.mFeatures.hasTonemap = true; + gNoPostTonemapLegacyGammaCorrectProgram.mShaderFiles.clear(); + gNoPostTonemapLegacyGammaCorrectProgram.clearPermutations(); + gNoPostTonemapLegacyGammaCorrectProgram.addPermutation("NO_POST", "1"); + gNoPostTonemapLegacyGammaCorrectProgram.addPermutation("GAMMA_CORRECT", "1"); + gNoPostTonemapLegacyGammaCorrectProgram.addPermutation("LEGACY_GAMMA", "1"); + gNoPostTonemapLegacyGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gNoPostTonemapLegacyGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredTonemap.glsl", GL_FRAGMENT_SHADER)); + gNoPostTonemapLegacyGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + success = gNoPostTonemapLegacyGammaCorrectProgram.createShader(); + llassert(success); + } + if (success && gGLManager.mGLVersion > 3.9f) { std::vector<std::pair<std::string, std::string>> quality_levels = { {"12", "Low"}, @@ -2741,6 +2825,27 @@ bool LLViewerShaderMgr::loadShadersDeferred() } } + if (success && gGLManager.mGLVersion > 4.05f) + { + gCASLegacyGammaProgram.mName = "Contrast Adaptive Sharpening Legacy Gamma Shader"; + gCASLegacyGammaProgram.mFeatures.hasSrgb = true; + gCASLegacyGammaProgram.mShaderFiles.clear(); + gCASLegacyGammaProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gCASLegacyGammaProgram.mShaderFiles.push_back(make_pair("deferred/CASF.glsl", GL_FRAGMENT_SHADER)); + gCASLegacyGammaProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; + gCASLegacyGammaProgram.clearPermutations(); + gCASLegacyGammaProgram.addPermutation("GAMMA_CORRECT", "1"); + gCASLegacyGammaProgram.addPermutation("LEGACY_GAMMA", "1"); + success = gCASLegacyGammaProgram.createShader(); + // llassert(success); + if (!success) + { + LL_WARNS() << "Failed to create shader '" << gCASProgram.mName << "', disabling!" << LL_ENDL; + // continue as if this shader never happened + success = true; + } + } + if (success) { gDeferredPostProgram.mName = "Deferred Post Shader"; diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h index 7f989f281e..f503401510 100644 --- a/indra/newview/llviewershadermgr.h +++ b/indra/newview/llviewershadermgr.h @@ -250,6 +250,7 @@ extern LLGLSLShader gSMAAEdgeDetectProgram[4]; extern LLGLSLShader gSMAABlendWeightsProgram[4]; extern LLGLSLShader gSMAANeighborhoodBlendProgram[4]; extern LLGLSLShader gCASProgram; +extern LLGLSLShader gCASLegacyGammaProgram; extern LLGLSLShader gDeferredPostNoDoFProgram; extern LLGLSLShader gDeferredPostNoDoFNoiseProgram; extern LLGLSLShader gDeferredPostGammaCorrectProgram; @@ -257,6 +258,10 @@ extern LLGLSLShader gLegacyPostGammaCorrectProgram; extern LLGLSLShader gHDRGammaCorrectProgram; extern LLGLSLShader gDeferredPostTonemapProgram; extern LLGLSLShader gNoPostTonemapProgram; +extern LLGLSLShader gDeferredPostTonemapGammaCorrectProgram; +extern LLGLSLShader gNoPostTonemapGammaCorrectProgram; +extern LLGLSLShader gDeferredPostTonemapLegacyGammaCorrectProgram; +extern LLGLSLShader gNoPostTonemapLegacyGammaCorrectProgram; extern LLGLSLShader gExposureProgram; extern LLGLSLShader gExposureProgramNoFade; extern LLGLSLShader gLuminanceProgram; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 47fb658d15..9942ea3de8 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -261,9 +261,6 @@ static const F32 MIN_DISPLAY_SCALE = 0.75f; static const char KEY_MOUSELOOK = 'M'; -static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot")); -static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", "")); - LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity"); @@ -784,8 +781,16 @@ public: addText(xpos, ypos, "Projection Matrix"); ypos += y_inc; +#if LL_DARWIN +// For sprintf deprecation +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif // View last column is always <0,0,0,1> MATRIX_ROW_F32_TO_STR(gGLModelView, 12,camera_lines[3]); addText(xpos, ypos, std::string(camera_lines[3])); ypos += y_inc; +#if LL_DARWIN +#pragma clang diagnostic pop +#endif MATRIX_ROW_N32_TO_STR(gGLModelView, 8,camera_lines[2]); addText(xpos, ypos, std::string(camera_lines[2])); ypos += y_inc; MATRIX_ROW_N32_TO_STR(gGLModelView, 4,camera_lines[1]); addText(xpos, ypos, std::string(camera_lines[1])); ypos += y_inc; mBackRectCamera2.mTop = ypos + 2; MATRIX_ROW_N32_TO_STR(gGLModelView, 0,camera_lines[0]); addText(xpos, ypos, std::string(camera_lines[0])); ypos += y_inc; @@ -2036,6 +2041,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) std::string LLViewerWindow::getLastSnapshotDir() { + static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", "")); return sSnapshotDir; } @@ -4746,6 +4752,7 @@ void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke // Get a base file location if needed. if (force_picker || !isSnapshotLocSet()) { + static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot")); std::string proposed_name(sSnapshotBaseName); // getSaveFile will append an appropriate extension to the proposed name, based on the ESaveFilter constant passed in. @@ -4800,7 +4807,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save // Check if there is enough free space to save snapshot #ifdef LL_WINDOWS - boost::filesystem::path b_path(utf8str_to_utf16str(lastSnapshotDir)); + boost::filesystem::path b_path(ll_convert<std::wstring>(lastSnapshotDir)); #else boost::filesystem::path b_path(lastSnapshotDir); #endif @@ -4844,6 +4851,9 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save // Shouldn't there be a return here? } + static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot")); + static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", "")); + // Look for an unused file name auto is_snapshot_name_loc_set = isSnapshotLocSet(); std::string filepath; @@ -4959,8 +4969,8 @@ void LLViewerWindow::playSnapshotAnimAndSound() bool LLViewerWindow::isSnapshotLocSet() const { - std::string snapshot_dir = sSnapshotDir; - return !snapshot_dir.empty(); + static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", "")); + return !sSnapshotDir().empty(); } void LLViewerWindow::resetSnapshotLoc() const diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 30f899877a..f13d4caa19 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -82,9 +82,15 @@ const std::string WEBRTC_VOICE_SERVER_TYPE = "webrtc"; namespace { - const F32 MAX_AUDIO_DIST = 50.0f; - const F32 VOLUME_SCALE_WEBRTC = 0.01f; - const F32 LEVEL_SCALE_WEBRTC = 0.008f; + const F32 MAX_AUDIO_DIST = 50.0f; + const F32 VOLUME_SCALE_WEBRTC = 0.01f; + const F32 TUNING_LEVEL_SCALE = 0.01f; + const F32 TUNING_LEVEL_START_POINT = 0.8f; + const F32 LEVEL_SCALE = 0.005f; + const F32 LEVEL_START_POINT = 0.18f; + const uint32_t SET_HIDDEN_RESTORE_DELAY_MS = 200; // 200 ms to unmute again after hiding during teleport + const uint32_t MUTE_FADE_DELAY_MS = 500; // 20ms fade followed by 480ms silence gets rid of the click just after unmuting. + // This is because the buffers and processing is cleared by the silence. const F32 SPEAKING_AUDIO_LEVEL = 0.30; @@ -201,7 +207,6 @@ bool LLWebRTCVoiceClient::sShuttingDown = false; LLWebRTCVoiceClient::LLWebRTCVoiceClient() : mHidden(false), - mTuningMode(false), mTuningMicGain(0.0), mTuningSpeakerVolume(50), // Set to 50 so the user can hear themselves when he sets his mic volume mDevicesListUpdated(false), @@ -348,25 +353,45 @@ void LLWebRTCVoiceClient::updateSettings() static LLCachedControl<std::string> sOutputDevice(gSavedSettings, "VoiceOutputAudioDevice"); setRenderDevice(sOutputDevice); - LL_INFOS("Voice") << "Input device: " << std::quoted(sInputDevice()) << ", output device: " << std::quoted(sOutputDevice()) << LL_ENDL; + LL_INFOS("Voice") << "Input device: " << std::quoted(sInputDevice()) << ", output device: " << std::quoted(sOutputDevice()) + << LL_ENDL; static LLCachedControl<F32> sMicLevel(gSavedSettings, "AudioLevelMic"); setMicGain(sMicLevel); llwebrtc::LLWebRTCDeviceInterface::AudioConfig config; + bool audioConfigChanged = false; + static LLCachedControl<bool> sEchoCancellation(gSavedSettings, "VoiceEchoCancellation", true); - config.mEchoCancellation = sEchoCancellation; + if (sEchoCancellation != config.mEchoCancellation) + { + config.mEchoCancellation = sEchoCancellation; + audioConfigChanged = true; + } static LLCachedControl<bool> sAGC(gSavedSettings, "VoiceAutomaticGainControl", true); - config.mAGC = sAGC; + if (sAGC != config.mAGC) + { + config.mAGC = sAGC; + audioConfigChanged = true; + } - static LLCachedControl<U32> sNoiseSuppressionLevel(gSavedSettings, + static LLCachedControl<U32> sNoiseSuppressionLevel( + gSavedSettings, "VoiceNoiseSuppressionLevel", llwebrtc::LLWebRTCDeviceInterface::AudioConfig::ENoiseSuppressionLevel::NOISE_SUPPRESSION_LEVEL_VERY_HIGH); - config.mNoiseSuppressionLevel = (llwebrtc::LLWebRTCDeviceInterface::AudioConfig::ENoiseSuppressionLevel)(U32)sNoiseSuppressionLevel; - - mWebRTCDeviceInterface->setAudioConfig(config); + auto noiseSuppressionLevel = + (llwebrtc::LLWebRTCDeviceInterface::AudioConfig::ENoiseSuppressionLevel)(U32)sNoiseSuppressionLevel; + if (noiseSuppressionLevel != config.mNoiseSuppressionLevel) + { + config.mNoiseSuppressionLevel = noiseSuppressionLevel; + audioConfigChanged = true; + } + if (audioConfigChanged) + { + mWebRTCDeviceInterface->setAudioConfig(config); + } } } @@ -695,21 +720,38 @@ void LLWebRTCVoiceClient::OnDevicesChangedImpl(const llwebrtc::LLWebRTCVoiceDevi std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); LL_DEBUGS("Voice") << "Setting devices to-input: '" << inputDevice << "' output: '" << outputDevice << "'" << LL_ENDL; - clearRenderDevices(); - for (auto &device : render_devices) + + // only set the render device if the device list has changed. + if (mRenderDevices.size() != render_devices.size() || !std::equal(mRenderDevices.begin(), + mRenderDevices.end(), + render_devices.begin(), + [](const LLVoiceDevice& a, const llwebrtc::LLWebRTCVoiceDevice& b) { + return a.display_name == b.mDisplayName && a.full_name == b.mID; })) { - addRenderDevice(LLVoiceDevice(device.mDisplayName, device.mID)); + clearRenderDevices(); + for (auto& device : render_devices) + { + addRenderDevice(LLVoiceDevice(device.mDisplayName, device.mID)); + } + setRenderDevice(outputDevice); } - setRenderDevice(outputDevice); - clearCaptureDevices(); - for (auto &device : capture_devices) + // only set the capture device if the device list has changed. + if (mCaptureDevices.size() != capture_devices.size() ||!std::equal(mCaptureDevices.begin(), + mCaptureDevices.end(), + capture_devices.begin(), + [](const LLVoiceDevice& a, const llwebrtc::LLWebRTCVoiceDevice& b) + { return a.display_name == b.mDisplayName && a.full_name == b.mID; })) { - LL_DEBUGS("Voice") << "Checking capture device:'" << device.mID << "'" << LL_ENDL; + clearCaptureDevices(); + for (auto& device : capture_devices) + { + LL_DEBUGS("Voice") << "Checking capture device:'" << device.mID << "'" << LL_ENDL; - addCaptureDevice(LLVoiceDevice(device.mDisplayName, device.mID)); + addCaptureDevice(LLVoiceDevice(device.mDisplayName, device.mID)); + } + setCaptureDevice(inputDevice); } - setCaptureDevice(inputDevice); setDevicesListUpdated(true); } @@ -762,7 +804,14 @@ bool LLWebRTCVoiceClient::inTuningMode() void LLWebRTCVoiceClient::tuningSetMicVolume(float volume) { - mTuningMicGain = volume; + if (volume != mTuningMicGain) + { + mTuningMicGain = volume; + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setTuningMicGain(volume); + } + } } void LLWebRTCVoiceClient::tuningSetSpeakerVolume(float volume) @@ -774,21 +823,10 @@ void LLWebRTCVoiceClient::tuningSetSpeakerVolume(float volume) } } -float LLWebRTCVoiceClient::getAudioLevel() -{ - if (mIsInTuningMode) - { - return (1.0f - mWebRTCDeviceInterface->getTuningAudioLevel() * LEVEL_SCALE_WEBRTC) * mTuningMicGain / 2.1f; - } - else - { - return (1.0f - mWebRTCDeviceInterface->getPeerConnectionAudioLevel() * LEVEL_SCALE_WEBRTC) * mMicGain / 2.1f; - } -} - float LLWebRTCVoiceClient::tuningGetEnergy(void) { - return getAudioLevel(); + float rms = mWebRTCDeviceInterface->getTuningAudioLevel(); + return TUNING_LEVEL_START_POINT - TUNING_LEVEL_SCALE * rms; } bool LLWebRTCVoiceClient::deviceSettingsAvailable() @@ -824,6 +862,11 @@ void LLWebRTCVoiceClient::setHidden(bool hidden) if (inSpatialChannel()) { + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setMute(mHidden || mMuteMic, + mHidden ? 0 : SET_HIDDEN_RESTORE_DELAY_MS); // delay 200ms so as to not pile up mutes/unmutes. + } if (mHidden) { // get out of the channel entirely @@ -990,7 +1033,6 @@ void LLWebRTCVoiceClient::updatePosition(void) { if (participant->mRegion != region->getRegionID()) { participant->mRegion = region->getRegionID(); - setMuteMic(mMuteMic); } } } @@ -1115,13 +1157,14 @@ void LLWebRTCVoiceClient::sendPositionUpdate(bool force) // Update our own volume on our participant, so it'll show up // in the UI. This is done on all sessions, so switching // sessions retains consistent volume levels. -void LLWebRTCVoiceClient::updateOwnVolume() { - F32 audio_level = 0.0; - if (!mMuteMic && !mTuningMode) +void LLWebRTCVoiceClient::updateOwnVolume() +{ + F32 audio_level = 0.0f; + if (!mMuteMic) { - audio_level = getAudioLevel(); + float rms = mWebRTCDeviceInterface->getPeerConnectionAudioLevel(); + audio_level = LEVEL_START_POINT - LEVEL_SCALE * rms; } - sessionState::for_each(boost::bind(predUpdateOwnVolume, _1, audio_level)); } @@ -1518,6 +1561,17 @@ void LLWebRTCVoiceClient::setMuteMic(bool muted) } mMuteMic = muted; + + if (mIsInTuningMode) + { + return; + } + + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setMute(muted, muted ? MUTE_FADE_DELAY_MS : 0); // delay for 40ms on mute to allow buffers to empty + } + // when you're hidden, your mic is always muted. if (!mHidden) { @@ -1556,7 +1610,10 @@ void LLWebRTCVoiceClient::setMicGain(F32 gain) if (gain != mMicGain) { mMicGain = gain; - mWebRTCDeviceInterface->setPeerConnectionGain(gain); + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setMicGain(gain); + } } } @@ -2900,9 +2957,13 @@ bool LLVoiceWebRTCConnection::connectionStateMachine() } // else was already posted by llwebrtc::terminate(). break; + } + case VOICE_STATE_WAIT_FOR_CLOSE: break; + case VOICE_STATE_CLOSED: + { if (!mShutDown) { mVoiceConnectionState = VOICE_STATE_START_SESSION; diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h index f93086cea7..4c40ebcffb 100644 --- a/indra/newview/llvoicewebrtc.h +++ b/indra/newview/llvoicewebrtc.h @@ -444,10 +444,6 @@ public: private: - // helper function to retrieve the audio level - // Used in multiple places. - float getAudioLevel(); - // Coroutine support methods //--- void voiceConnectionCoro(); @@ -458,7 +454,6 @@ private: LL::WorkQueue::weak_t mMainQueue; - bool mTuningMode; F32 mTuningMicGain; int mTuningSpeakerVolume; bool mDevicesListUpdated; // set to true when the device list has been updated diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1a6056fddb..0c369d6926 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -350,6 +350,9 @@ void validate_framebuffer_object(); bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false) { U32 orm = GL_RGBA8; +/* + U32 norm = GL_RGBA16; +*/ U32 norm = GL_RGBA16F; U32 emissive = GL_RGB16F; @@ -950,6 +953,10 @@ bool LLPipeline::allocateScreenBufferInternal(U32 resX, U32 resY, U32 type_) mSceneMap.release(); } +/* + mPostPingMap.allocate(resX, resY, GL_RGBA); + mPostPongMap.allocate(resX, resY, GL_RGBA); +*/ if((hdr && MPColorPrecision == 2) || mHDRDisplay) { mPostMaps[0].allocate(resX, resY, screenFormat); @@ -1243,6 +1250,10 @@ void LLPipeline::releaseGLBuffers() mWaterExclusionMask.release(); +/* + mPostPingMap.release(); + mPostPongMap.release(); +*/ mPostMaps[0].release(); mPostMaps[1].release(); @@ -7373,13 +7384,15 @@ void LLPipeline::generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool extern LLPointer<LLImageGL> gEXRImage; -void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst) +void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst, bool gamma_correct) { +/* + LL_PROFILE_GPU_ZONE("tonemap"); +*/ + dst->bindTarget("tonemap", 1); // gamma correct lighting { - LL_PROFILE_GPU_ZONE("tonemap"); - static LLCachedControl<bool> buildNoPost(gSavedSettings, "RenderDisablePostProcessing", false); LLGLDepthTest depth(GL_FALSE, GL_FALSE); @@ -7391,17 +7404,33 @@ void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst) LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); bool no_post = gSnapshotNoPost || psky->getReflectionProbeAmbiance(should_auto_adjust) == 0.f || (buildNoPost && gFloaterTools && gFloaterTools->isAvailable()); - LLGLSLShader& shader = no_post ? gNoPostTonemapProgram : gDeferredPostTonemapProgram; + LLGLSLShader* shader = nullptr; + if(gamma_correct) + { + bool legacy_gamma = psky->getReflectionProbeAmbiance(should_auto_adjust) == 0.f; + if(legacy_gamma) + { + shader = no_post ? &gNoPostTonemapLegacyGammaCorrectProgram : &gDeferredPostTonemapLegacyGammaCorrectProgram; + } + else + { + shader = no_post ? &gNoPostTonemapGammaCorrectProgram : &gDeferredPostTonemapGammaCorrectProgram; + } + } + else + { + shader = no_post ? &gNoPostTonemapProgram : &gDeferredPostTonemapProgram; + } - shader.bind(); + shader->bind(); //S32 channel = 0; - shader.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_POINT); + shader->bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, src, false, LLTexUnit::TFO_POINT); - shader.bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap); + shader->bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap); - shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)src->getWidth(), (GLfloat)src->getHeight()); + shader->uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, (GLfloat)src->getWidth(), (GLfloat)src->getHeight()); static LLCachedControl<F32> exposure(gSavedSettings, "RenderExposure", 1.f); @@ -7411,17 +7440,18 @@ void LLPipeline::tonemap(LLRenderTarget* src, LLRenderTarget* dst) static LLStaticHashedString tonemap_mix("tonemap_mix"); static LLStaticHashedString tonemap_type("tonemap_type"); - shader.uniform1f(s_exposure, e); + shader->uniform1f(s_exposure, e); static LLCachedControl<U32> tonemap_type_setting(gSavedSettings, "RenderTonemapType", 0U); - shader.uniform1i(tonemap_type, tonemap_type_setting); - shader.uniform1f(tonemap_mix, psky->getTonemapMix(should_auto_adjust())); + shader->uniform1i(tonemap_type, tonemap_type_setting); + shader->uniform1f(tonemap_mix, psky->getTonemapMix(should_auto_adjust())); renderTriangle(); - //shader.unbindTexture(LLShaderMgr::DEFERRED_DIFFUSE); - //shader.unbindTexture(LLShaderMgr::EXPOSURE_MAP); - shader.unbind(); +/* + gGL.getTexUnit(channel)->unbind(src->getUsage()); +*/ + shader->unbind(); } dst->flush(); LOG_GLERROR("LLPipeline::tonemap()"); @@ -7431,8 +7461,17 @@ void LLPipeline::gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst) { LLGLDepthTest depth(GL_FALSE, GL_FALSE); +/* + LL_PROFILE_GPU_ZONE("gamma correct"); + + dst->bindTarget(); +*/ // gamma correct lighting { +/* + LLGLDepthTest depth(GL_FALSE, GL_FALSE); +*/ + LL_PROFILE_GPU_ZONE("gamma correct"); dst->bindTarget("gammaCorrect", 1); @@ -7500,11 +7539,15 @@ void LLPipeline::copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* void LLPipeline::generateGlow(LLRenderTarget* src) { + LL_PROFILE_GPU_ZONE("glow generate"); if (sRenderGlow) { LL_PROFILE_GPU_ZONE("glow"); LL_RECORD_BLOCK_TIME(FTM_RENDER_GLOW); +/* + mGlow[2].bindTarget(); +*/ mGlow[2].bindTarget("mGlow[2]", 1); mGlow[2].clear(); @@ -7612,12 +7655,21 @@ void LLPipeline::generateGlow(LLRenderTarget* src) bool LLPipeline::applyCAS(LLRenderTarget* src, LLRenderTarget* dst) { static LLCachedControl<F32> cas_sharpness(gSavedSettings, "RenderCASSharpness", 0.4f); - if (cas_sharpness == 0.0f || !gCASProgram.isComplete()) + LL_PROFILE_GPU_ZONE("cas"); + if (cas_sharpness == 0.0f || !gCASProgram.isComplete() || !gCASLegacyGammaProgram.isComplete()) { return false; } LLGLSLShader* sharpen_shader = &gCASProgram; + static LLCachedControl<bool> should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", false); + + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); + bool legacy_gamma = psky->getReflectionProbeAmbiance(should_auto_adjust) == 0.f; + if(legacy_gamma) + { + sharpen_shader = &gCASLegacyGammaProgram; + } // Bind setup: dst->bindTarget("applyCAS", 1); @@ -7690,6 +7742,7 @@ bool LLPipeline::generateFXAABuffer(LLRenderTarget* src) bool LLPipeline::applyFXAA(LLRenderTarget* src, LLRenderTarget* dst) { + LL_PROFILE_GPU_ZONE("FXAA"); { llassert(!gCubeSnapshot); bool multisample = RenderFSAAType == 1 && gFXAAProgram[0].isComplete() && mFXAAMap.isComplete(); @@ -7789,7 +7842,7 @@ bool LLPipeline::generateSMAABuffers(LLRenderTarget* src) // Present everything. if (multisample) { - LL_PROFILE_GPU_ZONE("aa"); + LL_PROFILE_GPU_ZONE("SMAA Edge"); static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U); U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U); @@ -7830,6 +7883,7 @@ bool LLPipeline::generateSMAABuffers(LLRenderTarget* src) gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); } + gGL.getTexUnit(channel)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); } renderTriangle(); @@ -7889,6 +7943,7 @@ bool LLPipeline::generateSMAABuffers(LLRenderTarget* src) bool LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst) { + LL_PROFILE_GPU_ZONE("SMAA"); llassert(!gCubeSnapshot); bool multisample = false; @@ -7901,7 +7956,6 @@ bool LLPipeline::applySMAA(LLRenderTarget* src, LLRenderTarget* dst) if(!multisample) return false; { - LL_PROFILE_GPU_ZONE("aa"); static LLCachedControl<U32> aa_quality(gSavedSettings, "RenderFSAASamples", 0U); U32 fsaa_quality = std::clamp(aa_quality(), 0U, 3U); @@ -7970,8 +8024,12 @@ void LLPipeline::copyRenderTarget(LLRenderTarget* src, LLRenderTarget* dst) void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst) { - // Go ahead and do our glow combine here in our destination. We blit this later into the front buffer. + LL_PROFILE_GPU_ZONE("glow combine"); +/* + // Go ahead and do our glow combine here in our destination. We blit this later into the front buffer. + dst->bindTarget(); +*/ dst->bindTarget("combineGlow", 1); { @@ -7990,6 +8048,7 @@ void LLPipeline::combineGlow(LLRenderTarget* src, LLRenderTarget* dst) bool LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) { + LL_PROFILE_GPU_ZONE("dof"); { bool dof_enabled = (RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) && @@ -8002,7 +8061,6 @@ bool LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) if (dof_enabled) { - LL_PROFILE_GPU_ZONE("dof"); LLGLDisable blend(GL_BLEND); // depth of field focal plane calculations @@ -8334,10 +8392,29 @@ void LLPipeline::renderFinalize() generateExposure(&mLuminanceMap, &mExposureMap); - tonemap(&mRT->screen, &mRT->deferredLight); +/* + static LLCachedControl<F32> cas_sharpness(gSavedSettings, "RenderCASSharpness", 0.4f); + bool apply_cas = cas_sharpness != 0.0f && gCASProgram.isComplete() && gCASLegacyGammaProgram.isComplete(); + + tonemap(&mRT->screen, apply_cas ? &mRT->deferredLight : &mPostPingMap, !apply_cas); + + if (apply_cas) + { + // Gamma Corrects + applyCAS(&mRT->deferredLight, &mPostPingMap); + } +*/ + + tonemap(&mRT->screen, &mRT->deferredLight, false); postHDRTarget = &mRT->deferredLight; } } +/* + else + { + gammaCorrect(&mRT->screen, &mPostPingMap); + } +*/ gammaCorrect(postHDRTarget, &mPostMaps[1 - activeRT]); activeRT = 1 - activeRT; @@ -8352,6 +8429,44 @@ void LLPipeline::renderFinalize() } } +/* + LLVertexBuffer::unbind(); + + generateGlow(&mPostPingMap); + + LLRenderTarget* sourceBuffer = &mPostPingMap; + LLRenderTarget* targetBuffer = &mPostPongMap; + + combineGlow(sourceBuffer, targetBuffer); + std::swap(sourceBuffer, targetBuffer); + + gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft; + gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom; + gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth(); + gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight(); + glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]); + + if((RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) && + RenderDepthOfField && + !gCubeSnapshot) + { + renderDoF(sourceBuffer, targetBuffer); + std::swap(sourceBuffer, targetBuffer); + } + + if (RenderFSAAType == 1) + { + applyFXAA(sourceBuffer, targetBuffer); + std::swap(sourceBuffer, targetBuffer); + } + else if (RenderFSAAType == 2) + { + generateSMAABuffers(sourceBuffer); + applySMAA(sourceBuffer, targetBuffer); + std::swap(sourceBuffer, targetBuffer); + } +*/ + combineGlow(&mPostMaps[activeRT], &mPostMaps[1 - activeRT]); activeRT = 1 - activeRT; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 8e18fb419f..41e428fce9 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -158,7 +158,7 @@ public: void copyScreenSpaceReflections(LLRenderTarget* src, LLRenderTarget* dst); void generateLuminance(LLRenderTarget* src, LLRenderTarget* dst); void generateExposure(LLRenderTarget* src, LLRenderTarget* dst, bool use_history = true); - void tonemap(LLRenderTarget* src, LLRenderTarget* dst); + void tonemap(LLRenderTarget* src, LLRenderTarget* dst, bool gamma_correct); void gammaCorrect(LLRenderTarget* src, LLRenderTarget* dst); void generateGlow(LLRenderTarget* src); bool applyCAS(LLRenderTarget* src, LLRenderTarget* dst); @@ -740,7 +740,10 @@ public: LLRenderTarget mBloomBlur[2]; // tonemapped and gamma corrected render ready for post - //LLRenderTarget mPostMap; +/* + LLRenderTarget mPostPingMap; + LLRenderTarget mPostPongMap; +*/ LLRenderTarget mPostMaps[2]; // FXAA helper target diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml index 2e1dfa00c7..53796f0959 100644 --- a/indra/newview/skins/default/xui/en/floater_web_content.xml +++ b/indra/newview/skins/default/xui/en/floater_web_content.xml @@ -178,7 +178,7 @@ width="22"> <button.commit_callback function="WebContent.TestURL" - parameter="https://sl-viewer-media-system.s3.amazonaws.com/index.html"/> + parameter="https://sl-viewer-media-system.s3.amazonaws.com/bookmarks/index.html"/> </button> </layout_panel> <layout_panel diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml index d8ef139d37..f01dee36ce 100644 --- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml @@ -687,61 +687,6 @@ parameter="remove_from_favorites" /> </menu_item_call> <menu - label="Use as default for" - layout="topleft" - name="upload_def"> - <menu_item_call - label="Image uploads" - layout="topleft" - name="Image uploads"> - <menu_item_call.on_click - function="Inventory.FileUploadLocation" - parameter="texture" /> - <menu_item_call.on_visible - function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call - label="Sound uploads" - layout="topleft" - name="Sound uploads"> - <menu_item_call.on_click - function="Inventory.FileUploadLocation" - parameter="sound" /> - <menu_item_call.on_visible - function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call - label="Animation uploads" - layout="topleft" - name="Animation uploads"> - <menu_item_call.on_click - function="Inventory.FileUploadLocation" - parameter="animation" /> - <menu_item_call.on_visible - function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call - label="Model uploads" - layout="topleft" - name="Model uploads"> - <menu_item_call.on_click - function="Inventory.FileUploadLocation" - parameter="model" /> - <menu_item_call.on_visible - function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - </menu> - <menu_item_call - label="Use as favorite folder" - layout="topleft" - name="Set favorite folder"> - <menu_item_call.on_click - function="Inventory.SetFavoriteFolder" - parameter="favorite" /> - <menu_item_call.on_visible - function="Inventory.CanSetFavoriteFolder" /> - </menu_item_call> - <menu label="Upload to folder" layout="topleft" name="upload_options"> @@ -822,54 +767,79 @@ label="Use as default for" layout="topleft" name="upload_def"> - <menu_item_call + <menu_item_check label="Image uploads" layout="topleft" name="Image uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_texture" /> - <menu_item_call.on_visible + <on_visible function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_texture" /> + </menu_item_check> + <menu_item_check label="Sound uploads" layout="topleft" name="Sound uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_sound" /> - <menu_item_call.on_visible + <on_visible function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_sound" /> + </menu_item_check> + <menu_item_check label="Animation uploads" layout="topleft" name="Animation uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_animation" /> - <menu_item_call.on_visible + <on_visible function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_animation" /> + </menu_item_check> + <menu_item_check label="Model uploads" layout="topleft" name="Model uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_model" /> - <menu_item_call.on_visible + <on_visible function="Inventory.CanSetUploadLocation" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_model" /> + </menu_item_check> + <menu_item_check label="PBR material uploads" layout="topleft" name="PBR uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_pbr_material" /> - </menu_item_call> + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_pbr_material" /> + </menu_item_check> + <menu_item_check + label="Use as favorite folder" + layout="topleft" + name="Set favorite folder"> + <on_click + function="Inventory.SetFavoriteFolder" + parameter="favorite" /> + <on_visible + function="Inventory.CanSetFavoriteFolder" /> + </menu_item_check> </menu> <menu_item_separator layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 28569c1557..087424b469 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -1064,46 +1064,61 @@ label="Use as default for" layout="topleft" name="upload_def"> - <menu_item_call + <menu_item_check label="Image uploads" layout="topleft" name="Image uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_texture" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_texture" /> + </menu_item_check> + <menu_item_check label="Sound uploads" layout="topleft" name="Sound uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_sound" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_sound" /> + </menu_item_check> + <menu_item_check label="Animation uploads" layout="topleft" name="Animation uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_animation" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_animation" /> + </menu_item_check> + <menu_item_check label="Model uploads" layout="topleft" name="Model uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_model" /> - </menu_item_call> - <menu_item_call + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_model" /> + </menu_item_check> + <menu_item_check label="PBR material uploads" layout="topleft" name="PBR uploads"> - <menu_item_call.on_click + <on_click function="Inventory.FileUploadLocation" parameter="def_pbr_material" /> - </menu_item_call> + <on_check + function="Inventory.FileUploadLocation.Check" + parameter="def_pbr_material" /> + </menu_item_check> </menu> <menu_item_call label="Use as favorite folder" diff --git a/indra/newview/skins/default/xui/en/menu_media_ctrl.xml b/indra/newview/skins/default/xui/en/menu_media_ctrl.xml index f9864637a0..e687ae93e8 100644 --- a/indra/newview/skins/default/xui/en/menu_media_ctrl.xml +++ b/indra/newview/skins/default/xui/en/menu_media_ctrl.xml @@ -40,4 +40,12 @@ <menu_item_call.on_click function="Open.WebInspector" /> </menu_item_call> + <menu_item_call + label="Show Source" + layout="topleft" + name="show_page_source" + visible="false"> + <menu_item_call.on_click + function="Open.ShowSource" /> + </menu_item_call> </context_menu> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 741db1139e..d16f427530 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -626,12 +626,16 @@ class Windows_x86_64_Manifest(ViewerManifest): with self.prefix(src=os.path.join(pkgdir, 'bin', config)): self.path("chrome_elf.dll") self.path("d3dcompiler_47.dll") + self.path("dxcompiler.dll") + self.path("dxil.dll") self.path("libcef.dll") self.path("libEGL.dll") self.path("libGLESv2.dll") - self.path("dullahan_host.exe") - self.path("snapshot_blob.bin") self.path("v8_context_snapshot.bin") + self.path("vk_swiftshader.dll") + self.path("vk_swiftshader_icd.json") + self.path("vulkan-1.dll") + self.path("dullahan_host.exe") # MSVC DLLs needed for CEF and have to be in same directory as plugin with self.prefix(src=os.path.join(self.args['build'], os.pardir, @@ -863,14 +867,29 @@ class Darwin_x86_64_Manifest(ViewerManifest): # CEF framework goes inside Contents/Frameworks. # Remember where we parked this car. - with self.prefix(src="", dst="Frameworks"): - CEF_framework = "Chromium Embedded Framework.framework" - self.path2basename(relpkgdir, CEF_framework) - CEF_framework = self.dst_path_of(CEF_framework) + with self.prefix(src=relpkgdir, dst="Frameworks"): + self.path("libndofdev.dylib") + if self.args.get('bugsplat'): self.path2basename(relpkgdir, "BugsplatMac.framework") + # OpenAL dylibs + if self.args['openal'] == 'ON': + for libfile in ( + "libopenal.dylib", + "libalut.dylib", + ): + self.path(libfile) + + # WebRTC libraries + with self.prefix(src=os.path.join(self.args['build'], os.pardir, + 'sharedlibs', self.args['buildtype'], 'Resources')): + for libfile in ( + 'libllwebrtc.dylib', + ): + self.path(libfile) + with self.prefix(dst="MacOS"): executable = self.dst_path_of(self.channel()) if self.args.get('bugsplat'): @@ -930,16 +949,12 @@ class Darwin_x86_64_Manifest(ViewerManifest): self.path("*.png") self.path("*.gif") - with self.prefix(src=relpkgdir, dst=""): - self.path("libndofdev.dylib") - with self.prefix(src_dst="cursors_mac"): self.path("*.tif") self.path("licenses-mac.txt", dst="licenses.txt") self.path("featuretable_mac.txt") self.path("cube.dae") - self.path("SecondLife.nib") with self.prefix(src=pkgdir,dst=""): self.path("ca-bundle.crt") @@ -992,20 +1007,6 @@ class Darwin_x86_64_Manifest(ViewerManifest): print("Skipping %s" % dst) return added - # WebRTC libraries - with self.prefix(src=os.path.join(self.args['build'], os.pardir, - 'sharedlibs', self.args['buildtype'], 'Resources')): - for libfile in ( - 'libllwebrtc.dylib', - ): - self.path(libfile) - - oldpath = os.path.join("@rpath", libfile) - self.run_command( - ['install_name_tool', '-change', oldpath, - '@executable_path/../Resources/%s' % libfile, - executable]) - # dylibs is a list of all the .dylib files we expect to need # in our bundled sub-apps. For each of these we'll create a # symlink from sub-app/Contents/Resources to the real .dylib. @@ -1030,20 +1031,6 @@ class Darwin_x86_64_Manifest(ViewerManifest): ): self.path2basename(relpkgdir, libfile) - # OpenAL dylibs - if self.args['openal'] == 'ON': - for libfile in ( - "libopenal.dylib", - "libalut.dylib", - ): - dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile) - - oldpath = os.path.join("@rpath", libfile) - self.run_command( - ['install_name_tool', '-change', oldpath, - '@executable_path/../Resources/%s' % libfile, - executable]) - # our apps executable_path = {} embedded_apps = [ (os.path.join("llplugin", "slplugin"), "SLPlugin.app") ] @@ -1054,123 +1041,34 @@ class Darwin_x86_64_Manifest(ViewerManifest): executable_path[app] = \ self.dst_path_of(os.path.join(app, "Contents", "MacOS")) - # our apps dependencies on shared libs - # for each app, for each dylib we collected in dylibs, - # create a symlink to the real copy of the dylib. - with self.prefix(dst=os.path.join(app, "Contents", "Resources")): - for libfile in dylibs: - self.relsymlinkf(os.path.join(libfile_parent, libfile)) - # Dullahan helper apps go inside SLPlugin.app with self.prefix(dst=os.path.join( "SLPlugin.app", "Contents", "Frameworks")): - - frameworkname = 'Chromium Embedded Framework' - - # This code constructs a relative symlink from the - # target framework folder back to the real CEF framework. - # It needs to be relative so that the symlink still works when - # (as is normal) the user moves the app bundle out of the DMG - # and into the /Applications folder. Note we pass catch=False, - # letting the uncaught exception terminate the process, since - # without this symlink, Second Life web media can't possibly work. - - # It might seem simpler just to symlink Frameworks back 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. - - # from SLPlugin.app/Contents/Frameworks/Chromium Embedded - # Framework.framework back to - # $viewer_app/Contents/Frameworks/Chromium Embedded Framework.framework - SLPlugin_framework = self.relsymlinkf(CEF_framework, catch=False) - - # for all the multiple CEF/Dullahan (as of CEF 76) helper app bundles we need: - for helper in ( - "DullahanHelper", - "DullahanHelper (GPU)", - "DullahanHelper (Renderer)", - "DullahanHelper (Plugin)", - ): - # app is the directory name of the app bundle, with app/Contents/MacOS/helper as the executable - app = helper + ".app" - - # copy DullahanHelper.app - self.path2basename(relpkgdir, app) - - # and fix that up with a Frameworks/CEF symlink too - with self.prefix(dst=os.path.join( - app, 'Contents', 'Frameworks')): - # from Dullahan Helper *.app/Contents/Frameworks/Chromium Embedded - # Framework.framework back to - # SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework - # Since SLPlugin_framework is itself a - # symlink, don't let relsymlinkf() resolve -- - # explicitly call relpath(symlink=True) and - # create that symlink here. - helper_framework = \ - self.symlinkf(self.relpath(SLPlugin_framework, symlink=True), catch=False) - - # change_command includes install_name_tool, the - # -change subcommand and the old framework rpath - # stamped into the executable. To use it with - # run_command(), we must still append the new - # framework path and the pathname of the - # executable to change. - change_command = [ - 'install_name_tool', '-change', - '@rpath/Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework'] - - with self.prefix(dst=os.path.join( - app, 'Contents', 'MacOS')): - # Now self.get_dst_prefix() is, at runtime, - # @executable_path. Locate the helper app - # framework (which is a symlink) from here. - newpath = os.path.join( - '@executable_path', - self.relpath(helper_framework, symlink=True), - frameworkname) - # and restamp the Dullahan Helper executable itself - self.run_command( - change_command + - [newpath, self.dst_path_of(helper)]) - - # SLPlugin plugins - with self.prefix(dst="llplugin"): - dylibexecutable = 'media_plugin_cef.dylib' + # copy CEF plugin self.path2basename("../media_plugins/cef/" + self.args['configuration'], - dylibexecutable) - - # Do this install_name_tool *after* media plugin is copied over. - # Locate the framework lib executable -- relative to - # SLPlugin.app/Contents/MacOS, which will be our - # @executable_path at runtime! - newpath = os.path.join( - '@executable_path', - self.relpath(SLPlugin_framework, executable_path["SLPlugin.app"], - symlink=True), - frameworkname) - # restamp media_plugin_cef.dylib - self.run_command( - change_command + - [newpath, self.dst_path_of(dylibexecutable)]) - - # copy LibVLC plugin itself - dylibexecutable = 'media_plugin_libvlc.dylib' - self.path2basename("../media_plugins/libvlc/" + self.args['configuration'], dylibexecutable) - # add @rpath for the correct LibVLC subfolder - self.run_command(['install_name_tool', '-add_rpath', '@loader_path/lib', self.dst_path_of(dylibexecutable)]) - - # copy LibVLC dynamic libraries - with self.prefix(src=relpkgdir, dst="lib"): + "media_plugin_cef.dylib") + + # copy LibVLC plugin + self.path2basename("../media_plugins/libvlc/" + self.args['configuration'], + "media_plugin_libvlc.dylib") + + # CEF framework and vlc libraries goes inside Contents/Frameworks. + with self.prefix(src=os.path.join(pkgdir, 'lib', 'release')): + self.path("Chromium Embedded Framework.framework") + self.path("DullahanHelper.app") + self.path("DullahanHelper (Alerts).app") + self.path("DullahanHelper (GPU).app") + self.path("DullahanHelper (Renderer).app") + self.path("DullahanHelper (Plugin).app") + + # Copy libvlc self.path( "libvlc*.dylib*" ) # copy LibVLC plugins folder - with self.prefix(src='plugins', dst=""): + with self.prefix(src='plugins', dst="plugins"): self.path( "*.dylib" ) self.path( "plugins.dat" ) + def package_finish(self): imagename = self.installer_base_name() self.set_github_output('imagename', imagename) |
