mPickedFiles;
@@ -144,10 +153,13 @@ MediaPluginBase(host_send_func, host_user_data)
mAuthUsername = "";
mAuthPassword = "";
mAuthOK = false;
+ mCanUndo = false;
+ mCanRedo = false;
mCanCut = false;
mCanCopy = false;
mCanPaste = false;
- mCachePath = "";
+ mCanDelete = false;
+ mCanSelectAll = false;
mCefLogFile = "";
mCefLogVerbose = false;
mPickedFiles.clear();
@@ -247,15 +259,17 @@ void MediaPluginCEF::onLoadStartCallback()
/////////////////////////////////////////////////////////////////////////////////
//
-void MediaPluginCEF::onLoadError(int status, const std::string error_text)
+void MediaPluginCEF::onLoadError(int status, const std::string error_text, const std::string error_url)
{
std::stringstream msg;
- msg << "Loading error!";
+ msg << "Loading error";
msg << "";
- msg << "Message: " << error_text;
- msg << "
";
- msg << "Code: " << status;
+ msg << "Error message: " << error_text;
+ msg << "
";
+ msg << "Error URL: " << error_url << "";
+ msg << "
";
+ msg << "Error code: " << status;
mCEFLib->showBrowserMessage(msg.str());
}
@@ -614,7 +628,12 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
mCEFLib->setOnTooltipCallback(std::bind(&MediaPluginCEF::onTooltipCallback, this, std::placeholders::_1));
mCEFLib->setOnLoadStartCallback(std::bind(&MediaPluginCEF::onLoadStartCallback, this));
mCEFLib->setOnLoadEndCallback(std::bind(&MediaPluginCEF::onLoadEndCallback, this, std::placeholders::_1, std::placeholders::_2));
- mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2));
+
+ // CEF 139 seems to have introduced a loading failure at the login page (only?) I haven't seen it on
+ // any other page and it only happens about 1 in 8 times. Without this handler for the error page
+ // (red box, error message/code/url) the page load recovers after display a brief built in error.
+ // Not ideal but better than stopping altgoether. Will restore this once I discover the error.
+ //mCEFLib->setOnLoadErrorCallback(std::bind(&MediaPluginCEF::onLoadError, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
mCEFLib->setOnAddressChangeCallback(std::bind(&MediaPluginCEF::onAddressChangeCallback, this, std::placeholders::_1));
mCEFLib->setOnOpenPopupCallback(std::bind(&MediaPluginCEF::onOpenPopupCallback, this, std::placeholders::_1, std::placeholders::_2));
mCEFLib->setOnHTTPAuthCallback(std::bind(&MediaPluginCEF::onHTTPAuthCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
@@ -642,10 +661,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
// and set it to white
settings.background_color = 0xffffffff; // white
- settings.cache_enabled = true;
settings.root_cache_path = mRootCachePath;
- settings.cache_path = mCachePath;
- settings.context_cache_path = mContextCachePath;
settings.cookies_enabled = mCookiesEnabled;
#ifndef LL_LINUX
@@ -691,9 +707,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
settings.flip_mouse_y = false;
settings.flip_pixels_y = true;
settings.frame_rate = 60;
-
settings.force_wave_audio = true;
-
settings.initial_height = 1024;
settings.initial_width = 1024;
settings.java_enabled = false;
@@ -740,23 +754,32 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
std::string user_data_path_cache = message_in.getValue("cache_path");
std::string subfolder = message_in.getValue("username");
- mRootCachePath = user_data_path_cache + "cef_cache";
- if (!subfolder.empty())
- {
- std::string delim;
+ // media plugin doesn't have access to gDirUtilp
+ std::string path_separator;
#if LL_WINDOWS
- // media plugin doesn't have access to gDirUtilp
- delim = "\\";
+ path_separator = "\\";
#else
- delim = "/";
+ path_separator = "/";
#endif
- mCachePath = mRootCachePath + delim + subfolder;
- }
- else
- {
- mCachePath = mRootCachePath;
- }
- mContextCachePath = ""; // disabled by ""
+
+ mRootCachePath = user_data_path_cache + "cef_cache";
+
+ // Issue #4498 Introduce an additional sub-folder underneath the main cache
+ // folder so that each CEF media instance gets its own (as per the CEF API
+ // official position). These folders will be removed at startup by Viewer code
+ // so that their non-trivial size does not exhaust available disk space. This
+ // begs the question - why turn on the cache at all? There are 2 reasons - firstly
+ // some of the instances will benefit from per Viewer session caching and will
+ // use the injected SL cookie and secondly, it's not clear how having no cache
+ // interacts with the multiple simultaneous paradigm we use.
+ mRootCachePath += path_separator;
+# if LL_WINDOWS
+ mRootCachePath += std::to_string(_getpid());
+# else
+ mRootCachePath += std::to_string(getpid());
+# endif
+
+
mCefLogFile = message_in.getValue("cef_log_file");
mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log");
}
@@ -935,6 +958,14 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
authResponse(message_in);
}
+ if (message_name == "edit_undo")
+ {
+ mCEFLib->editUndo();
+ }
+ if (message_name == "edit_redo")
+ {
+ mCEFLib->editRedo();
+ }
if (message_name == "edit_cut")
{
mCEFLib->editCut();
@@ -947,6 +978,18 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
mCEFLib->editPaste();
}
+ if (message_name == "edit_delete")
+ {
+ mCEFLib->editDelete();
+ }
+ if (message_name == "edit_select_all")
+ {
+ mCEFLib->editSelectAll();
+ }
+ if (message_name == "edit_show_source")
+ {
+ mCEFLib->viewSource();
+ }
}
else if (message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
{
@@ -1144,14 +1187,31 @@ void MediaPluginCEF::unicodeInput(std::string event, LLSD native_key_data = LLSD
//
void MediaPluginCEF::checkEditState()
{
+ bool can_undo = mCEFLib->editCanUndo();
+ bool can_redo = mCEFLib->editCanRedo();
bool can_cut = mCEFLib->editCanCut();
bool can_copy = mCEFLib->editCanCopy();
bool can_paste = mCEFLib->editCanPaste();
+ bool can_delete = mCEFLib->editCanDelete();
+ bool can_select_all = mCEFLib->editCanSelectAll();
- if ((can_cut != mCanCut) || (can_copy != mCanCopy) || (can_paste != mCanPaste))
+ if ((can_undo != mCanUndo) || (can_redo != mCanRedo) || (can_cut != mCanCut) || (can_copy != mCanCopy)
+ || (can_paste != mCanPaste) || (can_delete != mCanDelete) || (can_select_all != mCanSelectAll))
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_state");
+ if (can_undo != mCanUndo)
+ {
+ mCanUndo = can_undo;
+ message.setValueBoolean("undo", can_undo);
+ }
+
+ if (can_redo != mCanRedo)
+ {
+ mCanRedo = can_redo;
+ message.setValueBoolean("redo", can_redo);
+ }
+
if (can_cut != mCanCut)
{
mCanCut = can_cut;
@@ -1170,6 +1230,18 @@ void MediaPluginCEF::checkEditState()
message.setValueBoolean("paste", can_paste);
}
+ if (can_delete != mCanDelete)
+ {
+ mCanDelete = can_delete;
+ message.setValueBoolean("delete", can_delete);
+ }
+
+ if (can_select_all != mCanSelectAll)
+ {
+ mCanSelectAll = can_select_all;
+ message.setValueBoolean("select_all", can_select_all);
+ }
+
sendMessage(message);
}
}
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index 41e2353f31..be8ffe5a40 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -13,14 +13,6 @@ include(ExamplePlugin)
### media_plugin_example
-if(NOT ADDRESS_SIZE EQUAL 32)
- if(WINDOWS)
- ##add_definitions(/FIXED:NO)
- else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
- add_definitions(-fPIC)
- endif(WINDOWS)
-endif(NOT ADDRESS_SIZE EQUAL 32)
-
set(media_plugin_example_SOURCE_FILES
media_plugin_example.cpp
)
@@ -47,7 +39,7 @@ if (DARWIN)
PROPERTIES
PREFIX ""
BUILD_WITH_INSTALL_RPATH 1
- INSTALL_NAME_DIR "@executable_path"
+ INSTALL_RPATH "@executable_path/../Frameworks"
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 07811e581b..32f16ceb00 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -14,13 +14,6 @@ include(LibVLCPlugin)
### media_plugin_libvlc
-if(NOT ADDRESS_SIZE EQUAL 32)
- if(WINDOWS)
- ##add_definitions(/FIXED:NO)
- else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
- add_definitions(-fPIC)
- endif(WINDOWS)
-endif(NOT ADDRESS_SIZE EQUAL 32)
set(media_plugin_libvlc_SOURCE_FILES
media_plugin_libvlc.cpp
@@ -51,7 +44,7 @@ if (DARWIN)
PROPERTIES
PREFIX ""
BUILD_WITH_INSTALL_RPATH 1
- INSTALL_NAME_DIR "@executable_path"
+ INSTALL_RPATH "@executable_path/../Frameworks"
LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
index 4240613a0c..ad0ecaf4ab 100644
--- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
+++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
@@ -174,7 +174,7 @@ void MediaPluginLibVLC::initVLC()
};
#if LL_DARWIN
- setenv("VLC_PLUGIN_PATH", ".", 1);
+ setenv("VLC_PLUGIN_PATH", "./plugins", 1);
#endif
int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv);
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 214df5c2aa..2d5b46cee3 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -830,7 +830,7 @@ set(viewer_SOURCE_FILES
llviewerwearable.cpp
llviewerwindow.cpp
llviewerwindowlistener.cpp
- llvisualeffect.cpp
+ llvisualeffect.cpp
llvlcomposition.cpp
llvlmanager.cpp
llvoavatar.cpp
@@ -984,7 +984,7 @@ set(viewer_HEADER_FILES
fsfloatervramusage.h
fsfloaterwearablefavorites.h
fsfloaterwhitelisthelper.h
- fsjointpose.h
+ fsjointpose.h
fsgridhandler.h
fskeywords.h
fslslbridge.h
@@ -1667,7 +1667,7 @@ set(viewer_HEADER_FILES
llviewerwearable.h
llviewerwindow.h
llviewerwindowlistener.h
- llvisualeffect.h
+ llvisualeffect.h
llvlcomposition.h
llvlmanager.h
llvoavatar.h
@@ -1862,7 +1862,7 @@ if (DARWIN)
set(viewer_RESOURCE_FILES
firestorm_icon.icns
Info-Firestorm.plist
- Firestorm.xib/
+ Firestorm.xib
# CMake doesn't seem to support Xcode language variants well just yet
English.lproj/InfoPlist.strings
English.lproj/language.txt
@@ -2161,7 +2161,7 @@ set(viewer_APPSETTINGS_FILES
featuretable_mac.txt
featuretable_linux.txt
)
-
+
if (WINDOWS)
LIST(APPEND viewer_APPSETTINGS_FILES app_settings/growl_notifications.xml)
endif (WINDOWS)
@@ -2289,7 +2289,7 @@ if (WINDOWS)
# And of course it's straightforward to read a text file in Python.
set(COPY_INPUT_DEPENDENCIES
- # The following commented dependencies are determined at variably at build time. Can't do this here.
+ # The following commented dependencies are determined variably at build time. Can't do this here.
app_settings/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
#${SHARED_LIB_STAGING_DIR}/openjp2.dll # Only copy OpenJPEG dll if needed
@@ -2501,6 +2501,7 @@ if (WINDOWS)
elseif (DARWIN)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
+ RESOURCE SecondLife.xib
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
# Force the SDK version in the linked executable to be 10.12. This will fool
# macOS into using the pre-Mojave display system, avoiding the blurry display that
@@ -2561,12 +2562,12 @@ target_link_libraries(${VIEWER_BINARY_NAME}
llcommon
llmeshoptimizer
llwebrtc
- ll::ndof
lllogin
llprimitive
llappearance
${LLPHYSICSEXTENSIONS_LIBRARIES}
ll::bugsplat
+ ll::ndof
ll::tracy
ll::openxr
fs::glod # restore GLOD dependencies
@@ -2757,10 +2758,8 @@ if (DARWIN)
PROPERTIES
OUTPUT_NAME "${product}"
# From Contents/MacOS/SecondLife, look in Contents/Frameworks
- INSTALL_RPATH "@loader_path/../Frameworks"
- # SIGH, as of 2018-05-24 (cmake 3.11.1) the INSTALL_RPATH property simply
- # does not work. Try this:
- LINK_FLAGS "-rpath @loader_path/../Frameworks"
+ BUILD_WITH_INSTALL_RPATH 1
+ INSTALL_RPATH "@executable_path/../Frameworks"
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-Firestorm.plist"
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}"
)
@@ -2928,8 +2927,8 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
endif (USE_BUGSPLAT)
if (DARWIN) #Linux/Windows generates symbols via viewer_manifest.py/fs_viewer_manifest.py
- # for both Bugsplat and Breakpad
- add_dependencies(llpackage generate_symbols)
+ # for both Bugsplat and Breakpad
+ add_dependencies(llpackage generate_symbols)
endif()
endif ()
diff --git a/indra/newview/Firestorm.nib b/indra/newview/Firestorm.nib
deleted file mode 100644
index 68ad890c20..0000000000
Binary files a/indra/newview/Firestorm.nib and /dev/null differ
diff --git a/indra/newview/SecondLife.nib b/indra/newview/SecondLife.nib
deleted file mode 100644
index c4ddca50dc..0000000000
Binary files a/indra/newview/SecondLife.nib and /dev/null differ
diff --git a/indra/newview/SecondLife.xib b/indra/newview/SecondLife.xib
index fbff8fe307..781a390673 100644
--- a/indra/newview/SecondLife.xib
+++ b/indra/newview/SecondLife.xib
@@ -1,1136 +1,193 @@
-
-
- 1060
- 12E55
- 4457.6
- 1187.39
- 626.00
-
-
- NSCustomObject
- NSMenu
- NSMenuItem
- NSScrollView
- NSScroller
- NSTextView
- NSView
- NSWindowTemplate
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
-
-
-
-
-
-
- 31
- 2
- {{272, 176}, {938, 42}}
- -1535638528
- Input Window
- LLUserInputWindow
-
-
-
-
- 256
-
-
-
- 256
-
-
-
- 2322
-
-
-
- 2322
-
- Apple HTML pasteboard type
- Apple PDF pasteboard type
- Apple PICT pasteboard type
- Apple PNG pasteboard type
- Apple URL pasteboard type
- CorePasteboardFlavorType 0x6D6F6F76
- NSColor pasteboard type
- NSFilenamesPboardType
- NSStringPboardType
- NeXT Encapsulated PostScript v1.2 pasteboard type
- NeXT RTFD pasteboard type
- NeXT Rich Text Format v1.0 pasteboard type
- NeXT TIFF v4.0 pasteboard type
- NeXT font pasteboard type
- NeXT ruler pasteboard type
- WebURLsWithTitlesPboardType
- public.url
-
- {938, 42}
-
-
-
- _NS:13
-
-
-
-
-
-
-
-
-
-
-
- 166
-
-
-
- 938
- 1
-
-
- 67121127
- 0
-
-
- 3
- MQA
-
-
-
- 6
- System
- selectedTextBackgroundColor
-
- 3
- MC42NjY2NjY2NjY3AA
-
-
-
- 6
- System
- selectedTextColor
-
- 3
- MAA
-
-
-
-
-
-
- 1
- MCAwIDEAA
-
-
- {8, -8}
- 13
-
-
-
-
-
- 1
-
- 6
- {939, 10000000}
-
-
-
- {{1, 1}, {938, 42}}
-
-
-
- _NS:11
-
-
-
- {4, 5}
-
- 79691776
-
-
-
-
-
- file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff
-
-
-
-
- 3
- MCAwAA
-
-
-
- 4
-
-
-
- 256
- {{923, 1}, {16, 42}}
-
-
-
- _NS:83
- NO
-
- _doScroller:
- 0.96666666666666667
-
-
-
- -2147483392
- {{-100, -100}, {87, 18}}
-
-
-
- _NS:33
- NO
- 1
-
- _doScroller:
- 1
- 0.94565218687057495
-
-
- {{-1, -1}, {940, 44}}
-
-
-
- _NS:9
- 133138
-
-
-
- 0.25
- 4
- 1
-
-
- {938, 42}
-
-
-
- _NS:21
-
- {{0, 0}, {2560, 1418}}
- {10000000000000, 10000000000000}
- YES
-
-
-
-
-
-
- terminate:
-
-
-
- 823
-
-
-
- orderFrontStandardAboutPanel:
-
-
-
- 142
-
-
-
- delegate
-
-
-
- 845
-
-
-
- performMiniaturize:
-
-
-
- 37
-
-
-
- arrangeInFront:
-
-
-
- 39
-
-
-
- performZoom:
-
-
-
- 240
-
-
-
- hide:
-
-
-
- 369
-
-
-
- hideOtherApplications:
-
-
-
- 370
-
-
-
- unhideAllApplications:
-
-
-
- 372
-
-
-
- cut:
-
-
-
- 768
-
-
-
- paste:
-
-
-
- 769
-
-
-
- undo:
-
-
-
- 776
-
-
-
- copy:
-
-
-
- 782
-
-
-
- selectAll:
-
-
-
- 785
-
-
-
- toggleFullScreen:
-
-
-
- 842
-
-
-
- window
-
-
-
- 850
-
-
-
- inputWindow
-
-
-
- 953
-
-
-
- inputView
-
-
-
- 954
-
-
-
-
-
- 0
-
-
-
-
-
- -2
-
-
- File's Owner
-
-
- -1
-
-
- First Responder
-
-
- -3
-
-
- Application
-
-
- 29
-
-
-
-
-
-
-
-
- Main Menu
-
-
- 19
-
-
-
-
-
-
-
- 56
-
-
-
-
-
-
-
- 103
-
-
-
-
-
- 57
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 58
-
-
-
-
- 134
-
-
-
-
- 150
-
-
-
-
- 136
-
-
-
-
- 144
-
-
-
-
- 129
-
-
-
-
- 143
-
-
-
-
- 236
-
-
-
-
- 131
-
-
-
-
-
-
-
- 149
-
-
-
-
- 145
-
-
-
-
- 130
-
-
-
-
- 24
-
-
-
-
-
-
-
-
-
-
-
- 92
-
-
-
-
- 5
-
-
-
-
- 239
-
-
-
-
- 23
-
-
-
-
- 711
-
-
-
-
-
-
-
- 712
-
-
-
-
-
-
-
-
-
-
-
-
-
- 716
-
-
-
-
- 717
-
-
-
-
- 718
-
-
-
-
- 721
-
-
-
-
- 824
-
-
-
-
- 841
-
-
-
-
- 828
-
-
-
-
-
-
-
- 829
-
-
-
-
-
- 713
-
-
-
-
- 714
-
-
-
-
- 715
-
-
-
-
- 941
-
-
-
-
-
-
-
- 942
-
-
-
-
-
-
-
- 943
-
-
-
-
-
-
-
-
-
- 944
-
-
-
-
- 945
-
-
-
-
- 946
-
-
-
-
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- LLNonInlineTextView
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
-
- 954
-
-
-
-
- LLAppDelegate
- NSObject
-
- LLNonInlineTextView
- NSWindow
- LLNSWindow
-
-
-
- inputView
- LLNonInlineTextView
-
-
- inputWindow
- NSWindow
-
-
- window
- LLNSWindow
-
-
-
- IBProjectSource
- ./Classes/LLAppDelegate.h
-
-
-
- LLNSWindow
- NSWindow
-
- IBProjectSource
- ./Classes/LLNSWindow.h
-
-
-
- LLNonInlineTextView
- NSTextView
-
- IBProjectSource
- ./Classes/LLNonInlineTextView.h
-
-
-
- LLUserInputWindow
- NSPanel
-
- IBProjectSource
- ./Classes/LLUserInputWindow.h
-
-
-
- NSTextView
-
- id
- id
-
-
-
- orderFrontSharingServicePicker:
- id
-
-
- toggleQuickLookPreviewPanel:
- id
-
-
-
- IBProjectSource
- ./Classes/NSTextView.h
-
-
-
-
- 0
- IBCocoaFramework
-
- com.apple.InterfaceBuilder.CocoaPlugin.macosx
-
-
-
- com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3
-
-
- YES
- 3
-
- {11, 11}
- {10, 3}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl b/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl
index fdb77cce6e..5837308965 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/SMAA.glsl
@@ -1351,6 +1351,10 @@ float4 SMAABlendingWeightCalculationPS(float2 texcoord,
//-----------------------------------------------------------------------------
// Neighborhood Blending Pixel Shader (Third Pass)
+vec3 srgb_to_linear(vec3 cs);
+vec4 srgb_to_linear4(vec4 cs);
+vec3 linear_to_srgb(vec3 cl);
+
float4 SMAANeighborhoodBlendingPS(float2 texcoord,
float4 offset,
SMAATexture2D(colorTex),
@@ -1369,6 +1373,7 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord,
SMAA_BRANCH
if (dot(a, float4(1.0, 1.0, 1.0, 1.0)) < 1e-5) {
float4 color = SMAASampleLevelZero(colorTex, texcoord);
+ color.rgb = srgb_to_linear(color.rgb);
#if SMAA_REPROJECTION
float2 velocity = SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, texcoord));
@@ -1377,6 +1382,7 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord,
color.a = sqrt(5.0 * length(velocity));
#endif
+ color.rgb = linear_to_srgb(color.rgb);
return color;
} else {
bool h = max(a.x, a.z) > max(a.y, a.w); // max(horizontal) > max(vertical)
@@ -1393,8 +1399,13 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord,
// We exploit bilinear filtering to mix current pixel with the chosen
// neighbor:
- float4 color = blendingWeight.x * SMAASampleLevelZero(colorTex, blendingCoord.xy);
- color += blendingWeight.y * SMAASampleLevelZero(colorTex, blendingCoord.zw);
+ float4 color = SMAASampleLevelZero(colorTex, blendingCoord.xy);
+ color.rgb = srgb_to_linear(color.rgb);
+ color = blendingWeight.x * color;
+
+ float4 color2 = SMAASampleLevelZero(colorTex, blendingCoord.zw);
+ color2.rgb = srgb_to_linear(color2.rgb);
+ color += blendingWeight.y * color2;
#if SMAA_REPROJECTION
// Antialias velocity for proper reprojection in a later stage:
@@ -1405,6 +1416,7 @@ float4 SMAANeighborhoodBlendingPS(float2 texcoord,
color.a = sqrt(5.0 * length(velocity));
#endif
+ color.rgb = linear_to_srgb(color.rgb);
return color;
}
}
diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp
index d3574f9bee..73c2542087 100644
--- a/indra/newview/fsdata.cpp
+++ b/indra/newview/fsdata.cpp
@@ -758,7 +758,7 @@ void FSData::saveLLSD(const LLSD& data, const std::string& filename, const LLDat
const std::time_t new_time = (std::time_t)last_modified.secondsSinceEpoch();
#ifdef LL_WINDOWS
- boost::filesystem::last_write_time(boost::filesystem::path(utf8str_to_utf16str(filename)), new_time);
+ boost::filesystem::last_write_time(boost::filesystem::path(ll_convert(filename)), new_time);
#else
boost::filesystem::last_write_time(boost::filesystem::path(filename), new_time);
#endif
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index 01b71df3ee..0b0e71d249 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -376,7 +376,7 @@ std::string bar = std::string([pStr UTF8String]);
- (void)sendEvent:(NSEvent *)event
{
[super sendEvent:event];
- if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
+ if ([event type] == NSEventTypeKeyUp && ([event modifierFlags] & NSEventModifierFlagCommand))
{
[[self keyWindow] sendEvent:event];
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c8f24a181d..831ab79cb9 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1193,6 +1193,7 @@ bool LLAppViewer::init()
return false;
}
+#if defined(LL_X86) || defined(LL_X86_64)
// Without SSE2 support we will crash almost immediately, warn here.
if (!gSysCPU.hasSSE2())
{
@@ -1204,6 +1205,7 @@ bool LLAppViewer::init()
// quit immediately
return false;
}
+#endif
// alert the user if they are using unsupported hardware
if (gSavedSettings.getBOOL("FSUseLegacyUnsupportedHardwareChecks") && !gSavedSettings.getBOOL("AlertedUnsupportedHardware"))
@@ -1516,7 +1518,7 @@ void LLAppViewer::initMaxHeapSize()
//------------------------------------------------------------------------------------------
//currently SL is built under 32-bit setting, we set its max heap size no more than 1.6 GB.
- #ifndef LL_X86_64
+ #if !defined(LL_X86_64) && !defined(LL_ARM64)
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize") ;
#else
F32Gigabytes max_heap_size_gb = (F32Gigabytes)gSavedSettings.getF32("MaxHeapSize64");
@@ -1579,6 +1581,7 @@ bool LLAppViewer::doFrame()
#endif
LL_RECORD_BLOCK_TIME(FTM_FRAME);
+ LL_PROFILE_GPU_ZONE("Frame");
{
// and now adjust the visuals from previous frame.
if(LLPerfStats::tunables.userAutoTuneEnabled && LLPerfStats::tunables.tuningFlag != LLPerfStats::Tunables::Nothing)
@@ -1702,33 +1705,36 @@ bool LLAppViewer::doFrame()
if (!LLApp::isExiting())
{
- LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df MainLoop"); // More appropriate name
- pingMainloopTimeout("Main:JoystickKeyboard");
-
- // Scan keyboard for movement keys. Command keys and typing
- // are handled by windows callbacks. Don't do this until we're
- // done initializing. JC
- if (gViewerWindow
- && (gHeadlessClient || gViewerWindow->getWindow()->getVisible())
- && gViewerWindow->getActive()
- && !gViewerWindow->getWindow()->getMinimized()
- && LLStartUp::getStartupState() == STATE_STARTED
- && (gHeadlessClient || !gViewerWindow->getShowProgress())
- && !gFocusMgr.focusLocked())
{
- LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df JoystickKeyboard"); // Move this to the right place
- LLPerfStats::RecordSceneTime T (LLPerfStats::StatType_t::RENDER_IDLE);
- joystick->scanJoystick();
- gKeyboard->scanKeyboard();
- gViewerInput.scanMouse();
- // Chalice Yao's crouch toggle
- static LLCachedControl fsCrouchToggle(gSavedPerAccountSettings, "FSCrouchToggle");
- static LLCachedControl fsCrouchToggleStatus(gSavedPerAccountSettings, "FSCrouchToggleStatus");
- if (fsCrouchToggle && fsCrouchToggleStatus)
+ LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df MainLoop"); // More appropriate name
+ pingMainloopTimeout("Main:JoystickKeyboard");
+
+ // Scan keyboard for movement keys. Command keys and typing
+ // are handled by windows callbacks. Don't do this until we're
+ // done initializing. JC
+ if (gViewerWindow
+ && (gHeadlessClient || gViewerWindow->getWindow()->getVisible())
+ && gViewerWindow->getActive()
+ && !gViewerWindow->getWindow()->getMinimized()
+ && LLStartUp::getStartupState() == STATE_STARTED
+ && (gHeadlessClient || !gViewerWindow->getShowProgress())
+ && !gFocusMgr.focusLocked())
{
- gAgent.moveUp(-1);
+ LL_PROFILE_ZONE_NAMED_CATEGORY_APP("df JoystickKeyboard"); // Move this to the right place
+ LLPerfStats::RecordSceneTime T(LLPerfStats::StatType_t::RENDER_IDLE);
+ joystick->scanJoystick();
+ gKeyboard->scanKeyboard();
+ gViewerInput.scanMouse();
+
+ // Chalice Yao's crouch toggle
+ static LLCachedControl fsCrouchToggle(gSavedPerAccountSettings, "FSCrouchToggle");
+ static LLCachedControl fsCrouchToggleStatus(gSavedPerAccountSettings, "FSCrouchToggleStatus");
+ if (fsCrouchToggle && fsCrouchToggleStatus)
+ {
+ gAgent.moveUp(-1);
+ }
+ //
}
- //
}
// Update state based on messages, user input, object idle.
@@ -3746,17 +3752,6 @@ bool LLAppViewer::initWindow()
LLNotificationsUI::LLNotificationManager::getInstance();
-
-#ifdef LL_DARWIN
- //Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
- LLOSInfo& os_info = LLOSInfo::instance();
- if (os_info.mMajorVer == 10 && os_info.mMinorVer < 7)
- {
- if ( os_info.mMinorVer == 6 && os_info.mBuild < 8 )
- gViewerWindow->getWindow()->setOldResize(true);
- }
-#endif
-
if (gSavedSettings.getBOOL("WindowMaximized"))
{
gViewerWindow->getWindow()->maximize();
@@ -3879,6 +3874,11 @@ LLSD LLAppViewer::getViewerInfo() const
info["BUILD_TIME"] = __TIME__;
info["CHANNEL"] = versionInfo.getChannel();
info["ADDRESS_SIZE"] = ADDRESS_SIZE;
+#if LL_ARM64
+ info["ARCHITECTURE"] = "ARM";
+#else
+ info["ARCHITECTURE"] = "x86";
+#endif
//std::string build_config = versionInfo.getBuildConfig();
//if (build_config != "Release")
//{
@@ -5284,6 +5284,9 @@ bool LLAppViewer::initCache()
const U32 CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS = 128;
LLVOCache::getInstance()->initCache(LL_PATH_CACHE, CACHE_NUMBER_OF_REGIONS_FOR_OBJECTS, getObjectCacheVersion());
+ // Remove old, stale CEF cache folders
+ purgeCefStaleCaches();
+
return true;
}
@@ -5308,18 +5311,27 @@ void LLAppViewer::loadKeyBindings()
LLUrlRegistry::instance().setKeybindingHandler(&gViewerInput);
}
+// As per GHI #4498, remove old, stale CEF cache folders from previous sessions
+void LLAppViewer::purgeCefStaleCaches()
+{
+ // TODO: we really shouldn't use a hard coded name for the cache folder here...
+ const std::string browser_parent_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache");
+ if (LLFile::isdir(browser_parent_cache))
+ {
+ // This is a sledgehammer approach - nukes the cef_cache dir entirely
+ // which is then recreated the first time a CEF instance creates an
+ // individual cache folder. If we ever decide to retain some folders
+ // e.g. Search UI cache - then we will need a more granular approach.
+ gDirUtilp->deleteDirAndContents(browser_parent_cache);
+ }
+}
+
void LLAppViewer::purgeCache()
{
LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << LL_ENDL;
LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE);
LLVOCache::getInstance()->removeCache(LL_PATH_CACHE);
LLViewerShaderMgr::instance()->clearShaderCache();
- std::string browser_cache = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "cef_cache");
- if (LLFile::isdir(browser_cache))
- {
- // cef does not support clear_cache and clear_cookies, so clear what we can manually.
- gDirUtilp->deleteDirAndContents(browser_cache);
- }
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*");
}
@@ -6578,7 +6590,9 @@ void LLAppViewer::forceErrorBreakpoint()
#ifdef LL_WINDOWS
DebugBreak();
#else
+#if defined(LL_X86) || defined(LL_X86_64)
asm ("int $3");
+#endif
#endif
return;
}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 2bab78b74e..044e3fc3af 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -221,6 +221,7 @@ public:
void initGeneralThread();
void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
+ void purgeCefStaleCaches(); // Remove old, stale CEF cache folders
void purgeCache(); // Clear the local cache.
void purgeCacheImmediate(); //clear local cache immediately.
S32 updateTextureThreads(F32 max_time);
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 39af3f997c..0bba754438 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -115,6 +115,11 @@ static void exceptionTerminateHandler()
int main( int argc, char **argv )
{
+ // Call Tracy first thing to have it allocate memory
+ // https://github.com/wolfpld/tracy/issues/196
+ LL_PROFILER_FRAME_END;
+ LL_PROFILER_SET_THREAD_NAME("App");
+
gArgC = argc;
gArgV = argv;
diff --git a/indra/newview/llappviewermacosx-objc.h b/indra/newview/llappviewermacosx-objc.h
index d0ae0a7fc2..3fbf4202f1 100644
--- a/indra/newview/llappviewermacosx-objc.h
+++ b/indra/newview/llappviewermacosx-objc.h
@@ -30,9 +30,6 @@
#include
#include
-//Why? Because BOOL
-void launchApplication(const std::string* app_name, const std::vector* args);
-
void force_ns_sxeption();
#endif // LL_LLAPPVIEWERMACOSX_OBJC_H
diff --git a/indra/newview/llappviewermacosx-objc.mm b/indra/newview/llappviewermacosx-objc.mm
index 9b6bfe621b..2ea3f2f171 100644
--- a/indra/newview/llappviewermacosx-objc.mm
+++ b/indra/newview/llappviewermacosx-objc.mm
@@ -33,45 +33,6 @@
#include "llappviewermacosx-objc.h"
-void launchApplication(const std::string* app_name, const std::vector* args)
-{
-
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- if (app_name->empty()) return;
-
- NSMutableString* app_name_ns = [NSMutableString stringWithString:[[NSBundle mainBundle] resourcePath]]; //Path to resource dir
- [app_name_ns appendFormat:@"/%@", [NSString stringWithCString:app_name->c_str()
- encoding:[NSString defaultCStringEncoding]]];
-
- NSMutableArray *args_ns = nil;
- args_ns = [[NSMutableArray alloc] init];
-
- for (int i=0; i < args->size(); ++i)
- {
- NSLog(@"Adding string %s", (*args)[i].c_str());
- [args_ns addObject:
- [NSString stringWithCString:(*args)[i].c_str()
- encoding:[NSString defaultCStringEncoding]]];
- }
-
- NSTask *task = [[NSTask alloc] init];
- NSBundle *bundle = [NSBundle bundleWithPath:[[NSWorkspace sharedWorkspace] fullPathForApplication:app_name_ns]];
- [task setLaunchPath:[bundle executablePath]];
- [task setArguments:args_ns];
- [task launch];
-
-// NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
-// NSURL *url = [NSURL fileURLWithPath:[workspace fullPathForApplication:app_name_ns]];
-//
-// NSError *error = nil;
-// [workspace launchApplicationAtURL:url options:0 configuration:[NSDictionary dictionaryWithObject:args_ns forKey:NSWorkspaceLaunchConfigurationArguments] error:&error];
- //TODO Handle error
-
- [pool release];
- return;
-}
-
void force_ns_sxeption()
{
NSException *exception = [NSException exceptionWithName:@"Forced NSException" reason:nullptr userInfo:nullptr];
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index aab6d00573..b074c40c17 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -258,6 +258,11 @@ void infos(const std::string& message)
int main( int argc, char **argv )
{
+ // Call Tracy first thing to have it allocate memory
+ // https://github.com/wolfpld/tracy/issues/196
+ LL_PROFILER_FRAME_END;
+ LL_PROFILER_SET_THREAD_NAME("App");
+
// Store off the command line args for use later.
gArgC = argc;
gArgV = argv;
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index ba3e900580..fbdb48cf0c 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -318,8 +318,8 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
NvAPI_UnicodeString profile_name;
std::string app_name = LLTrans::getString("APP_NAME");
- llutf16string w_app_name = utf8str_to_utf16str(app_name);
- wsprintf(profile_name, L"%s", w_app_name.c_str());
+ std::wstring w_app_name = ll_convert(app_name);
+ wsprintf(reinterpret_cast(profile_name), L"%s", w_app_name.c_str());
NvDRSProfileHandle hProfile = 0;
// (3) Check if we already have an application profile for the viewer
status = NvAPI_DRS_FindProfileByName(hSession, profile_name, &hProfile);
@@ -336,7 +336,7 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
NVDRS_PROFILE profileInfo;
profileInfo.version = NVDRS_PROFILE_VER;
profileInfo.isPredefined = 0;
- wsprintf(profileInfo.profileName, L"%s", w_app_name.c_str());
+ wsprintf(reinterpret_cast(profileInfo.profileName), L"%s", w_app_name.c_str());
status = NvAPI_DRS_CreateProfile(hSession, &profileInfo, &hProfile);
if (status != NVAPI_OK)
@@ -351,9 +351,9 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
NVDRS_APPLICATION profile_application;
profile_application.version = NVDRS_APPLICATION_VER;
- llutf16string w_exe_name = utf8str_to_utf16str(exe_name);
+ std::wstring w_exe_name = ll_convert(exe_name);
NvAPI_UnicodeString profile_app_name;
- wsprintf(profile_app_name, L"%s", w_exe_name.c_str());
+ wsprintf(reinterpret_cast(profile_app_name), L"%s", w_exe_name.c_str());
status = NvAPI_DRS_GetApplicationInfo(hSession, hProfile, profile_app_name, &profile_application);
if (status != NVAPI_OK && status != NVAPI_EXECUTABLE_NOT_FOUND)
@@ -369,10 +369,10 @@ void ll_nvapi_init(NvDRSSessionHandle hSession)
NVDRS_APPLICATION application;
application.version = NVDRS_APPLICATION_VER;
application.isPredefined = 0;
- wsprintf(application.appName, L"%s", w_exe_name.c_str());
- wsprintf(application.userFriendlyName, L"%s", w_exe_name.c_str());
- wsprintf(application.launcher, L"%s", w_exe_name.c_str());
- wsprintf(application.fileInFolder, L"%s", "");
+ wsprintf(reinterpret_cast(application.appName), L"%s", w_exe_name.c_str());
+ wsprintf(reinterpret_cast(application.userFriendlyName), L"%s", w_exe_name.c_str());
+ wsprintf(reinterpret_cast(application.launcher), L"%s", w_exe_name.c_str());
+ wsprintf(reinterpret_cast(application.fileInFolder), L"%s", "");
status = NvAPI_DRS_CreateApplication(hSession, hProfile, &application);
if (status != NVAPI_OK)
@@ -723,7 +723,7 @@ void LLAppViewerWin32::disableWinErrorReporting()
{
std::string executable_name = gDirUtilp->getExecutableFilename();
- if( S_OK == WerAddExcludedApplication( utf8str_to_utf16str(executable_name).c_str(), FALSE ) )
+ if( S_OK == WerAddExcludedApplication(ll_convert(executable_name).c_str(), FALSE ) )
{
LL_INFOS() << "WerAddExcludedApplication() succeeded for " << executable_name << LL_ENDL;
}
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 1c8864a9df..46696fc4a4 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -204,7 +204,7 @@ public:
NUM_RENDER_TYPES,
};
- #ifdef LL_PROFILER_ENABLE_RENDER_DOC
+ #if LL_PROFILER_ENABLE_RENDER_DOC
static inline const char* lookupPassName(U32 pass)
{
switch (pass)
@@ -340,7 +340,7 @@ public:
}
}
#else
- static inline const char* lookupPass(U32 pass) { return ""; }
+ static inline const char* lookupPassName(U32 pass) { return ""; }
#endif
LLRenderPass(const U32 type);
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index ef9b585423..7e16312678 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -804,9 +804,6 @@ static void xform4a(LLVector4a &tex_coord, const LLVector4a& trans, const LLVect
// Texture transforms are done about the center of the face.
st.setAdd(tex_coord, trans);
- // Handle rotation
- LLVector4a rot_st;
-
//
LLVector4a s0;
s0.splat(st, 0);
@@ -879,7 +876,6 @@ bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
//VECTORIZE THIS
LLMatrix4a mat_vert;
mat_vert.loadu(mat_vert_in);
- // LLVector4a new_extents[2]; Unused.
llassert(less_than_max_mag(face.mExtents[0]));
llassert(less_than_max_mag(face.mExtents[1]));
@@ -2400,8 +2396,6 @@ bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
if (joint)
{
- LLVector4a jointPos;
-
LLMatrix4a worldMat;
worldMat.loadu((F32*)&joint->getWorldMatrix().mMatrix[0][0]);
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index e2f2bdf5fc..1addc66269 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -313,7 +313,7 @@ bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
success = GetOpenFileName(&mOFN);
if (success)
{
- std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
+ std::string filename = ll_convert(std::wstring(mFilesW));
mFiles.push_back(filename);
}
@@ -379,7 +379,7 @@ bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
// lengths.
if( wcslen(mOFN.lpstrFile) > mOFN.nFileOffset ) /*Flawfinder: ignore*/
{
- std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
+ std::string filename = ll_convert(std::wstring(mFilesW));
mFiles.push_back(filename);
}
else
@@ -393,7 +393,7 @@ bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
break;
if (*tptrw == 0)
tptrw++; // shouldn't happen?
- std::string filename = utf16str_to_utf8str(llutf16string(tptrw));
+ std::string filename = ll_convert(std::wstring(tptrw));
if (dirname.empty())
dirname = filename + "\\";
else
@@ -439,7 +439,7 @@ bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
mOFN.lpstrFile = mFilesW;
if (!filename.empty())
{
- llutf16string tstring = utf8str_to_utf16str(filename);
+ std::wstring tstring = ll_convert(filename);
wcsncpy(mFilesW, tstring.c_str(), FILENAME_BUFFER_SIZE); } /*Flawfinder: ignore*/
else
{
@@ -652,7 +652,7 @@ bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
success = GetSaveFileName(&mOFN);
if (success)
{
- std::string filename = utf16str_to_utf8str(llutf16string(mFilesW));
+ std::string filename = ll_convert(std::wstring(mFilesW));
mFiles.push_back(filename);
}
}
diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm
index b21bc724fb..978069457c 100644
--- a/indra/newview/llfilepicker_mac.mm
+++ b/indra/newview/llfilepicker_mac.mm
@@ -86,7 +86,7 @@ std::unique_ptr> doLoadDialog(const std::vector doSaveDialog(const std::string* file,
[panel setNameFieldStringValue: fileName];
[panel setDirectoryURL: url];
if([panel runModal] ==
- NSFileHandlingPanelOKButton)
+ NSModalResponseOK)
{
NSURL* url = [panel URL];
NSString* p = [url path];
@@ -211,7 +211,7 @@ void doSaveDialogModeless(const std::string* file,
[panel beginWithCompletionHandler:^(NSModalResponse result)
{
- if (result == NSOKButton)
+ if (result == NSModalResponseOK)
{
NSURL* url = [panel URL];
NSString* p = [url path];
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 8b8b52e5ce..829654bf86 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -1301,7 +1301,7 @@ void LLFloaterEmojiPicker::saveState()
if (!recentlyUsed.empty())
recentlyUsed += ",";
char buffer[32];
- sprintf(buffer, "%u", (U32)emoji);
+ snprintf(buffer, sizeof(buffer), "%u", (U32)emoji);
recentlyUsed += buffer;
if (!--maxCount)
break;
@@ -1318,7 +1318,7 @@ void LLFloaterEmojiPicker::saveState()
if (!frequentlyUsed.empty())
frequentlyUsed += ",";
char buffer[32];
- sprintf(buffer, "%u:%u", (U32)it.first, (U32)it.second);
+ snprintf(buffer, sizeof(buffer), "%u:%u", (U32)it.first, (U32)it.second);
frequentlyUsed += buffer;
if (!--maxCount)
break;
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 7e0e81498f..a165f8ccfe 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -94,7 +94,7 @@ BOOL CALLBACK di8_list_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr,
// Capable of detecting devices like Oculus Rift
if (device_instance_ptr && pvRef)
{
- std::string product_name = utf16str_to_utf8str(llutf16string(device_instance_ptr->tszProductName));
+ std::string product_name = ll_convert(std::wstring(device_instance_ptr->tszProductName));
S32 size = sizeof(GUID);
LLSD::Binary data; //just an std::vector
data.resize(size);
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index c98c87240d..63eee4c2af 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -334,7 +334,7 @@ private:
std::unique_ptr< ll::prefs::SearchData > mSearchData;
bool mSearchDataDirty;
- boost::signals2::connection mImpostorsChangedSignal;
+ boost::signals2::connection mImpostorsChangedSignal;
boost::signals2::connection mComplexityChangedSignal;
void onUpdateFilterTerm( bool force = false );
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h
index a1a54f238d..6f793c1379 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h
@@ -61,7 +61,7 @@ protected:
void onBtnOK(const LLSD& userdata);
void onBtnCancel(const LLSD& userdata);
- boost::signals2::connection mImpostorsChangedSignal;
+ boost::signals2::connection mImpostorsChangedSignal;
boost::signals2::connection mComplexityChangedSignal;
boost::signals2::connection mComplexityModeChangedSignal;
boost::signals2::connection mLODFactorChangedSignal;
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index d8b3f996aa..8da835ed7d 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -45,7 +45,9 @@
#include "llworld.h"
#include "tinygltf/tiny_gltf.h"
-#include
+
+#include
+#include
#include
@@ -555,8 +557,7 @@ void LLGLTFMaterialList::onAssetLoadComplete(const LLUUID& id, LLAssetType::ETyp
LLSD asset;
// read file into buffer
- std::istrstream str(&buffer[0], static_cast(buffer.size()));
-
+ boost::iostreams::stream str(buffer.data(), buffer.size());
if (LLSDSerialize::deserialize(asset, str, buffer.size()))
{
if (asset.has("version") && LLGLTFMaterial::isAcceptedVersion(asset["version"].asString()))
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index da1f1a466f..5a6e9565ae 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -523,12 +523,12 @@ bool LLGLTFPreviewTexture::render()
gPipeline.copyScreenSpaceReflections(&screen, &gPipeline.mSceneMap);
gPipeline.generateLuminance(&screen, &gPipeline.mLuminanceMap);
gPipeline.generateExposure(&gPipeline.mLuminanceMap, &gPipeline.mExposureMap, /*use_history = */ false);
- gPipeline.gammaCorrect(&screen, &gPipeline.mPostMap);
+ gPipeline.gammaCorrect(&screen, &gPipeline.mPostPingMap);
LLVertexBuffer::unbind();
- gPipeline.generateGlow(&gPipeline.mPostMap);
- gPipeline.combineGlow(&gPipeline.mPostMap, &screen);
- gPipeline.renderDoF(&screen, &gPipeline.mPostMap);
- gPipeline.applyFXAA(&gPipeline.mPostMap, &screen);
+ gPipeline.generateGlow(&gPipeline.mPostPingMap);
+ gPipeline.combineGlow(&gPipeline.mPostPingMap, &screen);
+ gPipeline.renderDoF(&screen, &gPipeline.mPostPingMap);
+ gPipeline.applyFXAA(&gPipeline.mPostPingMap, &screen);
// *HACK: Restore mExposureMap (it will be consumed by generateExposure next frame)
gPipeline.mExposureMap.swapFBORefs(gPipeline.mLastExposure);
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index d768f2bb49..82fbc5e21a 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -94,6 +94,7 @@ void LLHeroProbeManager::update()
//