diff options
Diffstat (limited to 'indra/newview')
66 files changed, 1510 insertions, 509 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 750bd3a523..dabad38f99 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -403,6 +403,7 @@ set(viewer_SOURCE_FILES llmaniprotate.cpp llmanipscale.cpp llmaniptranslate.cpp + llfloatermarketplace.cpp llmarketplacefunctions.cpp llmarketplacenotifications.cpp llmaterialeditor.cpp @@ -951,6 +952,7 @@ set(viewer_HEADER_FILES llfloaterlinkreplace.h llfloaterloadprefpreset.h llfloatermap.h + llfloatermarketplace.h llfloatermarketplacelistings.h llfloatermediasettings.h llfloatermemleak.h @@ -1447,7 +1449,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}\n") set_source_files_properties( - llversioninfo.cpp tests/llversioninfo_test.cpp + llversioninfo.cpp tests/llversioninfo_test.cpp PROPERTIES COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}" # see BuildVersion.cmake ) @@ -1665,7 +1667,7 @@ endif (WINDOWS) file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE ${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES}) -set_source_files_properties(${viewer_XUI_FILES} +set_source_files_properties(${viewer_XUI_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES}) @@ -1673,7 +1675,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES}) file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl) source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES}) -set_source_files_properties(${viewer_SHADER_FILES} +set_source_files_properties(${viewer_SHADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES}) @@ -1698,7 +1700,7 @@ set(viewer_APPSETTINGS_FILES app_settings/toolbars.xml app_settings/trees.xml app_settings/viewerart.xml - ${CMAKE_SOURCE_DIR}/../etc/message.xml + app_settings/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg #packages-info.txt featuretable.txt @@ -1885,7 +1887,7 @@ if (WINDOWS) set(COPY_INPUT_DEPENDENCIES # The following commented dependencies are determined at variably at build time. Can't do this here. - ${CMAKE_SOURCE_DIR}/../etc/message.xml + app_settings/message.xml ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg ${SHARED_LIB_STAGING_DIR}/openjp2.dll ${SHARED_LIB_STAGING_DIR}/llwebrtc.dll @@ -2107,7 +2109,7 @@ endif (WINDOWS) # one of these being libz where you can find four or more versions in play # at once. On Linux, libz can be found at link and run time via a number # of paths: -# +# # => -lfreetype # => libz.so.1 (on install machine, not build) # => -lSDL @@ -2251,7 +2253,7 @@ foreach(elem ${country_codes}) set(emoji_mapping_src_file "${emoji_mapping_src_folder}/${elem}/emoji_characters.xml") set(emoji_mapping_dst_file - "${emoji_mapping_dst_folder}/${elem}/emoji_characters.xml") + "${emoji_mapping_dst_folder}/${elem}/emoji_characters.xml") configure_file(${emoji_mapping_src_file} ${emoji_mapping_dst_file} COPYONLY) endforeach() @@ -2427,7 +2429,7 @@ if (DARWIN) # https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/ set(CMAKE_MACOSX_RPATH 1) - + set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES @@ -2477,9 +2479,6 @@ if (DARWIN) --grid=${GRID} --source=${CMAKE_CURRENT_SOURCE_DIR} --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt - DEPENDS - ${VIEWER_BINARY_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) endif () @@ -2533,8 +2532,6 @@ if (DARWIN) --touch=${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/.${product}.bat --versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt ${SIGNING_SETTING} - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ) endif () endif (PACKAGE) @@ -2578,7 +2575,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym" XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs") - + add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}" COMMAND "zip" ARGS @@ -2613,7 +2610,7 @@ if (LL_TESTS) # llremoteparcelrequest.cpp llviewerhelputil.cpp llversioninfo.cpp -# llvocache.cpp +# llvocache.cpp llworldmap.cpp llworldmipmap.cpp ) @@ -2622,7 +2619,7 @@ if (LL_TESTS) llworldmap.cpp llworldmipmap.cpp PROPERTIES - LL_TEST_ADDITIONAL_SOURCE_FILES + LL_TEST_ADDITIONAL_SOURCE_FILES tests/llviewertexture_stub.cpp #llviewertexturelist.cpp ) @@ -2656,7 +2653,7 @@ if (LL_TESTS) llworldmap.cpp llworldmipmap.cpp PROPERTIES - LL_TEST_ADDITIONAL_SOURCE_FILES + LL_TEST_ADDITIONAL_SOURCE_FILES tests/llviewertexture_stub.cpp ) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 5ae53bcd3a..2a13ea1d93 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -54,7 +54,6 @@ if (DARWIN) install(FILES ${SCRIPTS_DIR}/messages/message_template.msg - ${SCRIPTS_DIR}/../etc/message.xml ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt DESTINATION app_settings ) @@ -109,7 +108,6 @@ elseif (WINDOWS) install(FILES ${SCRIPTS_DIR}/messages/message_template.msg - ${SCRIPTS_DIR}/../etc/message.xml ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt DESTINATION app_settings ) @@ -250,7 +248,6 @@ endif (IS_ARTWORK_PRESENT) ) install(FILES ${SCRIPTS_DIR}/messages/message_template.msg - ${SCRIPTS_DIR}/../etc/message.xml ${CMAKE_CURRENT_BINARY_DIR}/contributors.txt DESTINATION share/${VIEWER_BINARY_NAME}/app_settings ) diff --git a/indra/newview/app_settings/message.xml b/indra/newview/app_settings/message.xml new file mode 100755 index 0000000000..dee3fd72dd --- /dev/null +++ b/indra/newview/app_settings/message.xml @@ -0,0 +1,751 @@ +<?xml version="1.0"?> +<llsd> + <map> + <key>serverDefaults</key> + <!-- + a map of server names to default message transport + --> + <map> + <key>simulator</key> + <string>template</string> + + <key>spaceserver</key> + <string>template</string> + + <key>dataserver</key> + <string>template</string> + + <key>logDataserver</key> + <string>template</string> + + <key>inventoryDataserver</key> + <string>template</string> + + <key>rpcserver</key> + <string>template</string> + + <key>mapserver</key> + <string>template</string> + + <key>viewer</key> + <string>template</string> + + </map> + <key>messages</key> + <!-- + a map of individual message names that override defaults + --> + <map> + <!-- + Circuit related messages + --> + <key>PacketAck</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>OpenCircuit</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>CloseCircuit</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>StartPingCheck</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>CompletePingCheck</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>AddCircuitCode</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>UseCircuitCode</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>CreateTrustedCircuit</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RequestTrustedCircuit</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <!-- + Simulator to Launcher + until we get a HTTP server in the launcher + --> + <key>ReportAutosaveCrash</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>SetCPURatio</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- + Viewer to simulator messages sent before UntrustedSimulatorMessage cap received. + --> + <key>CompleteAgentMovement</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>EconomyDataRequest</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ViewerEffect</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RegionHandshakeReply</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- + Viewer to simulator messages sent unreliably. + --> + <key>AgentUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- + Messages created by LLThrottleGroup clients + --> + <key>ImagePacket</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>LayerData</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectUpdateCached</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectUpdateCompressed</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ImprovedTerseObjectUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>AvatarAnimation</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectAnimation</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>AvatarAppearance</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- Simulator to simulator reliable messages --> + <key>GodKickUser</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RoutedMoneyBalanceReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- Simulator to simulator unreliable messages --> + <key>EdgeDataPacket</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>CoarseLocationUpdate</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + <key>only-send-latest</key> + <boolean>true</boolean> + </map> + + <key>SimulatorLoad</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>EstablishAgentCommunication</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>AgentGroupDataUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>AgentDropGroup</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionStartReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionEventReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ForceCloseChatterBoxSession</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionAgentListUpdates</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxSessionUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ChatterBoxInvitation</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <!-- Client to server --> + <key>ParcelVoiceInfoRequest</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <!-- Server to client --> + <key>DisplayNameUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ParcelVoiceInfo</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ParcelNavigateMedia</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ParcelObjectOwnersReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>ParcelProperties</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>LandStatReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>PlacesReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>SetDisplayNameReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>SimConsoleResponse</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>DirLandReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>avatarnotesrequest</key> + <map> + <key>service_name</key> + <string>avatar-notes</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>avatarclassifiedsrequest</key> + <map> + <key>service_name</key> + <string>avatar-classifieds</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>avatarpicksrequest</key> + <map> + <key>service_name</key> + <string>avatar-pick</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>pickinforequest</key> + <map> + <key>service_name</key> + <string>pick-info</string> + <key>builder</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ProvisionVoiceAccountRequest</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>VoiceSignalingRequest</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + <!-- Server to client --> + <key>RequiredVoiceVersion</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>EnableSimulator</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>TeleportFinish</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>TeleportFailed</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>CrossedRegion</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>NavMeshStatusUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <key>AgentStateUpdate</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + <!-- UDPDeprecated Messages --> + <key>ScriptRunningReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>LandStatReply</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>StartGroupProposal</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>FetchInventoryDescendents</key> + <map> + <key>flavor</key> + <string>template</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>GroupProposalBallot</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>RpcScriptRequestInboundForward</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>false</boolean> + </map> + + <key>ObjectPhysicsProperties</key> + <map> + <key>flavor</key> + <string>llsd</string> + <key>trusted-sender</key> + <boolean>true</boolean> + </map> + + </map> + <key>capBans</key> + <map> + <key>MapLayer</key> + <boolean>false</boolean> + + <key>MapLayerGod</key> + <boolean>false</boolean> + + <key>NewFileAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateGestureAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateNotecardAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateScriptAgentInventory</key> + <boolean>false</boolean> + + <key>UpdateGestureTaskInventory</key> + <boolean>false</boolean> + + <key>UpdateNotecardTaskInventory</key> + <boolean>false</boolean> + + <key>UpdateScriptTaskInventory</key> + <boolean>false</boolean> + + <key>ViewerStartAuction</key> + <boolean>true</boolean> + + <key>ParcelGodReserveForNewbie</key> + <boolean>true</boolean> + + <key>SendUserReport</key> + <boolean>false</boolean> + + <key>SendUserReportWithScreenshot</key> + <boolean>false</boolean> + + <key>RequestTextureDownload</key> + <boolean>true</boolean> + + <key>EventQueueGet</key> + <boolean>false</boolean> + + <key>UntrustedSimulatorMessage</key> + <boolean>false</boolean> + + <key>SendPostcard</key> + <boolean>false</boolean> + + <key>SendPostcard2</key> + <boolean>true</boolean> + + <key>SendPostcard3</key> + <boolean>true</boolean> + + <key>ParcelVoiceInfoRequest</key> + <boolean>false</boolean> + + <key>ChatSessionRequest</key> + <boolean>false</boolean> + + <key>ProvisionVoiceAccountRequest</key> + <boolean>false</boolean> + + <key>VoiceSignalingRequest</key> + <boolean>false</boolean> + + <key>RemoteParcelRequest</key> + <boolean>false</boolean> + + <key>SearchStatTracking</key> + <boolean>false</boolean> + + <key>ParcelPropertiesUpdate</key> + <boolean>false</boolean> + + <key>EstateChangeInfo</key> + <boolean>true</boolean> + + <key>FetchInventoryDescendents2</key> + <boolean>false</boolean> + + <key>FetchInventory2</key> + <boolean>false</boolean> + + <key>FetchLibDescendents2</key> + <boolean>false</boolean> + + <key>FetchLib2</key> + <boolean>false</boolean> + + <key>UploadBakedTexture</key> + <boolean>true</boolean> + + <key>ObjectMedia</key> + <boolean>false</boolean> + + <key>ObjectMediaNavigate</key> + <boolean>false</boolean> + + </map> + + <key>messageBans</key> + <map> + <key>trusted</key> + <map> + </map> + + <key>untrusted</key> + <map> + </map> + </map> + + <key>maxQueuedEvents</key> + <integer>100</integer> + </map> +</llsd> diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index 9c394e19d4..f7a5a20872 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -589,7 +589,9 @@ bool Asset::prep() for (U32 variant = 0; variant < LLGLSLShader::NUM_GLTF_VARIANTS; ++variant) { +#ifdef SHOW_ASSERT U32 attribute_mask = 0; +#endif // for each mesh for (auto& mesh : mMeshes) { @@ -607,7 +609,9 @@ bool Asset::prep() // all primitives of a given variant and material should all have the same attribute mask llassert(attribute_mask == 0 || primitive.mAttributeMask == attribute_mask); +#ifdef SHOW_ASSERT attribute_mask |= primitive.mAttributeMask; +#endif } } } diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 77f24ac6a6..0e36698018 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -164,6 +164,74 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !include "x64.nsh" # for 64bit detection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Substring function
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+!define StrStr "!insertmacro StrStr"
+
+!macro StrStr ResultVar String SubString
+ Push `${String}`
+ Push `${SubString}`
+ Call StrStr
+ Pop `${ResultVar}`
+!macroend
+
+Function StrStr
+
+# After this point:
+# ------------------------------------------
+# $R0 = SubString (input)
+# $R1 = String (input)
+# $R2 = SubStringLen (temp)
+# $R3 = StrLen (temp)
+# $R4 = StartCharPos (temp)
+# $R5 = TempStr (temp)
+# function from nsis.sourceforge.io/StrStr
+
+ ;Get input from user
+ Exch $R0
+ Exch
+ Exch $R1
+ Push $R2
+ Push $R3
+ Push $R4
+ Push $R5
+
+ ;Get "String" and "SubString" length
+ StrLen $R2 $R0
+ StrLen $R3 $R1
+ ;Start "StartCharPos" counter
+ StrCpy $R4 0
+
+ ;Loop until "SubString" is found or "String" reaches its end
+ ${Do}
+ ;Remove everything before and after the searched part ("TempStr")
+ StrCpy $R5 $R1 $R2 $R4
+
+ ;Compare "TempStr" with "SubString"
+ ${IfThen} $R5 == $R0 ${|} ${ExitDo} ${|}
+ ;If not "SubString", this could be "String"'s end
+ ${IfThen} $R4 >= $R3 ${|} ${ExitDo} ${|}
+ ;If not, continue the loop
+ IntOp $R4 $R4 + 1
+ ${Loop}
+
+# After this point:
+# ------------------------------------------
+# $R0 = ResultVar (output)
+
+ ;Remove part before "SubString" on "String" (if there has one)
+ StrCpy $R0 $R1 `` $R4
+
+ ;Return output to user
+ Pop $R5
+ Pop $R4
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Pre-directory page callback
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function dirPre
@@ -190,15 +258,31 @@ Function .onInit # However, SL-10506 complains about the resulting behavior, so the logic below
# is adapted from before we introduced MultiUser.nsh.
+# Check if user specified /D= on the command line
+System::Call 'kernel32::GetCommandLine()t .r0'
+Push $0
+Push " /D="
+Call StrStr
+Pop $1
+${If} $1 != ""
+ # /D= was specified, extract the path
+ # spaces are allowed in path after /D=, it's expected to be the last parameter
+ StrLen $2 $1
+ StrCpy $INSTDIR $1 $2 4 # Skip over " /D="
+ Goto after_instdir
+${EndIf}
+
# if $0 is empty, this is the first time for this viewer name
ReadRegStr $0 SHELL_CONTEXT "${INSTNAME_KEY}" ""
# viewer with this name was installed before
${If} $0 != ""
- # use the value we got from registry as install location
+ # use the value we got from registry as install location
StrCpy $INSTDIR $0
${EndIf}
+after_instdir:
+
Call CheckCPUFlags # Make sure we have SSE2 support
Call CheckWindowsVersion # Don't install On unsupported systems
Push $0
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 4e08f7219d..b6d31c0cae 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1754,7 +1754,6 @@ F32 LLAgentCamera::calcCameraFOVZoomFactor() LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit) { // Compute base camera position and look-at points. - F32 camera_land_height; LLVector3d frame_center_global = !isAgentAvatarValid() ? gAgent.getPositionGlobal() : gAgent.getPosGlobalFromAgent(getAvatarRootPosition()); @@ -1991,10 +1990,11 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit) } } - // Don't let camera go underground - F32 camera_min_off_ground = getCameraMinOffGround(); - camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); - F32 minZ = llmax(F_ALMOST_ZERO, camera_land_height + camera_min_off_ground); + // Don't let camera go underground if constrained + // If not constrained, permit going 1000m below 0, use case: retrieving objects + F32 camera_min_off_ground = getCameraMinOffGround(); // checks isDisableCameraConstraints + F32 camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); + F32 minZ = camera_land_height + camera_min_off_ground; if (camera_position_global.mdV[VZ] < minZ) { camera_position_global.mdV[VZ] = minZ; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 551d4fc5d9..98a1fd740b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4594,6 +4594,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg) } else { + sendSimpleLogoutRequest(); args["MESSAGE"] = big_reason; LLNotificationsUtil::add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect ); } @@ -5374,6 +5375,27 @@ void LLAppViewer::sendLogoutRequest() } } +void LLAppViewer::sendSimpleLogoutRequest() +{ + if (!mLogoutRequestSent && gMessageSystem) + { + gLogoutInProgress = true; + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_LogoutRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gAgent.sendReliableMessage(); + + LL_INFOS("Agent") << "Logging out as agent: " << gAgent.getID() << " Session: " << gAgent.getSessionID() << LL_ENDL; + + gLogoutTimer.reset(); + gLogoutMaxTime = LOGOUT_REQUEST_TIME; + mLogoutRequestSent = true; + } +} + void LLAppViewer::updateNameLookupUrl(const LLViewerRegion * regionp) { if (!regionp || !regionp->capabilitiesReceived()) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 132d7bfe25..e7de2d9b28 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -310,6 +310,10 @@ private: void sendLogoutRequest(); void disconnectViewer(); + // Does not create a marker file. For lost network case, + // to at least attempt to remove the ghost from the world. + void sendSimpleLogoutRequest(); + // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 211bc5f7a9..21a29bb1bb 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -189,7 +189,14 @@ public: std::string url = "secondlife://" + mObjectData["slurl"].asString(); LLUrlAction::teleportToLocation(url); } - + else if (level == "obj_zoom_in") + { + LLUUID obj_id = mObjectData["object_id"]; + if (obj_id.notNull()) + { + handle_zoom_to_object(obj_id); + } + } } bool onObjectIconContextMenuItemVisible(const LLSD& userdata) @@ -203,6 +210,15 @@ public: { return !LLMuteList::getInstance()->isMuted(getAvatarId(), mFrom, LLMute::flagTextChat); } + else if (level == "obj_zoom_in") + { + LLUUID obj_id = mObjectData["object_id"]; + if (obj_id.notNull()) + { + return nullptr != gObjectList.findObject(mAvatarID); + } + return false; + } return false; } diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 550dfeb802..5ac4ce0d52 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -37,6 +37,8 @@ #include "lllocalcliprect.h" #include "lltrans.h" #include "llfloaterimnearbychat.h" +#include "llfloaterworldmap.h" +#include "llviewermenu.h" #include "llviewercontrol.h" #include "llagentdata.h" @@ -75,6 +77,23 @@ public: return true; } + if (verb == "zoomin") + { + if (!handle_zoom_to_object(object_id) && params.size() > 2) + { + // zoom faled, show location + // secondlife:///app/object/object_id/zoomin/{LOCATION}/{COORDS} SLapp + const std::string region_name = LLURI::unescape(params[0].asString()); + S32 x = (params.size() > 1) ? params[1].asInteger() : 128; + S32 y = (params.size() > 2) ? params[2].asInteger() : 128; + S32 z = (params.size() > 3) ? params[3].asInteger() : 0; + + LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z); + LLFloaterReg::showInstance("world_map", "center"); + } + return true; + } + return false; } }; diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 424bb02ae7..7a974fe857 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -144,7 +144,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) gGL.setColorMask(true, true); LLColor3 light_diffuse(0, 0, 0); - F32 light_exp = 0.0f; LLEnvironment& environment = LLEnvironment::instance(); LLSettingsWater::ptr_t pwater = environment.getCurrentWater(); @@ -171,7 +170,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) // Apply magic numbers translating light direction into intensities light_dir.normalize(); F32 ground_proj_sq = light_dir.mV[0] * light_dir.mV[0] + light_dir.mV[1] * light_dir.mV[1]; - light_exp = llmax(32.f, 256.f * powf(ground_proj_sq, 16.0f)); if (0.f < light_diffuse.normalize()) // Normalizing a color? Puzzling... { light_diffuse *= (1.5f + (6.f * ground_proj_sq)); diff --git a/indra/newview/llfloatermarketplace.cpp b/indra/newview/llfloatermarketplace.cpp new file mode 100644 index 0000000000..889daf84ab --- /dev/null +++ b/indra/newview/llfloatermarketplace.cpp @@ -0,0 +1,47 @@ +/** + * @file llfloatermarketplace.cpp + * @brief floater for the Marketplace web site + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatermarketplace.h" +#include "lluictrlfactory.h" + +LLFloaterMarketplace::LLFloaterMarketplace(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterMarketplace::~LLFloaterMarketplace() +{ +} + +bool LLFloaterMarketplace::postBuild() +{ + enableResizeCtrls(true, true, false); + return true; +} + + diff --git a/indra/newview/llfloatermarketplace.h b/indra/newview/llfloatermarketplace.h new file mode 100644 index 0000000000..2ae4d0d64a --- /dev/null +++ b/indra/newview/llfloatermarketplace.h @@ -0,0 +1,40 @@ +/** + * @file llfloatermarketplace.h + * @brief floater for the Marketplace web site + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#pragma once + +#include "llfloater.h" + +class LLFloaterMarketplace: + public LLFloater +{ + friend class LLFloaterReg; +private: + LLFloaterMarketplace(const LLSD& key); + ~LLFloaterMarketplace(); + bool postBuild() override; +}; + diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 99b871b484..d9753596e6 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -758,6 +758,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Forget previous language changes. mLanguageChanged = false; + mLastQualityLevel = gSavedSettings.getU32("RenderQualityPerformance"); // Display selected maturity icons. onChangeMaturity(); @@ -1327,6 +1328,33 @@ void LLFloaterPreference::onCommitWindowedMode() void LLFloaterPreference::onChangeQuality(const LLSD& data) { U32 level = (U32)(data.asReal()); + constexpr U32 LVL_HIGH = 4; + if (level >= LVL_HIGH && mLastQualityLevel < level) + { + constexpr U32 LOW_MEM_THRESHOLD = 4097; + U32 total_mem = (U32Megabytes)LLMemory::getMaxMemKB(); + if (total_mem < LOW_MEM_THRESHOLD) + { + LLSD args; + args["TOTAL_MEM"] = LLSD::Integer(total_mem); + LLNotificationsUtil::add("PreferenceQualityWithLowMemory", args, LLSD(), [this](const LLSD& notification, const LLSD& response) + { + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // If cancel pressed + if (option == 1) + { + constexpr U32 LVL_MED_PLUS = 3; + gSavedSettings.setU32("RenderQualityPerformance", LVL_MED_PLUS); + mLastQualityLevel = LVL_MED_PLUS; + LLFeatureManager::getInstance()->setGraphicsLevel(LVL_MED_PLUS, true); + refreshEnabledGraphics(); + refresh(); + } + } + ); + } + } + mLastQualityLevel = level; LLFeatureManager::getInstance()->setGraphicsLevel(level, true); refreshEnabledGraphics(); refresh(); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 2c357f0551..c2d7d34287 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -218,6 +218,7 @@ private: bool mGotPersonalInfo; bool mLanguageChanged; bool mAvatarDataInitialized; + U32 mLastQualityLevel = 0; std::string mPriorInstantMessageLogPath; bool mOriginalHideOnlineStatus; diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index d3c8bf3451..9762154a26 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -1,11 +1,10 @@ /** * @file llfloatersearch.cpp - * @author Martin Reddy - * @brief Search floater - uses an embedded web browser control + * @brief Floater for Search (update 2025, preload) * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2011, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,68 +26,34 @@ #include "llviewerprecompiledheaders.h" +#include "llfloatersearch.h" + +#include "llagent.h" #include "llcommandhandler.h" #include "llfloaterreg.h" -#include "llfloatersearch.h" -#include "llhttpconstants.h" #include "llmediactrl.h" -#include "llnotificationsutil.h" -#include "lllogininstance.h" -#include "lluri.h" -#include "llagent.h" -#include "llui.h" +#include "lluictrlfactory.h" #include "llviewercontrol.h" #include "llweb.h" // support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps -class LLSearchHandler : public LLCommandHandler -{ -public: - // requires trusted browser to trigger - LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_CLICK_ONLY) { } - bool handle(const LLSD& tokens, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) - { - const size_t parts = tokens.size(); - - // get the (optional) category for the search - std::string collection; - if (parts > 0) - { - collection = tokens[0].asString(); +class LLSearchHandler : public LLCommandHandler { + public: + // requires trusted browser to trigger + LLSearchHandler() : LLCommandHandler("search", UNTRUSTED_CLICK_ONLY) { } + bool handle(const LLSD& tokens, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { + const size_t parts = tokens.size(); + + // open the search floater and perform the requested search + LLFloaterReg::showInstance("search", tokens); + return true; } - - // get the (optional) search string - std::string search_text; - if (parts > 1) - { - search_text = tokens[1].asString(); - } - - // create the LLSD arguments for the search floater - LLFloaterSearch::Params p; - p.search.collection = collection; - p.search.query = LLURI::unescape(search_text); - - // open the search floater and perform the requested search - LLFloaterReg::showInstance("search", p); - return true; - } }; LLSearchHandler gSearchHandler; -LLFloaterSearch::SearchQuery::SearchQuery() -: category("category", ""), - collection("collection", ""), - query("query") -{} - -LLFloaterSearch::LLFloaterSearch(const Params& key) : - LLFloaterWebContent(key), - mSearchGodLevel(0) +LLFloaterSearch::LLFloaterSearch(const LLSD& key) + : LLFloater(key) { - // declare a map that transforms a category name into - // the URL suffix that is used to search that category - mSearchType.insert("standard"); mSearchType.insert("land"); mSearchType.insert("classified"); @@ -100,76 +65,61 @@ LLFloaterSearch::LLFloaterSearch(const Params& key) : mCollectionType.insert("people"); } -bool LLFloaterSearch::postBuild() +LLFloaterSearch::~LLFloaterSearch() { - LLFloaterWebContent::postBuild(); - mWebBrowser->addObserver(this); - - return true; } -void LLFloaterSearch::onOpen(const LLSD& key) +void LLFloaterSearch::onOpen(const LLSD& tokens) { - Params p(key); - p.trusted_content = true; - p.allow_address_entry = false; - - LLFloaterWebContent::onOpen(p); - mWebBrowser->setFocus(true); - search(p.search); + initiateSearch(tokens); } -void LLFloaterSearch::onClose(bool app_quitting) +void LLFloaterSearch::initiateSearch(const LLSD& tokens) { - LLFloaterWebContent::onClose(app_quitting); - // tear down the web view so we don't show the previous search - // result when the floater is opened next time - destroy(); -} + std::string url = gSavedSettings.getString("SearchURL"); -void LLFloaterSearch::godLevelChanged(U8 godlevel) -{ - // search results can change based upon god level - if the user - // changes god level, then give them a warning (we don't refresh - // the search as this might undo any page navigation or - // AJAX-driven changes since the last search). + LLSD subs; - //FIXME: set status bar text + // Setting this substitution here results in a full set of collections being + // substituted into the final URL using the logic from the original search. + subs["TYPE"] = "standard"; - //getChildView("refresh_search")->setVisible( (godlevel != mSearchGodLevel)); -} + const size_t parts = tokens.size(); -void LLFloaterSearch::search(const SearchQuery &p) -{ - if (! mWebBrowser || !p.validateBlock()) + // get the (optional) category for the search + std::string collection; + if (parts > 0) { - return; + collection = tokens[0].asString(); } - // reset the god level warning as we're sending the latest state - getChildView("refresh_search")->setVisible(false); - mSearchGodLevel = gAgent.getGodLevel(); + // get the (optional) search string + std::string search_text; + if (parts > 1) + { + search_text = tokens[1].asString(); + } - // work out the subdir to use based on the requested category - LLSD subs; - if (mSearchType.find(p.category) != mSearchType.end()) + // TODO: where does category get set? I cannot find a reference to + // it in internal docs - might be conflated with values in mSearchType + std::string category; + if (mSearchType.find(category) != mSearchType.end()) { - subs["TYPE"] = p.category; + subs["TYPE"] = category; } else { subs["TYPE"] = "standard"; } - // add the search query string - subs["QUERY"] = LLURI::escape(p.query); + subs["QUERY"] = LLURI::escape(search_text); subs["COLLECTION"] = ""; if (subs["TYPE"] == "standard") { - if (mCollectionType.find(p.collection) != mCollectionType.end()) + if (mCollectionType.find(collection) != mCollectionType.end()) { - subs["COLLECTION"] = "&collection_chosen=" + std::string(p.collection); + subs["COLLECTION"] = "&collection_chosen=" + std::string(collection); } else { @@ -182,30 +132,41 @@ void LLFloaterSearch::search(const SearchQuery &p) } } - // add the user's preferred maturity (can be changed via prefs) - std::string maturity; + // Default to PG + std::string maturity = "g"; if (gAgent.prefersAdult()) { - maturity = "gma"; // PG,Mature,Adult + // PG,Mature,Adult + maturity = "gma"; } else if (gAgent.prefersMature()) { - maturity = "gm"; // PG,Mature - } - else - { - maturity = "g"; // PG + // PG,Mature + maturity = "gm"; } subs["MATURITY"] = maturity; - // add the user's god status + // God status subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0"; - // get the search URL and expand all of the substitutions - // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) - std::string url = gSavedSettings.getString("SearchURL"); + // This call expands a set of generic substitutions like language, viewer version + // etc. and then also does the same with the list of subs passed in. url = LLWeb::expandURLSubstitutions(url, subs); - // and load the URL in the web view - mWebBrowser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + // Naviation to the calculated URL - we know it's HTML so we can + // tell the media system not to bother with the MIME type check. + LLMediaCtrl* search_browser = findChild<LLMediaCtrl>("search_contents"); + search_browser->navigateTo(url, HTTP_CONTENT_TEXT_HTML); +} + +bool LLFloaterSearch::postBuild() +{ + enableResizeCtrls(true, true, false); + + // This call is actioned by the preload code in llViewerWindow + // that creates the search floater during the login process + // using a generic search with no query + initiateSearch(LLSD()); + + return true; } diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index beaac2ad2f..e8a2be4797 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -1,11 +1,10 @@ /** * @file llfloatersearch.h - * @author Martin Reddy - * @brief Search floater - uses an embedded web browser control + * @brief Floater for Search (update 2025, preload) * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2011, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,70 +24,23 @@ * $/LicenseInfo$ */ -#ifndef LL_LLFLOATERSEARCH_H -#define LL_LLFLOATERSEARCH_H +#pragma once -#include "llfloaterwebcontent.h" -#include "llviewermediaobserver.h" +#include "llfloater.h" -#include <string> +class LLFloaterSearch: + public LLFloater { + friend class LLFloaterReg; -class LLMediaCtrl; + public: + void onOpen(const LLSD& key) override; -/// -/// The search floater allows users to perform all search operations. -/// All search functionality is now implemented via web services and -/// so this floater simply embeds a web view and displays the search -/// web page. The browser control is explicitly marked as "trusted" -/// so that the user can click on teleport links in search results. -/// -class LLFloaterSearch : - public LLFloaterWebContent -{ -public: - struct SearchQuery : public LLInitParam::Block<SearchQuery> - { - Optional<std::string> category; - Optional<std::string> collection; - Optional<std::string> query; + private: + LLFloaterSearch(const LLSD& key); + ~LLFloaterSearch(); + void initiateSearch(const LLSD& tokens); + bool postBuild() override; - SearchQuery(); - }; - - struct _Params : public LLInitParam::Block<_Params, LLFloaterWebContent::Params> - { - Optional<SearchQuery> search; - }; - - typedef LLSDParamAdapter<_Params> Params; - - LLFloaterSearch(const Params& key); - - /// show the search floater with a new search - /// see search() for details on the key parameter. - /*virtual*/ void onOpen(const LLSD& key); - - /*virtual*/ void onClose(bool app_quitting); - - /// perform a search with the specific search term. - /// The key should be a map that can contain the following keys: - /// - "id": specifies the text phrase to search for - /// - "category": one of "all" (default), "people", "places", - /// "events", "groups", "wiki", "destinations", "classifieds" - void search(const SearchQuery &query); - - /// changing godmode can affect the search results that are - /// returned by the search website - use this method to tell the - /// search floater that the user has changed god level. - void godLevelChanged(U8 godlevel); - -private: - /*virtual*/ bool postBuild(); - - std::set<std::string> mSearchType; - std::set<std::string> mCollectionType; - U8 mSearchGodLevel; + std::set<std::string> mSearchType; + std::set<std::string> mCollectionType; }; - -#endif // LL_LLFLOATERSEARCH_H - diff --git a/indra/newview/llhudeffectresetskeleton.cpp b/indra/newview/llhudeffectresetskeleton.cpp index 31065a3e76..2bb5696f59 100644 --- a/indra/newview/llhudeffectresetskeleton.cpp +++ b/indra/newview/llhudeffectresetskeleton.cpp @@ -56,6 +56,15 @@ LLHUDEffectResetSkeleton::~LLHUDEffectResetSkeleton() //----------------------------------------------------------------------------- // packData() //----------------------------------------------------------------------------- +void LLHUDEffectResetSkeleton::render() +{ + // HUDEffectResetSkeleton is a fake effect meant to reset skeleton only. + // Just wait for an update() call to do its work and then die. +} + +//----------------------------------------------------------------------------- +// packData() +//----------------------------------------------------------------------------- void LLHUDEffectResetSkeleton::packData(LLMessageSystem *mesgsys) { // Pack the default data diff --git a/indra/newview/llhudeffectresetskeleton.h b/indra/newview/llhudeffectresetskeleton.h index 39a6137054..c89516d7fc 100644 --- a/indra/newview/llhudeffectresetskeleton.h +++ b/indra/newview/llhudeffectresetskeleton.h @@ -38,20 +38,21 @@ class LLHUDEffectResetSkeleton final : public LLHUDEffect public: friend class LLHUDObject; - /*virtual*/ void markDead(); - /*virtual*/ void setSourceObject(LLViewerObject* objectp); + /*virtual*/ void markDead() override; + /*virtual*/ void setSourceObject(LLViewerObject* objectp) override; - void setTargetObject(LLViewerObject *objp); + void setTargetObject(LLViewerObject *objp) override; void setResetAnimations(bool enable){ mResetAnimations = enable; }; protected: LLHUDEffectResetSkeleton(const U8 type); ~LLHUDEffectResetSkeleton(); - /*virtual*/ void packData(LLMessageSystem *mesgsys); - /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum); + void render() override; + void packData(LLMessageSystem *mesgsys) override; + void unpackData(LLMessageSystem *mesgsys, S32 blocknum) override; - void update(); + void update() override; private: bool mResetAnimations; }; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 9e8ed3bb43..8d5f94cdbb 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2310,6 +2310,7 @@ EMeshProcessingResult LLMeshRepoThread::headerReceived(const LLVolumeParams& mes } if (request_skin) { + LLMutexLock lock(mMutex); mSkinRequests.push_back(UUIDBasedRequest(mesh_id)); } } @@ -2460,7 +2461,7 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat LLPointer<LLMeshSkinInfo> info = nullptr; info = new LLMeshSkinInfo(mesh_id, skin); - if (isAgentAvatarValid()) + if (isAgentAvatarValid() && gAgentAvatarp->mInitFlags != 0) { // joint numbers are consistent inside LLVOAvatar and animations, but inconsistent inside meshes, // generate a map of mesh joint numbers to LLVOAvatar joint numbers LLSkinningUtil::initJointNums(info, gAgentAvatarp); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 79fee971a4..87bee62f09 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -223,13 +223,9 @@ void LLReflectionMapManager::update() resume(); } - static LLCachedControl<S32> sDetail(gSavedSettings, "RenderReflectionProbeDetail", -1); - static LLCachedControl<S32> sLevel(gSavedSettings, "RenderReflectionProbeLevel", 3); - static LLCachedControl<U32> sReflectionProbeCount(gSavedSettings, "RenderReflectionProbeCount", 256U); - static LLCachedControl<S32> sProbeDynamicAllocation(gSavedSettings, "RenderReflectionProbeDynamicAllocation", -1); static LLCachedControl<F32> sProbeUpdateSlowDown(gSavedSettings, "MPRenderProbeSlowDown", 0.05); - bool realtime = sDetail >= (S32)LLReflectionMapManager::DetailLevel::REALTIME; + bool realtime = mRenderReflectionProbeDetail >= (S32)LLReflectionMapManager::DetailLevel::REALTIME; if(sProbeUpdateSlowDown > 0.0) { @@ -249,17 +245,17 @@ void LLReflectionMapManager::update() { U32 probe_count_temp = mDynamicProbeCount; - if (sProbeDynamicAllocation > -1) + if (mRenderReflectionProbeDynamicAllocation > -1) { - if (sLevel == 0) + if (mRenderReflectionProbeLevel == 0) { mDynamicProbeCount = 1; } - else if (sLevel == 1) + else if (mRenderReflectionProbeLevel == 1) { mDynamicProbeCount = (U32)mProbes.size(); } - else if (sLevel == 2) + else if (mRenderReflectionProbeLevel == 2) { mDynamicProbeCount = llmax((U32)mProbes.size(), 128); } @@ -268,20 +264,20 @@ void LLReflectionMapManager::update() mDynamicProbeCount = 256; } - if (sProbeDynamicAllocation > 1) + if (mRenderReflectionProbeDynamicAllocation > 1) { // Round mDynamicProbeCount to the nearest increment of 16 - mDynamicProbeCount = ((mDynamicProbeCount + sProbeDynamicAllocation / 2) / sProbeDynamicAllocation) * 16; - mDynamicProbeCount = llclamp(mDynamicProbeCount, 1, sReflectionProbeCount); + mDynamicProbeCount = ((mDynamicProbeCount + mRenderReflectionProbeDynamicAllocation / 2) / mRenderReflectionProbeDynamicAllocation) * 16; + mDynamicProbeCount = llclamp(mDynamicProbeCount, 1, mRenderReflectionProbeCount); } else { - mDynamicProbeCount = llclamp(mDynamicProbeCount + sProbeDynamicAllocation, 1, sReflectionProbeCount); + mDynamicProbeCount = llclamp(mDynamicProbeCount + mRenderReflectionProbeDynamicAllocation, 1, mRenderReflectionProbeCount); } } else { - mDynamicProbeCount = sReflectionProbeCount; + mDynamicProbeCount = mRenderReflectionProbeCount; } mDynamicProbeCount = llmin(mDynamicProbeCount, LL_MAX_REFLECTION_PROBE_COUNT); @@ -494,7 +490,7 @@ void LLReflectionMapManager::update() closestDynamic = probe; } - if (sLevel == 0) + if (mRenderReflectionProbeLevel == 0) { // only update default probe when coverage is set to none llassert(probe == mDefaultProbe); @@ -529,12 +525,16 @@ void LLReflectionMapManager::update() if ((gFrameTimeSeconds - mDefaultProbe->mLastUpdateTime) < sDefaultUpdatePeriod) { - if (sLevel == 0 && mDefaultProbe->mComplete) +//<<<<<<< HEAD +// if (sLevel == 0 && mDefaultProbe->mComplete) +//======= + if (mRenderReflectionProbeLevel == 0) +//>>>>>>> Second_Life_Release#17540023-2025.07 { // when probes are disabled don't update the default probe more often than the prescribed update period oldestProbe = nullptr; } } - else if (sLevel > 0) + else if (mRenderReflectionProbeLevel > 0) { // when probes are enabled don't update the default probe less often than the prescribed update period oldestProbe = mDefaultProbe; } @@ -570,6 +570,14 @@ void LLReflectionMapManager::update() } } +void LLReflectionMapManager::refreshSettings() +{ + mRenderReflectionProbeDetail = gSavedSettings.getS32("RenderReflectionProbeDetail"); + mRenderReflectionProbeLevel = gSavedSettings.getS32("RenderReflectionProbeLevel"); + mRenderReflectionProbeCount = gSavedSettings.getU32("RenderReflectionProbeCount"); + mRenderReflectionProbeDynamicAllocation = gSavedSettings.getS32("RenderReflectionProbeDynamicAllocation"); +} + LLReflectionMap* LLReflectionMapManager::addProbe(LLSpatialGroup* group) { if (gGLManager.mGLVersion < 4.05f || !LLPipeline::sReflectionProbesEnabled) @@ -862,7 +870,7 @@ void LLReflectionMapManager::updateProbeFace(LLReflectionMap* probe, U32 face) } else { - //llassert(gSavedSettings.getS32("RenderReflectionProbeLevel") > 0); // should never update a probe that's not the default probe if reflection coverage is none + llassert(mRenderReflectionProbeLevel > 0); // should never update a probe that's not the default probe if reflection coverage is none probe->update(mRenderTarget.getWidth(), face); } diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h index c12a87cade..337c4ca7fa 100644 --- a/indra/newview/llreflectionmapmanager.h +++ b/indra/newview/llreflectionmapmanager.h @@ -110,6 +110,8 @@ public: // maintain reflection probes void update(); + void refreshSettings(); + // add a probe for the given spatial group LLReflectionMap* addProbe(LLSpatialGroup* group = nullptr); @@ -251,6 +253,12 @@ private: U32 mDynamicProbeCount; + // cached settings from gSavedSettings + S32 mRenderReflectionProbeDetail = -1; + S32 mRenderReflectionProbeLevel = 3; + U32 mRenderReflectionProbeCount = 256U; + S32 mRenderReflectionProbeDynamicAllocation = -1; + // resolution of reflection probes U32 mProbeResolution = 128; diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 9e567e3262..6238a1145c 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -71,10 +71,10 @@ LLSLURL::LLSLURL(const std::string& slurl) { LLURI slurl_uri; // parse the slurl as a uri - if (slurl.find(':') == std::string::npos) + if (slurl.find("://") == std::string::npos) { - // There may be no scheme ('secondlife:' etc.) passed in. In that case - // we want to normalize the slurl by putting the appropriate scheme + // There may be no scheme ('secondlife://', 'https://' etc.) passed in. In that + // case we want to normalize the slurl by putting the appropriate scheme // in front of the slurl. So, we grab the appropriate slurl base // from the grid manager which may be http://slurl.com/secondlife/ for maingrid, or // https://<hostname>/region/ for Standalone grid (the word region, not the region name) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8d010553a0..eca5ba82ac 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -61,6 +61,7 @@ #include "lllocationhistory.h" #include "llgltfmateriallist.h" #include "llimageworker.h" +#include "llregex.h" #include "llloginflags.h" #include "llmd5.h" @@ -349,13 +350,11 @@ void pump_idle_startup_network(void) { // while there are message to process: // process one then call display_startup() - S32 num_messages = 0; { LockMessageChecker lmc(gMessageSystem); while (lmc.checkAllMessages(gFrameCount, gServicePump)) { display_startup(); - ++num_messages; } lmc.processAcks(); } @@ -406,6 +405,7 @@ bool idle_startup() LL_WARNS_ONCE() << "gViewerWindow is not initialized" << LL_ENDL; return false; // No world yet } + LL_PROFILE_ZONE_SCOPED; const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); static LLTimer timeout; @@ -2588,6 +2588,27 @@ void release_notes_coro(const std::string url) LLWeb::loadURLInternal(url); } +void validate_release_notes_coro(const std::string url) +{ + LLVersionInfo& versionInfo(LLVersionInfo::instance()); + const boost::regex version_regex(R"(\b\d+\.\d+\.\d+\.\d+\b)"); + + if (url.find(versionInfo.getVersion()) == std::string::npos // has no our build version + && ll_regex_search(url, version_regex)) // has any version + { + LL_INFOS() << "Received release notes url \"" << url << "\" wwith mismatching build, falling back to locally generated url" << LL_ENDL; + // Updater only provides notes for a most recent version, if it is not + // the current one, fall back to the hardcoded URL. + LLSD info(LLAppViewer::instance()->getViewerInfo()); + std::string alt_url = info["VIEWER_RELEASE_NOTES_URL"].asString(); + release_notes_coro(alt_url); + } + else + { + release_notes_coro(url); + } +} + /** * Check if user is running a new version of the viewer. * Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting. @@ -2621,7 +2642,7 @@ void show_release_notes_if_required() "showrelnotes", [](const LLSD& url) { LLCoros::instance().launch("releaseNotesCoro", - boost::bind(&release_notes_coro, url.asString())); + boost::bind(&validate_release_notes_coro, url.asString())); return false; }); } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8793541e80..9e4abd632a 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -167,7 +167,8 @@ bool LLStatusBar::postBuild() getChild<LLUICtrl>("buyL")->setCommitCallback( boost::bind(&LLStatusBar::onClickBuyCurrency, this)); - getChild<LLUICtrl>("goShop")->setCommitCallback(boost::bind(&LLWeb::loadURL, gSavedSettings.getString("MarketplaceURL"), LLStringUtil::null, LLStringUtil::null)); + getChild<LLUICtrl>("goShop")->setCommitCallback( + boost::bind(&LLStatusBar::onClickShop, this)); mBoxBalance = getChild<LLTextBox>("balance"); mBoxBalance->setClickedCallback(&LLStatusBar::onClickRefreshBalance, this); @@ -548,6 +549,11 @@ void LLStatusBar::onClickBuyCurrency() LLFirstUse::receiveLindens(false); } +void LLStatusBar::onClickShop() +{ + LLFloaterReg::toggleInstanceOrBringToFront("marketplace"); +} + void LLStatusBar::onMouseEnterPresetsCamera() { LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder"); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index f1225a22f8..e54ccfe736 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -101,6 +101,7 @@ public: private: void onClickBuyCurrency(); + void onClickShop(); void onVolumeChanged(const LLSD& newvalue); void onVoiceChanged(const LLSD& newvalue); void onObscureBalanceChanged(const LLSD& newvalue); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 2027e958d5..5507ef517a 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -186,6 +186,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mOnUpdateImageStatsCallback(NULL), mBakeTextureEnabled(false), mLocalTextureEnabled(false), + mNoCopyTextureSelected(false), mInventoryPickType(pick_type) { setTentative(tentative); @@ -263,6 +264,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti if (set_selection) { + // This is going to cause a callback mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO); } } @@ -597,7 +599,6 @@ bool LLFloaterTexturePicker::postBuild() refreshInventoryFilter(); mInventoryPanel->setFilterPermMask(mImmediateFilterPermMask); - mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2)); mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); // Disable auto selecting first filtered item because it takes away @@ -616,8 +617,25 @@ bool LLFloaterTexturePicker::postBuild() if(!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL) { - mInventoryPanel->setSelection(findItemID(mImageAssetID, false), TAKE_FOCUS_NO); + LLViewerInventoryItem* itemp = findInvItem(mImageAssetID, false); + LLUUID item_id; + if (itemp) + { + item_id = itemp->getUUID(); + } + + mInventoryPanel->setSelection(item_id, TAKE_FOCUS_NO); + + if (item_id.notNull() && itemp) + { + if (!itemp->getPermissions().allowCopyBy(gAgent.getID())) + { + mNoCopyTextureSelected = true; + } + } } + // Don't call before setSelection, setSelection will mark view as dirty + mInventoryPanel->setSelectCallback(boost::bind(&LLFloaterTexturePicker::onSelectionChange, this, _1, _2)); } childSetAction("l_add_btn", LLFloaterTexturePicker::onBtnAdd, this); @@ -809,12 +827,12 @@ void LLFloaterTexturePicker::draw() } } -const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library) +LLViewerInventoryItem* LLFloaterTexturePicker::findInvItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library) const { if (asset_id.isNull()) { // null asset id means, no material or texture assigned - return LLUUID::null; + return nullptr; } LLUUID loockup_id = asset_id; @@ -854,30 +872,41 @@ const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, bool co // search for copyable version first for (S32 i = 0; i < items.size(); i++) { - LLInventoryItem* itemp = items[i]; + LLViewerInventoryItem* itemp = items[i]; LLPermissions item_permissions = itemp->getPermissions(); if (item_permissions.allowCopyBy(gAgent.getID(), gAgent.getGroupID())) { - if(!ignore_library || !gInventory.isObjectDescendentOf(itemp->getUUID(),gInventory.getLibraryRootFolderID())) + if (!ignore_library || !gInventory.isObjectDescendentOf(itemp->getUUID(), gInventory.getLibraryRootFolderID())) { - return itemp->getUUID(); + return itemp; } } } // otherwise just return first instance, unless copyable requested if (copyable_only) { - return LLUUID::null; + return nullptr; } else { - if(!ignore_library || !gInventory.isObjectDescendentOf(items[0]->getUUID(),gInventory.getLibraryRootFolderID())) + if (!ignore_library || !gInventory.isObjectDescendentOf(items[0]->getUUID(), gInventory.getLibraryRootFolderID())) { - return items[0]->getUUID(); + return items[0]; } } } + return nullptr; +} + +const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library) const +{ + LLViewerInventoryItem* itemp = findInvItem(asset_id, copyable_only, ignore_library); + if (itemp) + { + return itemp->getUUID(); + } + return LLUUID::null; } diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 79957431b7..467b8d1091 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -340,7 +340,7 @@ public: void setImageID(const LLUUID& image_asset_id, bool set_selection = true); bool updateImageStats(); // true if within limits const LLUUID& getAssetID() { return mImageAssetID; } - const LLUUID& findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false); + const LLUUID& findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false) const; void setCanApplyImmediately(bool b); void setActive(bool active); @@ -397,6 +397,7 @@ protected: void refreshLocalList(); void refreshInventoryFilter(); void setImageIDFromItem(const LLInventoryItem* itemp, bool set_selection = true); + LLViewerInventoryItem* findInvItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false) const; LLPointer<LLViewerTexture> mTexturep; LLPointer<LLFetchedGLTFMaterial> mGLTFMaterial; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index cc187a1f98..93b5806acf 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -49,6 +49,7 @@ #include "llviewerregion.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" +#include "llviewerthrottle.h" #include "llviewerassetstats.h" #include "llworld.h" #include "llsdparam.h" @@ -2434,7 +2435,7 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod mOriginFetchSource(LLTextureFetch::FROM_ALL), mTextureInfoMainThread(false) { - mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS"); + mMaxBandwidth = LLViewerThrottle::getMaxBandwidthKbps(); mTextureInfo.setLogging(true); LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); @@ -2953,11 +2954,10 @@ void LLTextureFetch::commonUpdate() size_t LLTextureFetch::update(F32 max_time_ms) { LL_PROFILE_ZONE_SCOPED; - static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS", 3000.0); { mNetworkQueueMutex.lock(); // +Mfnq - mMaxBandwidth = band_width(); + mMaxBandwidth = LLViewerThrottle::getMaxBandwidthKbps(); add(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED, mHTTPTextureBits); mHTTPTextureBits = (U32Bits)0; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 8560a01c4b..8cbede8303 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -49,6 +49,7 @@ #include "llviewerobjectlist.h" #include "llviewertexture.h" #include "llviewertexturelist.h" +#include "llviewerthrottle.h" #include "llviewerwindow.h" #include "llwindow.h" #include "llvovolume.h" @@ -633,7 +634,7 @@ void LLGLTexMemBar::draw() LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &x_right); F32Kilobits bandwidth(LLAppViewer::getTextureFetch()->getTextureBandwidth()); - F32Kilobits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); + F32Kilobits max_bandwidth(LLViewerThrottle::getMaxBandwidthKbps()); color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color; color[VALPHA] = text_color[VALPHA]; text = llformat("BW:%.0f/%.0f",bandwidth.value(), max_bandwidth.value()); diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index d915f11e74..553c8d9b00 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -157,9 +157,9 @@ bool LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, const LLVecto // update pixel meter ratio using default fov, not modified one mPixelMeterRatio = (F32)(getViewHeightInPixels()/ (2.f*tanf(mCameraFOVDefault*0.5f))); // update screen pixel area + mScreenPixelArea =(S32)((F32)getViewHeightInPixels() * ((F32)getViewHeightInPixels() * getAspect())); return true; - mScreenPixelArea =(S32)((F32)getViewHeightInPixels() * ((F32)getViewHeightInPixels() * getAspect())); } const LLMatrix4 &LLViewerCamera::getProjection() const diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9043a5a89e..6a3be8c882 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -448,6 +448,7 @@ static bool handleRenderDynamicLODChanged(const LLSD& newvalue) static bool handleReflectionProbeDetailChanged(const LLSD& newvalue) { + gPipeline.mReflectionMapManager.refreshSettings(); if (gPipeline.isInit()) { LLPipeline::refreshCachedSettings(); @@ -460,6 +461,12 @@ static bool handleReflectionProbeDetailChanged(const LLSD& newvalue) return true; } +static bool handleReflectionProbeCountChanged(const LLSD& newvalue) +{ + gPipeline.mReflectionMapManager.refreshSettings(); + return true; +} + #if LL_DARWIN static bool handleAppleUseMultGLChanged(const LLSD& newvalue) { @@ -837,6 +844,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderResolutionDivisor", handleRenderResolutionDivisorChanged); setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeLevel", handleReflectionProbeDetailChanged); setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeDetail", handleReflectionProbeDetailChanged); + setting_setup_signal_listener(gSavedSettings, "RenderReflectionProbeCount", handleReflectionProbeCountChanged); setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged); #if LL_DARWIN setting_setup_signal_listener(gSavedSettings, "RenderAppleUseMultGL", handleAppleUseMultGLChanged); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index fed6cd11db..b65ad3b3ec 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -21,6 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -99,6 +100,7 @@ #include "llfloaterlinkreplace.h" #include "llfloaterloadprefpreset.h" #include "llfloatermap.h" +#include "llfloatermarketplace.h" #include "llfloatermarketplacelistings.h" #include "llfloatermediasettings.h" #include "llfloatermemleak.h" @@ -426,6 +428,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>); LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaSettings>); + LLFloaterReg::add("marketplace", "floater_marketplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMarketplace>); LLFloaterReg::add("marketplace_listings", "floater_marketplace_listings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMarketplaceListings>); LLFloaterReg::add("marketplace_validation", "floater_marketplace_validation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMarketplaceValidation>); LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ce8ce791b9..09bb4a35ad 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1259,35 +1259,46 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url) { LLAppViewer::instance()->postToMainCoro([=]() { - LLMediaCtrl* media_instance = LLFloaterReg::getInstance("destinations")->getChild<LLMediaCtrl>("destination_guide_contents"); - if (media_instance) + std::string cookie_host = authority.substr(hostStart, hostEnd - hostStart); + std::string cookie_name = ""; + std::string cookie_value = ""; + std::string cookie_path = ""; + bool httponly = true; + bool secure = true; + + LLViewerMedia* inst = getInstance(); + if (inst->parseRawCookie(inst->mOpenIDCookie, cookie_name, cookie_value, cookie_path, httponly, secure)) { - LLViewerMedia* inst = getInstance(); - std::string cookie_host = authority.substr(hostStart, hostEnd - hostStart); - std::string cookie_name = ""; - std::string cookie_value = ""; - std::string cookie_path = ""; - bool httponly = true; - bool secure = true; - if (inst->parseRawCookie(inst->mOpenIDCookie, cookie_name, cookie_value, cookie_path, httponly, secure) && - media_instance->getMediaPlugin()) + // MAINT-5711 - inexplicably, the CEF setCookie function will no longer set the cookie if the + // url and domain are not the same. This used to be my.sl.com and id.sl.com respectively and worked. + // For now, we use the URL for the OpenID POST request since it will have the same authority + // as the domain field. + // (Feels like there must be a less dirty way to construct a URL from component LLURL parts) + // MAINT-6392 - Rider: Do not change, however, the original URI requested, since it is used further + // down. + std::string cefUrl(std::string(inst->mOpenIDURL.mURI) + "://" + std::string(inst->mOpenIDURL.mAuthority)); + + // list of floater names and webbrowser therein to set the cookie that arrived via login into + struct MediaCookieInstance { + std::string floater_name; + std::string browser_name; + }; + struct MediaCookieInstance media_cookie_instances[] = { + {"search", "search_contents" }, + {"marketplace", "marketplace_contents" }, + {"destinations", "destination_guide_contents" }, + }; + for (MediaCookieInstance mci : media_cookie_instances) { - // MAINT-5711 - inexplicably, the CEF setCookie function will no longer set the cookie if the - // url and domain are not the same. This used to be my.sl.com and id.sl.com respectively and worked. - // For now, we use the URL for the OpenID POST request since it will have the same authority - // as the domain field. - // (Feels like there must be a less dirty way to construct a URL from component LLURL parts) - // MAINT-6392 - Rider: Do not change, however, the original URI requested, since it is used further - // down. - std::string cefUrl(std::string(inst->mOpenIDURL.mURI) + "://" + std::string(inst->mOpenIDURL.mAuthority)); - - media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host, - cookie_path, httponly, secure); - - // Now that we have parsed the raw cookie, we must store it so that each new media instance - // can also get a copy and faciliate logging into internal SL sites. - media_instance->getMediaPlugin()->storeOpenIDCookie(cefUrl, cookie_name, cookie_value, - cookie_host, cookie_path, httponly, secure); + LLMediaCtrl* media_instance = LLFloaterReg::getInstance(mci.floater_name)->getChild<LLMediaCtrl>(mci.browser_name); + if (media_instance && media_instance->getMediaPlugin()) + { + media_instance->getMediaPlugin()->setCookie(cefUrl, cookie_name, cookie_value, cookie_host, + cookie_path, httponly, secure); + + media_instance->getMediaPlugin()->storeOpenIDCookie(cefUrl, cookie_name, cookie_value, + cookie_host, cookie_path, httponly, secure); + } } } }); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 63a2a9a303..452a2cec50 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4367,13 +4367,6 @@ void set_god_level(U8 god_level) // changing god-level can affect which menus we see show_debug_menus(); - - // changing god-level can invalidate search results - LLFloaterSearch *search = dynamic_cast<LLFloaterSearch*>(LLFloaterReg::getInstance("search")); - if (search) - { - search->godLevelChanged(god_level); - } } #ifdef TOGGLE_HACKED_GODLIKE_VIEWER @@ -6532,7 +6525,7 @@ void handle_look_at_selection(const LLSD& param) } } -void handle_zoom_to_object(const LLUUID& object_id) +bool handle_zoom_to_object(const LLUUID& object_id) { const F32 PADDING_FACTOR = 2.f; @@ -6550,12 +6543,14 @@ void handle_zoom_to_object(const LLUUID& object_id) obj_to_cam.normVec(); - LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); + LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); - gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), object_center_global, object_id ); + return true; } + return false; } void handle_teleport_to_object(LLUUID object_id) diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 68ba740f67..6c9d56cffb 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -73,7 +73,7 @@ void handle_buy(); void handle_take(bool take_separate = false); void handle_take_copy(); void handle_look_at_selection(const LLSD& param); -void handle_zoom_to_object(const LLUUID& object_id); +bool handle_zoom_to_object(const LLUUID& object_id); void handle_teleport_to_object(LLUUID object_id); void handle_object_return(); void handle_object_delete(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 57dd0d9581..02171acaac 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3384,6 +3384,17 @@ void send_agent_update(bool force_send, bool send_reliable) msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis()); static F32 last_draw_disatance_step = 1024; + F32 memory_limited_draw_distance = gAgentCamera.mDrawDistance; + + if (LLViewerTexture::sDesiredDiscardBias > 2.f && LLViewerTexture::isSystemMemoryLow()) + { + // If we are low on memory, reduce requested draw distance + // Discard's bias is clamped to 4 so we need to check 2 to 4 range + // Factor is intended to go from 1.0 to 2.0 + F32 factor = 1.f + (LLViewerTexture::sDesiredDiscardBias - 2.f) / 2.f; + memory_limited_draw_distance = llmax(gAgentCamera.mDrawDistance / factor, gAgentCamera.mDrawDistance / 2.f); + } + if (tp_state == LLAgent::TELEPORT_ARRIVING || LLStartUp::getStartupState() < STATE_MISC) { // Inform interest list, prioritize closer area. @@ -3392,25 +3403,25 @@ void send_agent_update(bool force_send, bool send_reliable) // closer ones. // Todo: revise and remove once server gets distance sorting. last_draw_disatance_step = llmax((F32)(gAgentCamera.mDrawDistance / 2.f), 50.f); + last_draw_disatance_step = llmin(last_draw_disatance_step, memory_limited_draw_distance); msg->addF32Fast(_PREHASH_Far, last_draw_disatance_step); } - else if (last_draw_disatance_step < gAgentCamera.mDrawDistance) + else if (last_draw_disatance_step < memory_limited_draw_distance) { static LLFrameTimer last_step_time; if (last_step_time.getElapsedTimeF32() > 1.f) { // gradually increase draw distance - // Idealy this should be not per second, but based on how loaded - // mesh thread is, but hopefully this is temporary. last_step_time.reset(); - F32 step = gAgentCamera.mDrawDistance * 0.1f; - last_draw_disatance_step = llmin(last_draw_disatance_step + step, gAgentCamera.mDrawDistance); + F32 step = memory_limited_draw_distance * 0.1f; + last_draw_disatance_step = llmin(last_draw_disatance_step + step, memory_limited_draw_distance); } msg->addF32Fast(_PREHASH_Far, last_draw_disatance_step); } else { - msg->addF32Fast(_PREHASH_Far, gAgentCamera.mDrawDistance); + last_draw_disatance_step = memory_limited_draw_distance; + msg->addF32Fast(_PREHASH_Far, memory_limited_draw_distance); } msg->addU32Fast(_PREHASH_ControlFlags, control_flags); diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index b8c9594aa7..da2ca0aca4 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -450,7 +450,7 @@ std::string LLGridManager::getGridLabel(const std::string& grid) { std::string grid_label; std::string grid_name = getGrid(grid); - if (!grid.empty()) + if (!grid_name.empty()) { grid_label = mGridList[grid_name][GRID_LABEL_VALUE].asString(); } @@ -466,7 +466,7 @@ std::string LLGridManager::getGridId(const std::string& grid) { std::string grid_id; std::string grid_name = getGrid(grid); - if (!grid.empty()) + if (!grid_name.empty()) { grid_id = mGridList[grid_name][GRID_ID_VALUE].asString(); } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 43cb7d8a14..3e9f67bf29 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -551,7 +551,11 @@ void LLViewerShaderMgr::setShaders() gSavedSettings.setString("RenderShaderCacheVersion", current_cache_version.asString()); } - initShaderCache(shader_cache_enabled, old_cache_version, current_cache_version); + initShaderCache( + shader_cache_enabled, + old_cache_version, + current_cache_version, + LLAppViewer::instance()->isSecondInstance()); } static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16); @@ -709,7 +713,10 @@ void LLViewerShaderMgr::setShaders() loaded = loaded && loadShadersDeferred(); llassert(loaded); - persistShaderCacheMetadata(); + if (!LLAppViewer::instance()->isSecondInstance()) + { + persistShaderCacheMetadata(); + } if (gViewerWindow) { diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 5ba0a86e68..7a25fb03a5 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -524,12 +524,19 @@ void LLViewerTexture::updateClass() bool is_low = is_sys_low || over_pct > 0.f; static bool was_low = false; - static bool was_sys_low = false; if (is_low && !was_low) { - // slam to 1.5 bias the moment we hit low memory (discards off screen textures immediately) - sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f); + if (is_sys_low) + { + // Not having system memory is more serious, so discard harder + sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f * getSystemMemoryBudgetFactor()); + } + else + { + // Slam to 1.5 bias the moment we hit low memory (discards off screen textures immediately) + sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f); + } if (is_sys_low || over_pct > 2.f) { // if we're low on system memory, emergency purge off screen textures to avoid a death spiral @@ -542,7 +549,6 @@ void LLViewerTexture::updateClass() } was_low = is_low; - was_sys_low = is_sys_low; if (is_low) { @@ -561,8 +567,13 @@ void LLViewerTexture::updateClass() sEvaluationTimer.reset(); // lower discard bias over time when at least 10% of budget is free - const F32 FREE_PERCENTAGE_TRESHOLD = -0.1f; - if (sDesiredDiscardBias > 1.f && over_pct < FREE_PERCENTAGE_TRESHOLD) + constexpr F32 FREE_PERCENTAGE_TRESHOLD = -0.1f; + constexpr U32 FREE_SYS_MEM_TRESHOLD = 100; + static LLCachedControl<U32> min_free_main_memory(gSavedSettings, "RenderMinFreeMainMemoryThreshold", 512); + const S32Megabytes MIN_FREE_MAIN_MEMORY(min_free_main_memory() + FREE_SYS_MEM_TRESHOLD); + if (sDesiredDiscardBias > 1.f + && over_pct < FREE_PERCENTAGE_TRESHOLD + && getFreeSystemMemory() > MIN_FREE_MAIN_MEMORY) { static LLCachedControl<F32> high_mem_discard_decrement(gSavedSettings, "RenderHighMemMinDiscardDecrement", .1f); @@ -629,24 +640,42 @@ void LLViewerTexture::updateClass() } //static -bool LLViewerTexture::isSystemMemoryLow() +U32Megabytes LLViewerTexture::getFreeSystemMemory() { static LLFrameTimer timer; static U32Megabytes physical_res = U32Megabytes(U32_MAX); - static LLCachedControl<U32> min_free_main_memory(gSavedSettings, "RenderMinFreeMainMemoryThreshold", 512); - const U32Megabytes MIN_FREE_MAIN_MEMORY(min_free_main_memory); - if (timer.getElapsedTimeF32() < MEMORY_CHECK_WAIT_TIME) //call this once per second. { - return physical_res < MIN_FREE_MAIN_MEMORY; + return physical_res; } timer.reset(); LLMemory::updateMemoryInfo(); physical_res = LLMemory::getAvailableMemKB(); - return physical_res < MIN_FREE_MAIN_MEMORY; + return physical_res; +} + +//static +bool LLViewerTexture::isSystemMemoryLow() +{ + static LLCachedControl<U32> min_free_main_memory(gSavedSettings, "RenderMinFreeMainMemoryThreshold", 512); + const U32Megabytes MIN_FREE_MAIN_MEMORY(min_free_main_memory); + return getFreeSystemMemory() < MIN_FREE_MAIN_MEMORY; +} + +F32 LLViewerTexture::getSystemMemoryBudgetFactor() +{ + static LLCachedControl<U32> min_free_main_memory(gSavedSettings, "RenderMinFreeMainMemoryThreshold", 512); + const S32Megabytes MIN_FREE_MAIN_MEMORY(min_free_main_memory); + S32 free_budget = (S32Megabytes)getFreeSystemMemory() - MIN_FREE_MAIN_MEMORY; + if (free_budget < 0) + { + // Result should range from 1 (0 free budget) to 2 (-512 free budget) + return 1.f - free_budget / MIN_FREE_MAIN_MEMORY; + } + return 1.f; } //end of static functions diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index f9311d85cb..d32c302d8e 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -115,6 +115,7 @@ public: static void initClass(); static void updateClass(); static bool isSystemMemoryLow(); + static F32 getSystemMemoryBudgetFactor(); LLViewerTexture(bool usemipmaps = true); LLViewerTexture(const LLUUID& id, bool usemipmaps) ; @@ -189,6 +190,8 @@ private: friend class LLBumpImageList; friend class LLUIImageList; + static U32Megabytes getFreeSystemMemory(); + protected: friend class LLViewerTextureList; LLUUID mID; diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 8d935e4243..3ccfbea6e2 100644 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -225,7 +225,7 @@ void LLViewerThrottle::setMaxBandwidth(F32 kbits_per_second, bool from_event) void LLViewerThrottle::load() { - mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS")*1024; + mMaxBandwidth = getMaxBandwidthKbps() * 1024; resetDynamicThrottle(); mCurrent.dump(); } @@ -242,6 +242,15 @@ void LLViewerThrottle::sendToSim() const mCurrent.sendToSim(); } +F32 LLViewerThrottle::getMaxBandwidthKbps() +{ + constexpr F32 MIN_BANDWIDTH = 100.0f; // 100 Kbps + constexpr F32 MAX_BANDWIDTH = 10000.0f; // 10 Mbps + + static LLCachedControl<F32> bandwidth(gSavedSettings, "ThrottleBandwidthKBPS", 3000.0); + return llclamp(bandwidth(), MIN_BANDWIDTH, MAX_BANDWIDTH); +} + LLViewerThrottleGroup LLViewerThrottle::getThrottleGroup(const F32 bandwidth_kbps) { diff --git a/indra/newview/llviewerthrottle.h b/indra/newview/llviewerthrottle.h index 9973c88549..ef898a97d7 100644 --- a/indra/newview/llviewerthrottle.h +++ b/indra/newview/llviewerthrottle.h @@ -64,6 +64,7 @@ public: void save() const; void sendToSim() const; + static F32 getMaxBandwidthKbps(); F32 getMaxBandwidth()const { return mMaxBandwidth; } F32 getCurrentBandwidth() const { return mCurrentBandwidth; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 35f33e64cb..47fb658d15 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2311,6 +2311,18 @@ void LLViewerWindow::initWorldUI() url = LLWeb::expandURLSubstitutions(url, LLSD()); avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML); } + LLMediaCtrl* search = LLFloaterReg::getInstance("search")->findChild<LLMediaCtrl>("search_contents"); + if (search) + { + search->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + } + LLMediaCtrl* marketplace = LLFloaterReg::getInstance("marketplace")->getChild<LLMediaCtrl>("marketplace_contents"); + if (marketplace) + { + marketplace->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); + std::string url = gSavedSettings.getString("MarketplaceURL"); + marketplace->navigateTo(url, HTTP_CONTENT_TEXT_HTML); + } } } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ab07afe23e..910f711a9d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4797,14 +4797,6 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent) } bool visible = isVisible(); - bool is_control_avatar = isControlAvatar(); // capture state to simplify tracing - bool is_attachment = false; - - if (is_control_avatar) - { - LLControlAvatar *cav = dynamic_cast<LLControlAvatar*>(this); - is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects - } // For fading out the names above heads, only let the timer // run if we're visible. diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 501828eee8..ac73c2def6 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -486,14 +486,23 @@ void LLVOCacheEntry::updateDebugSettings() //min radius: all objects within this radius remain loaded in memory static LLCachedControl<F32> min_radius(gSavedSettings,"SceneLoadMinRadius"); static const F32 MIN_RADIUS = 1.0f; - const F32 draw_radius = gAgentCamera.mDrawDistance; + + F32 draw_radius = gAgentCamera.mDrawDistance; + if (LLViewerTexture::sDesiredDiscardBias > 2.f && LLViewerTexture::isSystemMemoryLow()) + { + // Discard's bias maximum is 4 so we need to check 2 to 4 range + // Factor is intended to go from 1.0 to 2.0 + F32 factor = 1.f + (LLViewerTexture::sDesiredDiscardBias - 2.f) / 2.f; + // For safety cap reduction at 50%, we don't want to go below half of draw distance + draw_radius = llmax(draw_radius / factor, draw_radius / 2.f); + } const F32 clamped_min_radius = llclamp((F32) min_radius, MIN_RADIUS, draw_radius); // [1, mDrawDistance] sNearRadius = MIN_RADIUS + ((clamped_min_radius - MIN_RADIUS) * adjust_factor); // a percentage of draw distance beyond which all objects outside of view frustum will be unloaded, regardless of pixel threshold static LLCachedControl<F32> rear_max_radius_frac(gSavedSettings,"SceneLoadRearMaxRadiusFraction"); const F32 min_radius_plus_one = sNearRadius + 1.f; - const F32 max_radius = rear_max_radius_frac * gAgentCamera.mDrawDistance; + const F32 max_radius = rear_max_radius_frac * draw_radius; const F32 clamped_max_radius = llclamp(max_radius, min_radius_plus_one, draw_radius); // [sNearRadius, mDrawDistance] sRearFarRadius = min_radius_plus_one + ((clamped_max_radius - min_radius_plus_one) * adjust_factor); diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 04cee00c12..30f899877a 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2308,7 +2308,6 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) return; } - bool iceCompleted = false; LLSD body; if (!connection->mIceCandidates.empty() || connection->mIceCompleted) { @@ -2347,7 +2346,6 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) LLSD body_candidate; body_candidate["completed"] = true; body["candidate"] = body_candidate; - iceCompleted = connection->mIceCompleted; connection->mIceCompleted = false; } @@ -2980,7 +2978,6 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b return; } boost::json::object voice_data = voice_data_parsed.as_object(); - bool new_participant = false; boost::json::object mute; boost::json::object user_gain; for (auto &participant_elem : voice_data) @@ -3033,7 +3030,6 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b } } - new_participant |= joined; if (!participant && joined && (primary || !isSpatial())) { participant = LLWebRTCVoiceClient::getInstance()->addParticipantByID(mChannelID, agent_id, mRegionID); diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 5fb22184c3..cc593fe7b4 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -994,8 +994,11 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu LLUUID linked_id = item->getLinkedUUID(); LLViewerInventoryItem* linked_item = gInventory.getItem(linked_id); - can_favorite |= !linked_item->getIsFavorite(); - can_unfavorite |= linked_item->getIsFavorite(); + if (linked_item) + { + can_favorite |= !linked_item->getIsFavorite(); + can_unfavorite |= linked_item->getIsFavorite(); + } if (is_worn) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fb04722864..e993ca25b7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -430,6 +430,8 @@ void LLPipeline::init() sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); + mReflectionMapManager.refreshSettings(); + mInitialized = true; LOG_GLERROR("LLPipeline::init()"); diff --git a/indra/newview/skins/default/xui/da/floater_search.xml b/indra/newview/skins/default/xui/da/floater_search.xml deleted file mode 100644 index 80a30b1aa1..0000000000 --- a/indra/newview/skins/default/xui/da/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title="FIND"> - <floater.string name="loading_text"> - Henter... - </floater.string> - <floater.string name="done_text"> - Færdig - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Gentag søgning med "God level" - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/de/floater_search.xml b/indra/newview/skins/default/xui/de/floater_search.xml deleted file mode 100644 index bd39bf2bce..0000000000 --- a/indra/newview/skins/default/xui/de/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Wird geladen... - </floater.string> - <floater.string name="done_text"> - Fertig - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Suche wiederholen, um aktuellen Gott-Level zu berücksichtigen - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/en/floater_marketplace.xml b/indra/newview/skins/default/xui/en/floater_marketplace.xml new file mode 100644 index 0000000000..2299e02c63 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_marketplace.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater + positioning="cascading" + legacy_header_height="225" + can_minimize="true" + can_close="true" + can_resize="true" + min_height="800" + min_width="800" + height="800" + layout="topleft" + name="Marketplace" + single_instance="true" + help_topic="marketplace" + save_rect="true" + save_visibility="true" + title="MARKETPLACE" + width="800"> + <web_browser + top="25" + height="775" + width="800" + follows="all" + name="marketplace_contents" + trusted_content="true"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index fc1e32915a..76a486e211 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -1,18 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater - positioning="cascading" - legacy_header_height="18" - can_resize="true" - height="775" - layout="topleft" - min_height="400" - min_width="500" - name="floater_search" - help_topic="floater_search" - save_rect="true" - save_visibility="true" - title="" - initial_mime_type="text/html" - width="780" - tab_stop="true" - filename="floater_web_content.xml"/> + positioning="cascading" + legacy_header_height="225" + can_minimize="true" + can_close="true" + can_resize="true" + min_height="800" + min_width="800" + height="800" + layout="topleft" + name="Search" + single_instance="true" + help_topic="search" + save_rect="true" + save_visibility="true" + title="SEARCH" + width="800"> + <web_browser + top="25" + height="775" + width="800" + follows="all" + name="search_contents" + trusted_content="true"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml index a93be6a18d..c40ae3ea06 100644 --- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml +++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml @@ -66,6 +66,7 @@ visible="false" name="comment_text" follows="left|top" + max_length="1024" width="240" top_delta="20" word_wrap="true" /> diff --git a/indra/newview/skins/default/xui/en/menu_object_icon.xml b/indra/newview/skins/default/xui/en/menu_object_icon.xml index f3e520700b..d43ce26e56 100644 --- a/indra/newview/skins/default/xui/en/menu_object_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_object_icon.xml @@ -41,6 +41,17 @@ <menu_item_separator layout="topleft" /> <menu_item_call + label="Zoom in" + layout="topleft" + name="zoom_in"> + <menu_item_call.on_click + function="ObjectIcon.Action" + parameter="obj_zoom_in" /> + <menu_item_call.on_enable + function="ObjectIcon.Visible" + parameter="obj_zoom_in" /> + </menu_item_call> + <menu_item_call label="Show on Map" layout="topleft" name="show_on_map"> diff --git a/indra/newview/skins/default/xui/en/menu_url_objectim.xml b/indra/newview/skins/default/xui/en/menu_url_objectim.xml index 1874c01f8d..fb6081e1fb 100644 --- a/indra/newview/skins/default/xui/en/menu_url_objectim.xml +++ b/indra/newview/skins/default/xui/en/menu_url_objectim.xml @@ -26,6 +26,13 @@ <menu_item_separator layout="topleft" /> <menu_item_call + label="Zoom in" + layout="topleft" + name="zoom_in"> + <menu_item_call.on_click + function="Url.ZoomInObject" /> + </menu_item_call> + <menu_item_call label="Show on Map" layout="topleft" name="show_on_map"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 9963ccd84b..f188ede456 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -12147,6 +12147,17 @@ Cannot create large prims that intersect other residents. Please re-try when ot <notification icon="alertmodal.tga" + name="PreferenceQualityWithLowMemory" + type="alert"> +Your system has [TOTAL_MEM]MB of memory, which might not be enough to run viewer at higher settings and might result in issues. + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Continue"/> + </notification> + + <notification + icon="alertmodal.tga" name="DefaultObjectPermissions" type="alert"> There was a problem saving the default object permissions: [REASON]. Please try setting the default permissions later. diff --git a/indra/newview/skins/default/xui/es/floater_search.xml b/indra/newview/skins/default/xui/es/floater_search.xml deleted file mode 100644 index e24d8064a1..0000000000 --- a/indra/newview/skins/default/xui/es/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Cargando... - </floater.string> - <floater.string name="done_text"> - Hecho - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Redo search to reflect current God level - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/fr/floater_search.xml b/indra/newview/skins/default/xui/fr/floater_search.xml deleted file mode 100644 index 32800182ea..0000000000 --- a/indra/newview/skins/default/xui/fr/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Chargement... - </floater.string> - <floater.string name="done_text"> - Terminé - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Relancer la recherche pour refléter le niveau divin actuel - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/it/floater_search.xml b/indra/newview/skins/default/xui/it/floater_search.xml deleted file mode 100644 index ac3dc17aa3..0000000000 --- a/indra/newview/skins/default/xui/it/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Caricamento in corso... - </floater.string> - <floater.string name="done_text"> - Fine - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Ripeti ricerca in modo che rifletta il livello di diritti Admin attuale - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/ja/floater_search.xml b/indra/newview/skins/default/xui/ja/floater_search.xml deleted file mode 100644 index 531ac77f95..0000000000 --- a/indra/newview/skins/default/xui/ja/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - 読み込んでいます…。 - </floater.string> - <floater.string name="done_text"> - 完了 - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - 現在のゴッドレベルに反映させるため、検索をやり直してください。 - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/pt/floater_search.xml b/indra/newview/skins/default/xui/pt/floater_search.xml deleted file mode 100644 index 3509cb786d..0000000000 --- a/indra/newview/skins/default/xui/pt/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Carregando... - </floater.string> - <floater.string name="done_text"> - Pronto - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Buscar novamente com status God - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/ru/floater_search.xml b/indra/newview/skins/default/xui/ru/floater_search.xml deleted file mode 100644 index 405a6598ac..0000000000 --- a/indra/newview/skins/default/xui/ru/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Загрузка... - </floater.string> - <floater.string name="done_text"> - Готово - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Повторить поиск, чтобы показать текущий уровень творца - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/tr/floater_search.xml b/indra/newview/skins/default/xui/tr/floater_search.xml deleted file mode 100644 index 08c1e5162c..0000000000 --- a/indra/newview/skins/default/xui/tr/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - Yükleniyor... - </floater.string> - <floater.string name="done_text"> - Tamamlandı - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - Mevcut Yönetici seviyesini dikkate alarak aramayı yenile - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/skins/default/xui/zh/floater_search.xml b/indra/newview/skins/default/xui/zh/floater_search.xml deleted file mode 100644 index 3e85a529ae..0000000000 --- a/indra/newview/skins/default/xui/zh/floater_search.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater_search" title=""> - <floater.string name="loading_text"> - 載入中... - </floater.string> - <floater.string name="done_text"> - 完成 - </floater.string> - <layout_stack name="stack1"> - <layout_panel name="browser_layout"> - <text name="refresh_search"> - 以目前具備的神階級再搜尋一次 - </text> - </layout_panel> - </layout_stack> -</floater> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 7f5db61545..741db1139e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -63,7 +63,6 @@ class ViewerManifest(LLManifest): def construct(self): super(ViewerManifest, self).construct() self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg") - self.path(src="../../etc/message.xml", dst="app_settings/message.xml") os.environ["XZ_DEFAULTS"] = "-T0" @@ -277,13 +276,13 @@ class ViewerManifest(LLManifest): # All lines up to and including the first blank line are the file header; skip them lines.reverse() # so that pop will pull from first to last line - while not re.match("\s*$", lines.pop()) : + while not re.match(r"\s*$", lines.pop()) : pass # do nothing # A line that starts with a non-whitespace character is a name; all others describe contributions, so collect the names names = [] for line in lines : - if re.match("\S", line) : + if re.match(r"\S", line) : names.append(line.rstrip()) # It's not fair to always put the same people at the head of the list random.shuffle(names) |