diff options
Diffstat (limited to 'indra')
277 files changed, 10017 insertions, 6882 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 24c98bfada..001bb4b935 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -82,8 +82,7 @@ if (VIEWER) if (LINUX) add_subdirectory(${VIEWER_PREFIX}linux_crash_logger) - add_subdirectory(${VIEWER_PREFIX}linux_updater) - add_dependencies(viewer linux-crash-logger-strip-target linux-updater) + add_dependencies(viewer linux-crash-logger-strip-target) elseif (DARWIN) add_subdirectory(${VIEWER_PREFIX}mac_crash_logger) add_subdirectory(${VIEWER_PREFIX}mac_updater) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 21a0c8a9ca..9bb3077797 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -211,7 +211,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST if (WINDOWS) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES - LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" LINK_FLAGS_RELEASE "" ) diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 8f7bb296ce..c254bf6f05 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -22,7 +22,7 @@ else (LINUX) set(LLCOMMON_LIBRARIES llcommon) endif (LINUX) -add_definitions(${TCMALLOC_FLAG}) +# add_definitions(${TCMALLOC_FLAG}) set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.") if(LLCOMMON_LINK_SHARED) diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake new file mode 100644 index 0000000000..105f442a30 --- /dev/null +++ b/indra/cmake/NVAPI.cmake @@ -0,0 +1,16 @@ +# -*- cmake -*- +include(Prebuilt) + +set(NVAPI ON CACHE BOOL "Use NVAPI.") + +if (NVAPI) + if (WINDOWS) + use_prebuilt_binary(nvapi) + set(NVAPI_LIBRARY nvapi) + else (WINDOWS) + set(NVAPI_LIBRARY "") + endif (WINDOWS) +else (NVAPI) + set(NVAPI_LIBRARY "") +endif (NVAPI) + diff --git a/indra/linux_updater/CMakeLists.txt b/indra/linux_updater/CMakeLists.txt deleted file mode 100644 index 4377a6333c..0000000000 --- a/indra/linux_updater/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -# -*- cmake -*- - -project(linux_updater) - -include(00-Common) -include(CURL) -include(CARes) -include(OpenSSL) -include(UI) -include(LLCommon) -include(LLVFS) -include(LLXML) -include(LLUI) -include(Linking) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLVFS_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LLUI_INCLUDE_DIRS} - ${CURL_INCLUDE_DIRS} - ${CARES_INCLUDE_DIRS} - ${OPENSSL_INCLUDE_DIRS} - ${UI_INCLUDE_DIRS} - ) - -set(linux_updater_SOURCE_FILES linux_updater.cpp) - -set(linux_updater_HEADER_FILES CMakeLists.txt) - -set_source_files_properties(${linux_updater_HEADER_FILES} - PROPERTIES HEADER_FILES_ONLY TRUE) - -list(APPEND linux_updater_SOURCE_FILES ${linux_updater_HEADER_FILES}) - -add_executable(linux-updater ${linux_updater_SOURCE_FILES}) - -target_link_libraries(linux-updater - ${CURL_LIBRARIES} - ${CARES_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${UI_LIBRARIES} - ${LLXML_LIBRARIES} - ${LLUI_LIBRARIES} - ${LLVFS_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ) - -add_custom_target(linux-updater-target ALL - DEPENDS linux-updater) diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp deleted file mode 100644 index 991dfd9dce..0000000000 --- a/indra/linux_updater/linux_updater.cpp +++ /dev/null @@ -1,926 +0,0 @@ -/** - * @file linux_updater.cpp - * @author Kyle Ambroff <ambroff@lindenlab.com>, Tofu Linden - * @brief Viewer update program for unix platforms that support GTK+ - * - * $LicenseInfo:firstyear=2008&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 <unistd.h> -#include <signal.h> -#include <errno.h> - -#include "linden_common.h" -#include "llerrorcontrol.h" -#include "llfile.h" -#include "lldir.h" -#include "lldiriterator.h" - -/*==========================================================================*| -// IQA-490: Use of LLTrans -- by this program at least -- appears to be buggy. -// With it, the 3.3.2 beta 1 linux-updater.bin crashes; without it seems stable. -#include "llxmlnode.h" -#include "lltrans.h" -|*==========================================================================*/ - -static class LLTrans -{ -public: - LLTrans(); - static std::string getString(const std::string& key); - -private: - std::string _getString(const std::string& key) const; - - typedef std::map<std::string, std::string> MessageMap; - MessageMap mMessages; -} sLLTransInstance; - -#include <curl/curl.h> -#include <map> -#include <boost/foreach.hpp> - -extern "C" { -#include <gtk/gtk.h> -} - -const guint UPDATE_PROGRESS_TIMEOUT = 100; -const guint UPDATE_PROGRESS_TEXT_TIMEOUT = 1000; -const guint ROTATE_IMAGE_TIMEOUT = 8000; - -typedef struct _updater_app_state { - std::string app_name; - std::string url; - std::string file; - std::string image_dir; - std::string dest_dir; - std::string strings_dirs; - std::string strings_file; - - LLDirIterator *image_dir_iter; - - GtkWidget *window; - GtkWidget *progress_bar; - GtkWidget *image; - - double progress_value; - bool activity_mode; - - guint image_rotation_timeout_id; - guint progress_update_timeout_id; - guint update_progress_text_timeout_id; - - bool failure; -} UpdaterAppState; - -// List of entries from strings.xml to always replace -static std::set<std::string> default_trans_args; -void init_default_trans_args() -{ - default_trans_args.insert("SECOND_LIFE"); // World - default_trans_args.insert("APP_NAME"); - default_trans_args.insert("SECOND_LIFE_GRID"); - default_trans_args.insert("SUPPORT_SITE"); -} - -bool translate_init(std::string comma_delim_path_list, - std::string base_xml_name) -{ - return true; -/*==========================================================================*| - init_default_trans_args(); - - // extract paths string vector from comma-delimited flat string - std::vector<std::string> paths; - LLStringUtil::getTokens(comma_delim_path_list, paths, ","); // split over ',' - - for(std::vector<std::string>::iterator it = paths.begin(), end_it = paths.end(); - it != end_it; - ++it) - { - (*it) = gDirUtilp->findSkinnedFilename(*it, base_xml_name); - } - - // suck the translation xml files into memory - LLXMLNodePtr root; - bool success = LLXMLNode::getLayeredXMLNode(root, paths); - if (!success) - { - // couldn't load string table XML - return false; - } - else - { - // get those strings out of the XML - LLTrans::parseStrings(root, default_trans_args); - return true; - } -|*==========================================================================*/ -} - - -void updater_app_ui_init(void); -void updater_app_quit(UpdaterAppState *app_state); -void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state); -std::string next_image_filename(std::string& image_path, LLDirIterator& iter); -void display_error(GtkWidget *parent, std::string title, std::string message); -BOOL install_package(std::string package_file, std::string destination); -BOOL spawn_viewer(UpdaterAppState *app_state); - -extern "C" { - void on_window_closed(GtkWidget *sender, GdkEvent *event, gpointer state); - gpointer worker_thread_cb(gpointer *data); - int download_progress_cb(gpointer data, double t, double d, double utotal, double ulnow); - gboolean rotate_image_cb(gpointer data); - gboolean progress_update_timeout(gpointer data); - gboolean update_progress_text_timeout(gpointer data); -} - -void updater_app_ui_init(UpdaterAppState *app_state) -{ - GtkWidget *vbox; - GtkWidget *summary_label; - GtkWidget *description_label; - GtkWidget *frame; - - llassert(app_state != NULL); - - // set up window and main container - std::string window_title = LLTrans::getString("UpdaterWindowTitle"); - app_state->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(app_state->window), - window_title.c_str()); - gtk_window_set_resizable(GTK_WINDOW(app_state->window), FALSE); - gtk_window_set_position(GTK_WINDOW(app_state->window), - GTK_WIN_POS_CENTER_ALWAYS); - - gtk_container_set_border_width(GTK_CONTAINER(app_state->window), 12); - g_signal_connect(G_OBJECT(app_state->window), "delete-event", - G_CALLBACK(on_window_closed), app_state); - - vbox = gtk_vbox_new(FALSE, 6); - gtk_container_add(GTK_CONTAINER(app_state->window), vbox); - - // set top label - std::ostringstream label_ostr; - label_ostr << "<big><b>" - << LLTrans::getString("UpdaterNowUpdating") - << "</b></big>"; - - summary_label = gtk_label_new(NULL); - gtk_label_set_use_markup(GTK_LABEL(summary_label), TRUE); - gtk_label_set_markup(GTK_LABEL(summary_label), - label_ostr.str().c_str()); - gtk_misc_set_alignment(GTK_MISC(summary_label), 0, 0.5); - gtk_box_pack_start(GTK_BOX(vbox), summary_label, FALSE, FALSE, 0); - - // create the description label - description_label = gtk_label_new(LLTrans::getString("UpdaterUpdatingDescriptive").c_str()); - gtk_label_set_line_wrap(GTK_LABEL(description_label), TRUE); - gtk_misc_set_alignment(GTK_MISC(description_label), 0, 0.5); - gtk_box_pack_start(GTK_BOX(vbox), description_label, FALSE, FALSE, 0); - - // If an image path has been set, load the background images - if (!app_state->image_dir.empty()) { - frame = gtk_frame_new(NULL); - gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); - gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); - - // load the first image - app_state->image = gtk_image_new_from_file - (next_image_filename(app_state->image_dir, *app_state->image_dir_iter).c_str()); - gtk_widget_set_size_request(app_state->image, 340, 310); - gtk_container_add(GTK_CONTAINER(frame), app_state->image); - - // rotate the images every 5 seconds - app_state->image_rotation_timeout_id = g_timeout_add - (ROTATE_IMAGE_TIMEOUT, rotate_image_cb, app_state); - } - - // set up progress bar, and update it roughly every 1/10 of a second - app_state->progress_bar = gtk_progress_bar_new(); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR(app_state->progress_bar), - LLTrans::getString("UpdaterProgressBarTextWithEllipses").c_str()); - gtk_box_pack_start(GTK_BOX(vbox), - app_state->progress_bar, FALSE, TRUE, 0); - app_state->progress_update_timeout_id = g_timeout_add - (UPDATE_PROGRESS_TIMEOUT, progress_update_timeout, app_state); - app_state->update_progress_text_timeout_id = g_timeout_add - (UPDATE_PROGRESS_TEXT_TIMEOUT, update_progress_text_timeout, app_state); - - gtk_widget_show_all(app_state->window); -} - -gboolean rotate_image_cb(gpointer data) -{ - UpdaterAppState *app_state; - std::string filename; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - filename = next_image_filename(app_state->image_dir, *app_state->image_dir_iter); - - gdk_threads_enter(); - gtk_image_set_from_file(GTK_IMAGE(app_state->image), filename.c_str()); - gdk_threads_leave(); - - return TRUE; -} - -std::string next_image_filename(std::string& image_path, LLDirIterator& iter) -{ - std::string image_filename; - iter.next(image_filename); - return gDirUtilp->add(image_path, image_filename); -} - -void on_window_closed(GtkWidget *sender, GdkEvent* event, gpointer data) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - updater_app_quit(app_state); -} - -void updater_app_quit(UpdaterAppState *app_state) -{ - if (app_state != NULL) - { - g_source_remove(app_state->progress_update_timeout_id); - - if (!app_state->image_dir.empty()) - { - g_source_remove(app_state->image_rotation_timeout_id); - } - } - - gtk_main_quit(); -} - -void display_error(GtkWidget *parent, std::string title, std::string message) -{ - GtkWidget *dialog; - - dialog = gtk_message_dialog_new(GTK_WINDOW(parent), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - "%s", message.c_str()); - gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); - gtk_dialog_run(GTK_DIALOG(dialog)); - gtk_widget_destroy(dialog); -} - -gpointer worker_thread_cb(gpointer data) -{ - UpdaterAppState *app_state; - CURL *curl; - CURLcode result; - FILE *package_file; - GError *error = NULL; - int fd; - - //g_return_val_if_fail (data != NULL, NULL); - app_state = (UpdaterAppState *) data; - - try { - - if(!app_state->url.empty()) - { - char* tmp_local_filename = NULL; - // create temporary file to store the package. - fd = g_file_open_tmp - ("secondlife-update-XXXXXX", &tmp_local_filename, &error); - if (error != NULL) - { - llerrs << "Unable to create temporary file: " - << error->message - << llendl; - - g_error_free(error); - throw 0; - } - - if(tmp_local_filename != NULL) - { - app_state->file = tmp_local_filename; - g_free(tmp_local_filename); - } - - package_file = fdopen(fd, "wb"); - if (package_file == NULL) - { - llerrs << "Failed to create temporary file: " - << app_state->file.c_str() - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailDownloadTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - throw 0; - } - - // initialize curl and start downloading the package - llinfos << "Downloading package: " << app_state->url << llendl; - - curl = curl_easy_init(); - if (curl == NULL) - { - llerrs << "Failed to initialize libcurl" << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailDownloadTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - throw 0; - } - - curl_easy_setopt(curl, CURLOPT_URL, app_state->url.c_str()); - curl_easy_setopt(curl, CURLOPT_NOSIGNAL, TRUE); - curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, TRUE); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, package_file); - curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE); - curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, - &download_progress_cb); - curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, app_state); - - result = curl_easy_perform(curl); - fclose(package_file); - curl_easy_cleanup(curl); - - if (result) - { - llerrs << "Failed to download update: " - << app_state->url - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailDownloadTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - - throw 0; - } - } - - // now pulse the progres bar back and forth while the package is - // being unpacked - gdk_threads_enter(); - std::string installing_msg = LLTrans::getString("UpdaterNowInstalling"); - gtk_progress_bar_set_text( - GTK_PROGRESS_BAR(app_state->progress_bar), - installing_msg.c_str()); - app_state->activity_mode = TRUE; - gdk_threads_leave(); - - // *TODO: if the destination is not writable, terminate this - // thread and show file chooser? - if (!install_package(app_state->file.c_str(), app_state->dest_dir)) - { - llwarns << "Failed to install package to destination: " - << app_state->dest_dir - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailInstallTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - //"Failed to update " + app_state->app_name, - gdk_threads_leave(); - throw 0; - } - - // try to spawn the new viewer - if (!spawn_viewer(app_state)) - { - llwarns << "Viewer was not installed properly in : " - << app_state->dest_dir - << llendl; - - gdk_threads_enter(); - display_error(app_state->window, - LLTrans::getString("UpdaterFailStartTitle"), - LLTrans::getString("UpdaterFailUpdateDescriptive")); - gdk_threads_leave(); - throw 0; - } - } - catch (...) - { - app_state->failure = TRUE; - } - - gdk_threads_enter(); - updater_app_quit(app_state); - gdk_threads_leave(); - - return NULL; -} - - -gboolean less_anal_gspawnsync(gchar **argv, - gchar **stderr_output, - gint *child_exit_status, - GError **spawn_error) -{ - // store current SIGCHLD handler if there is one, replace with default - // handler to make glib happy - struct sigaction sigchld_backup; - struct sigaction sigchld_appease_glib; - sigchld_appease_glib.sa_handler = SIG_DFL; - sigemptyset(&sigchld_appease_glib.sa_mask); - sigchld_appease_glib.sa_flags = 0; - sigaction(SIGCHLD, &sigchld_appease_glib, &sigchld_backup); - - gboolean rtn = g_spawn_sync(NULL, - argv, - NULL, - (GSpawnFlags) (G_SPAWN_STDOUT_TO_DEV_NULL), - NULL, - NULL, - NULL, - stderr_output, - child_exit_status, - spawn_error); - - // restore SIGCHLD handler - sigaction(SIGCHLD, &sigchld_backup, NULL); - - return rtn; -} - - -// perform a rename, or perform a (prompted) root rename if that fails -int -rename_with_sudo_fallback(const std::string& filename, const std::string& newname) -{ - int rtncode = ::rename(filename.c_str(), newname.c_str()); - lldebugs << "rename result is: " << rtncode << " / " << errno << llendl; - if (rtncode && (EACCES == errno || EPERM == errno || EXDEV == errno)) - { - llinfos << "Permission problem in rename, or moving between different mount points. Retrying as a mv under a sudo." << llendl; - // failed due to permissions, try again as a gksudo or kdesu mv wrapper hack - char *sudo_cmd = NULL; - sudo_cmd = g_find_program_in_path("gksudo"); - if (!sudo_cmd) - { - sudo_cmd = g_find_program_in_path("kdesu"); - } - if (sudo_cmd) - { - char *mv_cmd = NULL; - mv_cmd = g_find_program_in_path("mv"); - if (mv_cmd) - { - char *src_string_copy = g_strdup(filename.c_str()); - char *dst_string_copy = g_strdup(newname.c_str()); - char* argv[] = - { - sudo_cmd, - mv_cmd, - src_string_copy, - dst_string_copy, - NULL - }; - - gchar *stderr_output = NULL; - gint child_exit_status = 0; - GError *spawn_error = NULL; - if (!less_anal_gspawnsync(argv, &stderr_output, - &child_exit_status, &spawn_error)) - { - llwarns << "Failed to spawn child process: " - << spawn_error->message - << llendl; - } - else if (child_exit_status) - { - llwarns << "mv command failed: " - << (stderr_output ? stderr_output : "(no reason given)") - << llendl; - } - else - { - // everything looks good, clear the error code - rtncode = 0; - } - - g_free(src_string_copy); - g_free(dst_string_copy); - if (spawn_error) g_error_free(spawn_error); - } - } - } - return rtncode; -} - -gboolean install_package(std::string package_file, std::string destination) -{ - char *tar_cmd = NULL; - std::ostringstream command; - - // Find the absolute path to the 'tar' command. - tar_cmd = g_find_program_in_path("tar"); - if (!tar_cmd) - { - llerrs << "`tar' was not found in $PATH" << llendl; - return FALSE; - } - llinfos << "Found tar command: " << tar_cmd << llendl; - - // Unpack the tarball in a temporary place first, then move it to - // its final destination - std::string tmp_dest_dir = gDirUtilp->getTempFilename(); - if (LLFile::mkdir(tmp_dest_dir, 0744)) - { - llerrs << "Failed to create directory: " - << destination - << llendl; - - return FALSE; - } - - char *package_file_string_copy = g_strdup(package_file.c_str()); - char *tmp_dest_dir_string_copy = g_strdup(tmp_dest_dir.c_str()); - gchar *argv[8] = { - tar_cmd, - const_cast<gchar*>("--strip"), const_cast<gchar*>("1"), - const_cast<gchar*>("-xjf"), - package_file_string_copy, - const_cast<gchar*>("-C"), tmp_dest_dir_string_copy, - NULL, - }; - - llinfos << "Untarring package: " << package_file << llendl; - - // store current SIGCHLD handler if there is one, replace with default - // handler to make glib happy - struct sigaction sigchld_backup; - struct sigaction sigchld_appease_glib; - sigchld_appease_glib.sa_handler = SIG_DFL; - sigemptyset(&sigchld_appease_glib.sa_mask); - sigchld_appease_glib.sa_flags = 0; - sigaction(SIGCHLD, &sigchld_appease_glib, &sigchld_backup); - - gchar *stderr_output = NULL; - gint child_exit_status = 0; - GError *untar_error = NULL; - if (!less_anal_gspawnsync(argv, &stderr_output, - &child_exit_status, &untar_error)) - { - llwarns << "Failed to spawn child process: " - << untar_error->message - << llendl; - return FALSE; - } - - if (child_exit_status) - { - llwarns << "Untar command failed: " - << (stderr_output ? stderr_output : "(no reason given)") - << llendl; - return FALSE; - } - - g_free(tar_cmd); - g_free(package_file_string_copy); - g_free(tmp_dest_dir_string_copy); - g_free(stderr_output); - if (untar_error) g_error_free(untar_error); - - // move the existing package out of the way if it exists - if (gDirUtilp->fileExists(destination)) - { - std::string backup_dir = destination + ".backup"; - int oldcounter = 1; - while (gDirUtilp->fileExists(backup_dir)) - { - // find a foo.backup.N folder name that isn't taken yet - backup_dir = destination + ".backup." + llformat("%d", oldcounter); - ++oldcounter; - } - - if (rename_with_sudo_fallback(destination, backup_dir)) - { - llwarns << "Failed to move directory: '" - << destination << "' -> '" << backup_dir - << llendl; - return FALSE; - } - } - - // The package has been unpacked in a staging directory, now we just - // need to move it to its destination. - if (rename_with_sudo_fallback(tmp_dest_dir, destination)) - { - llwarns << "Failed to move installation to the destination: " - << destination - << llendl; - return FALSE; - } - - // \0/ Success! - return TRUE; -} - -gboolean progress_update_timeout(gpointer data) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - - app_state = (UpdaterAppState *) data; - - gdk_threads_enter(); - if (app_state->activity_mode) - { - gtk_progress_bar_pulse - (GTK_PROGRESS_BAR(app_state->progress_bar)); - } - else - { - gtk_progress_set_value(GTK_PROGRESS(app_state->progress_bar), - app_state->progress_value); - } - gdk_threads_leave(); - - return TRUE; -} - -gboolean update_progress_text_timeout(gpointer data) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - if (app_state->activity_mode == TRUE) - { - // We no longer need this timeout, it will be removed. - return FALSE; - } - - if (!app_state->progress_value) - { - return TRUE; - } - - std::string progress_text = llformat((LLTrans::getString("UpdaterProgressBarText")+" (%.0f%%)").c_str(), app_state->progress_value); - - gdk_threads_enter(); - gtk_progress_bar_set_text(GTK_PROGRESS_BAR(app_state->progress_bar), - progress_text.c_str()); - gdk_threads_leave(); - - return TRUE; -} - -int download_progress_cb(gpointer data, - double t, - double d, - double utotal, - double ulnow) -{ - UpdaterAppState *app_state; - - llassert(data != NULL); - app_state = (UpdaterAppState *) data; - - if (t <= 0.0) - { - app_state->progress_value = 0; - } - else - { - app_state->progress_value = d * 100.0 / t; - } - return 0; -} - -BOOL spawn_viewer(UpdaterAppState *app_state) -{ - llassert(app_state != NULL); - - std::string cmd = app_state->dest_dir + "/secondlife"; - GError *error = NULL; - - // We want to spawn the Viewer on the same display as the updater app - gboolean success = gdk_spawn_command_line_on_screen - (gtk_widget_get_screen(app_state->window), cmd.c_str(), &error); - - if (!success) - { - llwarns << "Failed to launch viewer: " << error->message - << llendl; - } - - if (error) g_error_free(error); - - return success; -} - -void show_usage_and_exit() -{ - std::cout << "Usage: linux-updater <--url URL | --file FILE> --name NAME --dest PATH --stringsdir PATH1,PATH2 --stringsfile FILE" - << "[--image-dir PATH]" - << std::endl; - exit(1); -} - -void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state) -{ - int i; - - for (i = 1; i < argc; i++) - { - if ((!strcmp(argv[i], "--url")) && (++i < argc)) - { - app_state->url = argv[i]; - } - else if ((!strcmp(argv[i], "--file")) && (++i < argc)) - { - app_state->file = argv[i]; - } - else if ((!strcmp(argv[i], "--name")) && (++i < argc)) - { - app_state->app_name = argv[i]; - } - else if ((!strcmp(argv[i], "--image-dir")) && (++i < argc)) - { - app_state->image_dir = argv[i]; - app_state->image_dir_iter = new LLDirIterator(argv[i], "*.jpg"); - } - else if ((!strcmp(argv[i], "--dest")) && (++i < argc)) - { - app_state->dest_dir = argv[i]; - } - else if ((!strcmp(argv[i], "--stringsdir")) && (++i < argc)) - { - app_state->strings_dirs = argv[i]; - } - else if ((!strcmp(argv[i], "--stringsfile")) && (++i < argc)) - { - app_state->strings_file = argv[i]; - } - else - { - // show usage, an invalid option was given. - show_usage_and_exit(); - } - } - - if (app_state->app_name.empty() - || (app_state->url.empty() && app_state->file.empty()) - || app_state->dest_dir.empty()) - { - show_usage_and_exit(); - } - - app_state->progress_value = 0.0; - app_state->activity_mode = FALSE; - app_state->failure = FALSE; - - translate_init(app_state->strings_dirs, app_state->strings_file); -} - -int main(int argc, char **argv) -{ - UpdaterAppState* app_state = new UpdaterAppState; - GThread *worker_thread; - - parse_args_and_init(argc, argv, app_state); - - // Initialize logger, and rename old log file - gDirUtilp->initAppDirs("SecondLife"); - LLError::initForApplication - (gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")); - std::string old_log_file = gDirUtilp->getExpandedFilename - (LL_PATH_LOGS, "updater.log.old"); - std::string log_file = - gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "updater.log"); - LLFile::rename(log_file, old_log_file); - LLError::logToFile(log_file); - - // initialize gthreads and gtk+ - if (!g_thread_supported()) - { - g_thread_init(NULL); - gdk_threads_init(); - } - - gtk_init(&argc, &argv); - - // create UI - updater_app_ui_init(app_state); - - //llinfos << "SAMPLE TRANSLATION IS: " << LLTrans::getString("LoginInProgress") << llendl; - - // create download thread - worker_thread = g_thread_create - (GThreadFunc(worker_thread_cb), app_state, FALSE, NULL); - - gdk_threads_enter(); - gtk_main(); - gdk_threads_leave(); - - // Delete the file only if created from url download. - if(!app_state->url.empty() && !app_state->file.empty()) - { - if (gDirUtilp->fileExists(app_state->file)) - { - LLFile::remove(app_state->file); - } - } - - bool success = !app_state->failure; - delete app_state->image_dir_iter; - delete app_state; - return success ? 0 : 1; -} - -/***************************************************************************** -* Dummy LLTrans implementation (IQA-490) -*****************************************************************************/ -static LLTrans sStaticStrings; - -// lookup -std::string LLTrans::_getString(const std::string& key) const -{ - MessageMap::const_iterator found = mMessages.find(key); - if (found != mMessages.end()) - { - return found->second; - } - LL_WARNS("linux_updater") << "No message for key '" << key - << "' -- add to LLTrans::LLTrans() in linux_updater.cpp" - << LL_ENDL; - return key; -} - -// static lookup -std::string LLTrans::getString(const std::string& key) -{ - return sLLTransInstance._getString(key); -} - -// initialization -LLTrans::LLTrans() -{ - typedef std::pair<const char*, const char*> Pair; - static const Pair data[] = - { - Pair("UpdaterFailDownloadTitle", - "Failed to download update"), - Pair("UpdaterFailInstallTitle", - "Failed to install update"), - Pair("UpdaterFailStartTitle", - "Failed to start viewer"), - Pair("UpdaterFailUpdateDescriptive", - "An error occurred while updating Second Life. " - "Please download the latest version from www.secondlife.com."), - Pair("UpdaterNowInstalling", - "Installing Second Life..."), - Pair("UpdaterNowUpdating", - "Now updating Second Life..."), - Pair("UpdaterProgressBarText", - "Downloading update"), - Pair("UpdaterProgressBarTextWithEllipses", - "Downloading update..."), - Pair("UpdaterUpdatingDescriptive", - "Your Second Life Viewer is being updated to the latest release. " - "This may take some time, so please be patient."), - Pair("UpdaterWindowTitle", - "Second Life Update") - }; - - BOOST_FOREACH(Pair pair, data) - { - mMessages[pair.first] = pair.second; - } -} diff --git a/indra/llcharacter/llbvhconsts.h b/indra/llcharacter/llbvhconsts.h index d363a6e595..b06c279b8f 100644 --- a/indra/llcharacter/llbvhconsts.h +++ b/indra/llcharacter/llbvhconsts.h @@ -27,7 +27,7 @@ #ifndef LL_LLBVHCONSTS_H #define LL_LLBVHCONSTS_H -const F32 MAX_ANIM_DURATION = 30.f; +const F32 MAX_ANIM_DURATION = 60.f; typedef enum e_constraint_type { diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 4f6351709e..e9fb91ad73 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -29,8 +29,6 @@ //----------------------------------------------------------------------------- #include "linden_common.h" -#include "llmemtype.h" - #include "llmotioncontroller.h" #include "llkeyframemotion.h" #include "llmath.h" @@ -44,6 +42,7 @@ const U32 MAX_MOTION_INSTANCES = 32; //----------------------------------------------------------------------------- // Constants and statics //----------------------------------------------------------------------------- +F32 LLMotionController::sCurrentTimeFactor = 1.f; LLMotionRegistry LLMotionController::sRegistry; //----------------------------------------------------------------------------- @@ -127,7 +126,7 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id ) // Class Constructor //----------------------------------------------------------------------------- LLMotionController::LLMotionController() - : mTimeFactor(1.f), + : mTimeFactor(sCurrentTimeFactor), mCharacter(NULL), mAnimTime(0.f), mPrevTimerElapsed(0.f), @@ -335,7 +334,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp) //----------------------------------------------------------------------------- LLMotion* LLMotionController::createMotion( const LLUUID &id ) { - LLMemType mt(LLMemType::MTYPE_ANIMATION); // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index b996f708d2..52eaf557b1 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -168,6 +168,9 @@ public: const LLFrameTimer& getFrameTimer() { return mTimer; } + static F32 getCurrentTimeFactor() { return sCurrentTimeFactor; }; + static void setCurrentTimeFactor(F32 factor) { sCurrentTimeFactor = factor; }; + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap @@ -187,7 +190,8 @@ protected: void deactivateStoppedMotions(); protected: - F32 mTimeFactor; + F32 mTimeFactor; // 1.f for normal speed + static F32 sCurrentTimeFactor; // Value to use for initialization static LLMotionRegistry sRegistry; LLPoseBlender mPoseBlender; diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 694e27f371..281fb14781 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -89,6 +89,7 @@ protected: // An interface class for a generalized parametric modification of the avatar mesh // Contains data that is specific to each Avatar //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLVisualParam { public: @@ -160,6 +161,6 @@ protected: S32 mID; // id for storing weight/morphtarget compares compactly LLVisualParamInfo *mInfo; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLVisualParam_H diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 66e2bc9095..5cce8ff2c4 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -53,7 +53,7 @@ set(llcommon_SOURCE_FILES lleventfilter.cpp llevents.cpp lleventtimer.cpp - llfasttimer_class.cpp + llfasttimer.cpp llfile.cpp llfindlocale.cpp llfixedbuffer.cpp @@ -71,7 +71,6 @@ set(llcommon_SOURCE_FILES llmd5.cpp llmemory.cpp llmemorystream.cpp - llmemtype.cpp llmetrics.cpp llmetricperformancetester.cpp llmortician.cpp @@ -168,7 +167,6 @@ set(llcommon_HEADER_FILES lleventemitter.h llextendedstatus.h llfasttimer.h - llfasttimer_class.h llfile.h llfindlocale.h llfixedbuffer.h @@ -197,7 +195,6 @@ set(llcommon_HEADER_FILES llmd5.h llmemory.h llmemorystream.h - llmemtype.h llmetrics.h llmetricperformancetester.h llmortician.h diff --git a/indra/llcommon/llallocator.cpp b/indra/llcommon/llallocator.cpp index 87654b5b97..34fc28d8cc 100644 --- a/indra/llcommon/llallocator.cpp +++ b/indra/llcommon/llallocator.cpp @@ -35,28 +35,6 @@ DECLARE_bool(heap_profile_use_stack_trace); //DECLARE_double(tcmalloc_release_rate); -// static -void LLAllocator::pushMemType(S32 type) -{ - if(isProfiling()) - { - PushMemType(type); - } -} - -// static -S32 LLAllocator::popMemType() -{ - if (isProfiling()) - { - return PopMemType(); - } - else - { - return -1; - } -} - void LLAllocator::setProfilingEnabled(bool should_enable) { // NULL disables dumping to disk @@ -94,17 +72,6 @@ std::string LLAllocator::getRawProfile() // stub implementations for when tcmalloc is disabled // -// static -void LLAllocator::pushMemType(S32 type) -{ -} - -// static -S32 LLAllocator::popMemType() -{ - return -1; -} - void LLAllocator::setProfilingEnabled(bool should_enable) { } diff --git a/indra/llcommon/llallocator.h b/indra/llcommon/llallocator.h index a91dd57d14..d26ad73c5b 100644 --- a/indra/llcommon/llallocator.h +++ b/indra/llcommon/llallocator.h @@ -29,16 +29,10 @@ #include <string> -#include "llmemtype.h" #include "llallocator_heap_profile.h" class LL_COMMON_API LLAllocator { friend class LLMemoryView; - friend class LLMemType; - -private: - static void pushMemType(S32 type); - static S32 popMemType(); public: void setProfilingEnabled(bool should_enable); diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer.cpp index 463f558c2c..6970c29092 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -1,5 +1,5 @@ /** - * @file llfasttimer_class.cpp + * @file llfasttimer.cpp * @brief Implementation of the fast timer. * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ @@ -64,19 +64,12 @@ BOOL LLFastTimer::sMetricLog = FALSE; LLMutex* LLFastTimer::sLogLock = NULL; std::queue<LLSD> LLFastTimer::sLogQueue; -#define USE_RDTSC 0 - #if LL_LINUX || LL_SOLARIS U64 LLFastTimer::sClockResolution = 1000000000; // Nanosecond resolution #else U64 LLFastTimer::sClockResolution = 1000000; // Microsecond resolution #endif -std::vector<LLFastTimer::FrameState>* LLFastTimer::sTimerInfos = NULL; -U64 LLFastTimer::sTimerCycles = 0; -U32 LLFastTimer::sTimerCalls = 0; - - // FIXME: move these declarations to the relevant modules // helper functions @@ -109,52 +102,35 @@ static timer_tree_dfs_iterator_t end_timer_tree() return timer_tree_dfs_iterator_t(); } - - // factory class that creates NamedTimers via static DeclareTimer objects class NamedTimerFactory : public LLSingleton<NamedTimerFactory> { public: NamedTimerFactory() - : mActiveTimerRoot(NULL), - mTimerRoot(NULL), - mAppTimer(NULL), - mRootFrameState(NULL) + : mTimerRoot(NULL) {} /*virtual */ void initSingleton() { mTimerRoot = new LLFastTimer::NamedTimer("root"); - - mActiveTimerRoot = new LLFastTimer::NamedTimer("Frame"); - mActiveTimerRoot->setCollapsed(false); - - mRootFrameState = new LLFastTimer::FrameState(mActiveTimerRoot); - mRootFrameState->mParent = &mTimerRoot->getFrameState(); - mActiveTimerRoot->setParent(mTimerRoot); - - mAppTimer = new LLFastTimer(mRootFrameState); + mRootFrameState.setNamedTimer(mTimerRoot); + mTimerRoot->setFrameState(&mRootFrameState); + mTimerRoot->mParent = mTimerRoot; + mTimerRoot->setCollapsed(false); + mRootFrameState.mParent = &mRootFrameState; } ~NamedTimerFactory() { std::for_each(mTimers.begin(), mTimers.end(), DeletePairedPointer()); - delete mAppTimer; - delete mActiveTimerRoot; delete mTimerRoot; - delete mRootFrameState; } - LLFastTimer::NamedTimer& createNamedTimer(const std::string& name) + LLFastTimer::NamedTimer& createNamedTimer(const std::string& name, LLFastTimer::FrameState* state) { - timer_map_t::iterator found_it = mTimers.find(name); - if (found_it != mTimers.end()) - { - return *found_it->second; - } - LLFastTimer::NamedTimer* timer = new LLFastTimer::NamedTimer(name); + timer->setFrameState(state); timer->setParent(mTimerRoot); mTimers.insert(std::make_pair(name, timer)); @@ -171,12 +147,9 @@ public: return NULL; } - LLFastTimer::NamedTimer* getActiveRootTimer() { return mActiveTimerRoot; } LLFastTimer::NamedTimer* getRootTimer() { return mTimerRoot; } - const LLFastTimer* getAppTimer() { return mAppTimer; } - LLFastTimer::FrameState& getRootFrameState() { return *mRootFrameState; } - typedef std::map<std::string, LLFastTimer::NamedTimer*> timer_map_t; + typedef std::multimap<std::string, LLFastTimer::NamedTimer*> timer_map_t; timer_map_t::iterator beginTimers() { return mTimers.begin(); } timer_map_t::iterator endTimers() { return mTimers.end(); } S32 timerCount() { return mTimers.size(); } @@ -184,55 +157,19 @@ public: private: timer_map_t mTimers; - LLFastTimer::NamedTimer* mActiveTimerRoot; LLFastTimer::NamedTimer* mTimerRoot; - LLFastTimer* mAppTimer; - LLFastTimer::FrameState* mRootFrameState; + LLFastTimer::FrameState mRootFrameState; }; -void update_cached_pointers_if_changed() -{ - // detect when elements have moved and update cached pointers - static LLFastTimer::FrameState* sFirstTimerAddress = NULL; - if (&*(LLFastTimer::getFrameStateList().begin()) != sFirstTimerAddress) - { - LLFastTimer::DeclareTimer::updateCachedPointers(); - } - sFirstTimerAddress = &*(LLFastTimer::getFrameStateList().begin()); -} - LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name, bool open ) -: mTimer(NamedTimerFactory::instance().createNamedTimer(name)) +: mTimer(NamedTimerFactory::instance().createNamedTimer(name, &mFrameState)) { mTimer.setCollapsed(!open); - mFrameState = &mTimer.getFrameState(); - update_cached_pointers_if_changed(); } LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name) -: mTimer(NamedTimerFactory::instance().createNamedTimer(name)) -{ - mFrameState = &mTimer.getFrameState(); - update_cached_pointers_if_changed(); -} - -// static -void LLFastTimer::DeclareTimer::updateCachedPointers() +: mTimer(NamedTimerFactory::instance().createNamedTimer(name, &mFrameState)) { - // propagate frame state pointers to timer declarations - for (instance_iter it = beginInstances(); it != endInstances(); ++it) - { - // update cached pointer - it->mFrameState = &it->mTimer.getFrameState(); - } - - // also update frame states of timers on stack - LLFastTimer* cur_timerp = LLFastTimer::sCurTimerData.mCurTimer; - while(cur_timerp->mLastTimerData.mCurTimer != cur_timerp) - { - cur_timerp->mFrameState = &cur_timerp->mFrameState->mTimer->getFrameState(); - cur_timerp = cur_timerp->mLastTimerData.mCurTimer; - } } //static @@ -244,7 +181,7 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer #else // windows or x86-mac or x86-linux or x86-solaris U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer { -#if USE_RDTSC || !LL_WINDOWS +#if LL_FASTTIMER_USE_RDTSC || !LL_WINDOWS //getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0); @@ -265,14 +202,13 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer } #endif -LLFastTimer::FrameState::FrameState(LLFastTimer::NamedTimer* timerp) +LLFastTimer::FrameState::FrameState() : mActiveCount(0), mCalls(0), mSelfTimeCounter(0), mParent(NULL), mLastCaller(NULL), - mMoveUpTree(false), - mTimer(timerp) + mMoveUpTree(false) {} @@ -283,12 +219,9 @@ LLFastTimer::NamedTimer::NamedTimer(const std::string& name) mTotalTimeCounter(0), mCountAverage(0), mCallAverage(0), - mNeedsSorting(false) + mNeedsSorting(false), + mFrameState(NULL) { - info_list_t& frame_state_list = getFrameStateList(); - mFrameStateIndex = frame_state_list.size(); - getFrameStateList().push_back(FrameState(this)); - mCountHistory = new U32[HISTORY_NUM]; memset(mCountHistory, 0, sizeof(U32) * HISTORY_NUM); mCallHistory = new U32[HISTORY_NUM]; @@ -355,6 +288,7 @@ S32 LLFastTimer::NamedTimer::getDepth() while(timerp) { depth++; + if (timerp->getParent() == timerp) break; timerp = timerp->mParent; } return depth; @@ -369,15 +303,6 @@ void LLFastTimer::NamedTimer::processTimes() accumulateTimings(); } -// sort timer info structs by depth first traversal order -struct SortTimersDFS -{ - bool operator()(const LLFastTimer::FrameState& i1, const LLFastTimer::FrameState& i2) - { - return i1.mTimer->getFrameStateIndex() < i2.mTimer->getFrameStateIndex(); - } -}; - // sort child timers by name struct SortTimerByName { @@ -425,8 +350,8 @@ void LLFastTimer::NamedTimer::buildHierarchy() { // since ancestors have already been visited, reparenting won't affect tree traversal //step up tree, bringing our descendants with us - //llinfos << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << - // " to child of " << timerp->getParent()->getParent()->getName() << llendl; + LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() << + " to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL; timerp->setParent(timerp->getParent()->getParent()); timerp->getFrameState().mMoveUpTree = false; @@ -458,7 +383,7 @@ void LLFastTimer::NamedTimer::accumulateTimings() LLFastTimer* cur_timer = sCurTimerData.mCurTimer; // root defined by parent pointing to self CurTimerData* cur_data = &sCurTimerData; - while(cur_timer->mLastTimerData.mCurTimer != cur_timer) + while(cur_timer && cur_timer->mLastTimerData.mCurTimer != cur_timer) { U32 cumulative_time_delta = cur_time - cur_timer->mStartTime; U32 self_time_delta = cumulative_time_delta - cur_data->mChildTime; @@ -473,7 +398,7 @@ void LLFastTimer::NamedTimer::accumulateTimings() } // traverse tree in DFS post order, or bottom up - for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(*NamedTimerFactory::instance().getActiveRootTimer()); + for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(*NamedTimerFactory::instance().getRootTimer()); it != end_timer_tree_bottom_up(); ++it) { @@ -507,12 +432,12 @@ void LLFastTimer::NamedTimer::resetFrame() static S32 call_count = 0; if (call_count % 100 == 0) { - llinfos << "countsPerSecond (32 bit): " << countsPerSecond() << llendl; - llinfos << "get_clock_count (64 bit): " << get_clock_count() << llendl; - llinfos << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << llendl; - llinfos << "getCPUClockCount32() " << getCPUClockCount32() << llendl; - llinfos << "getCPUClockCount64() " << getCPUClockCount64() << llendl; - llinfos << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << llendl; + LL_DEBUGS("FastTimers") << "countsPerSecond (32 bit): " << countsPerSecond() << LL_ENDL; + LL_DEBUGS("FastTimers") << "get_clock_count (64 bit): " << get_clock_count() << llendl; + LL_DEBUGS("FastTimers") << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << LL_ENDL; + LL_DEBUGS("FastTimers") << "getCPUClockCount32() " << getCPUClockCount32() << LL_ENDL; + LL_DEBUGS("FastTimers") << "getCPUClockCount64() " << getCPUClockCount64() << LL_ENDL; + LL_DEBUGS("FastTimers") << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << LL_ENDL; } call_count++; @@ -544,48 +469,22 @@ void LLFastTimer::NamedTimer::resetFrame() } } - - // tag timers by position in depth first traversal of tree - S32 index = 0; - for(timer_tree_dfs_iterator_t it = begin_timer_tree(*NamedTimerFactory::instance().getRootTimer()); - it != end_timer_tree(); - ++it) - { - NamedTimer* timerp = (*it); - - timerp->mFrameStateIndex = index; - index++; - - llassert_always(timerp->mFrameStateIndex < (S32)getFrameStateList().size()); - } - - // sort timers by DFS traversal order to improve cache coherency - std::sort(getFrameStateList().begin(), getFrameStateList().end(), SortTimersDFS()); - - // update pointers into framestatelist now that we've sorted it - DeclareTimer::updateCachedPointers(); - // reset for next frame + for (instance_iter it = beginInstances(); it != endInstances(); ++it) { - for (instance_iter it = beginInstances(); it != endInstances(); ++it) - { - NamedTimer& timer = *it; + NamedTimer& timer = *it; - FrameState& info = timer.getFrameState(); - info.mSelfTimeCounter = 0; - info.mCalls = 0; - info.mLastCaller = NULL; - info.mMoveUpTree = false; - // update parent pointer in timer state struct - if (timer.mParent) - { - info.mParent = &timer.mParent->getFrameState(); - } + FrameState& info = timer.getFrameState(); + info.mSelfTimeCounter = 0; + info.mCalls = 0; + info.mLastCaller = NULL; + info.mMoveUpTree = false; + // update parent pointer in timer state struct + if (timer.mParent) + { + info.mParent = &timer.mParent->getFrameState(); } } - - //sTimerCycles = 0; - //sTimerCalls = 0; } //static @@ -600,7 +499,7 @@ void LLFastTimer::NamedTimer::reset() // root defined by parent pointing to self CurTimerData* cur_data = &sCurTimerData; LLFastTimer* cur_timer = cur_data->mCurTimer; - while(cur_timer->mLastTimerData.mCurTimer != cur_timer) + while(cur_timer && cur_timer->mLastTimerData.mCurTimer != cur_timer) { cur_timer->mStartTime = cur_time; cur_data->mChildTime = 0; @@ -630,17 +529,6 @@ void LLFastTimer::NamedTimer::reset() sCurFrameIndex = 0; } -//static -LLFastTimer::info_list_t& LLFastTimer::getFrameStateList() -{ - if (!sTimerInfos) - { - sTimerInfos = new info_list_t(); - } - return *sTimerInfos; -} - - U32 LLFastTimer::NamedTimer::getHistoricalCount(S32 history_index) const { S32 history_idx = (getLastFrameIndex() + history_index) % LLFastTimer::NamedTimer::HISTORY_NUM; @@ -655,18 +543,7 @@ U32 LLFastTimer::NamedTimer::getHistoricalCalls(S32 history_index ) const LLFastTimer::FrameState& LLFastTimer::NamedTimer::getFrameState() const { - llassert_always(mFrameStateIndex >= 0); - if (this == NamedTimerFactory::instance().getActiveRootTimer()) - { - return NamedTimerFactory::instance().getRootFrameState(); - } - return getFrameStateList()[mFrameStateIndex]; -} - -// static -LLFastTimer::NamedTimer& LLFastTimer::NamedTimer::getRootNamedTimer() -{ - return *NamedTimerFactory::instance().getActiveRootTimer(); + return *mFrameState; } std::vector<LLFastTimer::NamedTimer*>::const_iterator LLFastTimer::NamedTimer::beginChildren() @@ -777,145 +654,3 @@ LLFastTimer::LLFastTimer(LLFastTimer::FrameState* state) } -////////////////////////////////////////////////////////////////////////////// -// -// Important note: These implementations must be FAST! -// - - -#if LL_WINDOWS -// -// Windows implementation of CPU clock -// - -// -// NOTE: put back in when we aren't using platform sdk anymore -// -// because MS has different signatures for these functions in winnt.h -// need to rename them to avoid conflicts -//#define _interlockedbittestandset _renamed_interlockedbittestandset -//#define _interlockedbittestandreset _renamed_interlockedbittestandreset -//#include <intrin.h> -//#undef _interlockedbittestandset -//#undef _interlockedbittestandreset - -//inline U32 LLFastTimer::getCPUClockCount32() -//{ -// U64 time_stamp = __rdtsc(); -// return (U32)(time_stamp >> 8); -//} -// -//// return full timer value, *not* shifted by 8 bits -//inline U64 LLFastTimer::getCPUClockCount64() -//{ -// return __rdtsc(); -//} - -// shift off lower 8 bits for lower resolution but longer term timing -// on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing -#if USE_RDTSC -U32 LLFastTimer::getCPUClockCount32() -{ - U32 ret_val; - __asm - { - _emit 0x0f - _emit 0x31 - shr eax,8 - shl edx,24 - or eax, edx - mov dword ptr [ret_val], eax - } - return ret_val; -} - -// return full timer value, *not* shifted by 8 bits -U64 LLFastTimer::getCPUClockCount64() -{ - U64 ret_val; - __asm - { - _emit 0x0f - _emit 0x31 - mov eax,eax - mov edx,edx - mov dword ptr [ret_val+4], edx - mov dword ptr [ret_val], eax - } - return ret_val; -} - -std::string LLFastTimer::sClockType = "rdtsc"; - -#else -//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp -// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures. -U32 LLFastTimer::getCPUClockCount32() -{ - return (U32)(get_clock_count()>>8); -} - -U64 LLFastTimer::getCPUClockCount64() -{ - return get_clock_count(); -} - -std::string LLFastTimer::sClockType = "QueryPerformanceCounter"; -#endif - -#endif - - -#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) -// -// Linux and Solaris implementation of CPU clock - non-x86. -// This is accurate but SLOW! Only use out of desperation. -// -// Try to use the MONOTONIC clock if available, this is a constant time counter -// with nanosecond resolution (but not necessarily accuracy) and attempts are -// made to synchronize this value between cores at kernel start. It should not -// be affected by CPU frequency. If not available use the REALTIME clock, but -// this may be affected by NTP adjustments or other user activity affecting -// the system time. -U64 LLFastTimer::getCPUClockCount64() -{ - struct timespec tp; - -#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time? - if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME -#endif - clock_gettime(CLOCK_REALTIME,&tp); - - return (tp.tv_sec*LLFastTimer::sClockResolution)+tp.tv_nsec; -} - -U32 LLFastTimer::getCPUClockCount32() -{ - return (U32)(LLFastTimer::getCPUClockCount64() >> 8); -} - -std::string LLFastTimer::sClockType = "clock_gettime"; - -#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) - - -#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) -// -// Mac+Linux+Solaris FAST x86 implementation of CPU clock -U32 LLFastTimer::getCPUClockCount32() -{ - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return (U32)(x >> 8); -} - -U64 LLFastTimer::getCPUClockCount64() -{ - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return x; -} - -std::string LLFastTimer::sClockType = "rdtsc"; -#endif - diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 2b25f2fabb..e42e549df5 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -1,6 +1,6 @@ /** * @file llfasttimer.h - * @brief Inline implementations of fast timers. + * @brief Declaration of a fast timer. * * $LicenseInfo:firstyear=2004&license=viewerlgpl$ * Second Life Viewer Source Code @@ -27,9 +27,363 @@ #ifndef LL_FASTTIMER_H #define LL_FASTTIMER_H -// Implementation of getCPUClockCount32() and getCPUClockCount64 are now in llfastertimer_class.cpp. +#include "llinstancetracker.h" -// pull in the actual class definition -#include "llfasttimer_class.h" +#define FAST_TIMER_ON 1 +#define DEBUG_FAST_TIMER_THREADS 1 + +class LLMutex; + +#include <queue> +#include "llsd.h" + +#define LL_FASTTIMER_USE_RDTSC 1 + + +LL_COMMON_API void assert_main_thread(); + +class LL_COMMON_API LLFastTimer +{ +public: + class NamedTimer; + + struct LL_COMMON_API FrameState + { + FrameState(); + void setNamedTimer(NamedTimer* timerp) { mTimer = timerp; } + + U32 mSelfTimeCounter; + U32 mCalls; + FrameState* mParent; // info for caller timer + FrameState* mLastCaller; // used to bootstrap tree construction + NamedTimer* mTimer; + U16 mActiveCount; // number of timers with this ID active on stack + bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame + }; + + // stores a "named" timer instance to be reused via multiple LLFastTimer stack instances + class LL_COMMON_API NamedTimer + : public LLInstanceTracker<NamedTimer> + { + friend class DeclareTimer; + public: + ~NamedTimer(); + + enum { HISTORY_NUM = 300 }; + + const std::string& getName() const { return mName; } + NamedTimer* getParent() const { return mParent; } + void setParent(NamedTimer* parent); + S32 getDepth(); + std::string getToolTip(S32 history_index = -1); + + typedef std::vector<NamedTimer*>::const_iterator child_const_iter; + child_const_iter beginChildren(); + child_const_iter endChildren(); + std::vector<NamedTimer*>& getChildren(); + + void setCollapsed(bool collapsed) { mCollapsed = collapsed; } + bool getCollapsed() const { return mCollapsed; } + + U32 getCountAverage() const { return mCountAverage; } + U32 getCallAverage() const { return mCallAverage; } + + U32 getHistoricalCount(S32 history_index = 0) const; + U32 getHistoricalCalls(S32 history_index = 0) const; + + void setFrameState(FrameState* state) { mFrameState = state; state->setNamedTimer(this); } + FrameState& getFrameState() const; + + private: + friend class LLFastTimer; + friend class NamedTimerFactory; + + // + // methods + // + NamedTimer(const std::string& name); + // recursive call to gather total time from children + static void accumulateTimings(); + + // updates cumulative times and hierarchy, + // can be called multiple times in a frame, at any point + static void processTimes(); + + static void buildHierarchy(); + static void resetFrame(); + static void reset(); + + // + // members + // + FrameState* mFrameState; + + std::string mName; + + U32 mTotalTimeCounter; + + U32 mCountAverage; + U32 mCallAverage; + + U32* mCountHistory; + U32* mCallHistory; + + // tree structure + NamedTimer* mParent; // NamedTimer of caller(parent) + std::vector<NamedTimer*> mChildren; + bool mCollapsed; // don't show children + bool mNeedsSorting; // sort children whenever child added + }; + + // used to statically declare a new named timer + class LL_COMMON_API DeclareTimer + : public LLInstanceTracker<DeclareTimer> + { + friend class LLFastTimer; + public: + DeclareTimer(const std::string& name, bool open); + DeclareTimer(const std::string& name); + + NamedTimer& getNamedTimer() { return mTimer; } + + private: + FrameState mFrameState; + NamedTimer& mTimer; + }; + +public: + LLFastTimer(LLFastTimer::FrameState* state); + + LL_FORCE_INLINE LLFastTimer(LLFastTimer::DeclareTimer& timer) + : mFrameState(&timer.mFrameState) + { +#if FAST_TIMER_ON + LLFastTimer::FrameState* frame_state = mFrameState; + mStartTime = getCPUClockCount32(); + + frame_state->mActiveCount++; + frame_state->mCalls++; + // keep current parent as long as it is active when we are + frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0); + + LLFastTimer::CurTimerData* cur_timer_data = &LLFastTimer::sCurTimerData; + mLastTimerData = *cur_timer_data; + cur_timer_data->mCurTimer = this; + cur_timer_data->mFrameState = frame_state; + cur_timer_data->mChildTime = 0; +#endif +#if DEBUG_FAST_TIMER_THREADS +#if !LL_RELEASE + assert_main_thread(); +#endif +#endif + } + + LL_FORCE_INLINE ~LLFastTimer() + { +#if FAST_TIMER_ON + LLFastTimer::FrameState* frame_state = mFrameState; + U32 total_time = getCPUClockCount32() - mStartTime; + + frame_state->mSelfTimeCounter += total_time - LLFastTimer::sCurTimerData.mChildTime; + frame_state->mActiveCount--; + + // store last caller to bootstrap tree creation + // do this in the destructor in case of recursion to get topmost caller + frame_state->mLastCaller = mLastTimerData.mFrameState; + + // we are only tracking self time, so subtract our total time delta from parents + mLastTimerData.mChildTime += total_time; + + LLFastTimer::sCurTimerData = mLastTimerData; +#endif + } + +public: + static LLMutex* sLogLock; + static std::queue<LLSD> sLogQueue; + static BOOL sLog; + static BOOL sMetricLog; + static std::string sLogName; + static bool sPauseHistory; + static bool sResetHistory; + + // call this once a frame to reset timers + static void nextFrame(); + + // dumps current cumulative frame stats to log + // call nextFrame() to reset timers + static void dumpCurTimes(); + + // call this to reset timer hierarchy, averages, etc. + static void reset(); + + static U64 countsPerSecond(); + static S32 getLastFrameIndex() { return sLastFrameIndex; } + static S32 getCurFrameIndex() { return sCurFrameIndex; } + + static void writeLog(std::ostream& os); + static const NamedTimer* getTimerByName(const std::string& name); + + struct CurTimerData + { + LLFastTimer* mCurTimer; + FrameState* mFrameState; + U32 mChildTime; + }; + static CurTimerData sCurTimerData; + +private: + + + ////////////////////////////////////////////////////////////////////////////// + // + // Important note: These implementations must be FAST! + // + + +#if LL_WINDOWS + // + // Windows implementation of CPU clock + // + + // + // NOTE: put back in when we aren't using platform sdk anymore + // + // because MS has different signatures for these functions in winnt.h + // need to rename them to avoid conflicts + //#define _interlockedbittestandset _renamed_interlockedbittestandset + //#define _interlockedbittestandreset _renamed_interlockedbittestandreset + //#include <intrin.h> + //#undef _interlockedbittestandset + //#undef _interlockedbittestandreset + + //inline U32 LLFastTimer::getCPUClockCount32() + //{ + // U64 time_stamp = __rdtsc(); + // return (U32)(time_stamp >> 8); + //} + // + //// return full timer value, *not* shifted by 8 bits + //inline U64 LLFastTimer::getCPUClockCount64() + //{ + // return __rdtsc(); + //} + + // shift off lower 8 bits for lower resolution but longer term timing + // on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing +#if LL_FASTTIMER_USE_RDTSC + static U32 getCPUClockCount32() + { + U32 ret_val; + __asm + { + _emit 0x0f + _emit 0x31 + shr eax,8 + shl edx,24 + or eax, edx + mov dword ptr [ret_val], eax + } + return ret_val; + } + + // return full timer value, *not* shifted by 8 bits + static U64 getCPUClockCount64() + { + U64 ret_val; + __asm + { + _emit 0x0f + _emit 0x31 + mov eax,eax + mov edx,edx + mov dword ptr [ret_val+4], edx + mov dword ptr [ret_val], eax + } + return ret_val; + } + +#else + //LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp + // These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures. + static U32 getCPUClockCount32() + { + return (U32)(get_clock_count()>>8); + } + + static U64 getCPUClockCount64() + { + return get_clock_count(); + } + +#endif + +#endif + + +#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) + // + // Linux and Solaris implementation of CPU clock - non-x86. + // This is accurate but SLOW! Only use out of desperation. + // + // Try to use the MONOTONIC clock if available, this is a constant time counter + // with nanosecond resolution (but not necessarily accuracy) and attempts are + // made to synchronize this value between cores at kernel start. It should not + // be affected by CPU frequency. If not available use the REALTIME clock, but + // this may be affected by NTP adjustments or other user activity affecting + // the system time. + static U64 getCPUClockCount64() + { + struct timespec tp; + +#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time? + if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME +#endif + clock_gettime(CLOCK_REALTIME,&tp); + + return (tp.tv_sec*sClockResolution)+tp.tv_nsec; + } + + static U32 getCPUClockCount32() + { + return (U32)(getCPUClockCount64() >> 8); + } + +#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) + + +#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) + // + // Mac+Linux+Solaris FAST x86 implementation of CPU clock + static U32 getCPUClockCount32() + { + U64 x; + __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); + return (U32)(x >> 8); + } + + static U64 getCPUClockCount64() + { + U64 x; + __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); + return x; + } + +#endif + + static U64 sClockResolution; + + static S32 sCurFrameIndex; + static S32 sLastFrameIndex; + static U64 sLastFrameTime; + + U32 mStartTime; + LLFastTimer::FrameState* mFrameState; + LLFastTimer::CurTimerData mLastTimerData; + +}; + +typedef class LLFastTimer LLFastTimer; #endif // LL_LLFASTTIMER_H diff --git a/indra/llcommon/llfasttimer_class.h b/indra/llcommon/llfasttimer_class.h deleted file mode 100644 index f481e968a6..0000000000 --- a/indra/llcommon/llfasttimer_class.h +++ /dev/null @@ -1,276 +0,0 @@ -/** - * @file llfasttimer_class.h - * @brief Declaration of a fast timer. - * - * $LicenseInfo:firstyear=2004&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -#ifndef LL_FASTTIMER_CLASS_H -#define LL_FASTTIMER_CLASS_H - -#include "llinstancetracker.h" - -#define FAST_TIMER_ON 1 -#define TIME_FAST_TIMERS 0 -#define DEBUG_FAST_TIMER_THREADS 1 - -class LLMutex; - -#include <queue> -#include "llsd.h" - -LL_COMMON_API void assert_main_thread(); - -class LL_COMMON_API LLFastTimer -{ -public: - class NamedTimer; - - struct LL_COMMON_API FrameState - { - FrameState(NamedTimer* timerp); - - U32 mSelfTimeCounter; - U32 mCalls; - FrameState* mParent; // info for caller timer - FrameState* mLastCaller; // used to bootstrap tree construction - NamedTimer* mTimer; - U16 mActiveCount; // number of timers with this ID active on stack - bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame - }; - - // stores a "named" timer instance to be reused via multiple LLFastTimer stack instances - class LL_COMMON_API NamedTimer - : public LLInstanceTracker<NamedTimer> - { - friend class DeclareTimer; - public: - ~NamedTimer(); - - enum { HISTORY_NUM = 300 }; - - const std::string& getName() const { return mName; } - NamedTimer* getParent() const { return mParent; } - void setParent(NamedTimer* parent); - S32 getDepth(); - std::string getToolTip(S32 history_index = -1); - - typedef std::vector<NamedTimer*>::const_iterator child_const_iter; - child_const_iter beginChildren(); - child_const_iter endChildren(); - std::vector<NamedTimer*>& getChildren(); - - void setCollapsed(bool collapsed) { mCollapsed = collapsed; } - bool getCollapsed() const { return mCollapsed; } - - U32 getCountAverage() const { return mCountAverage; } - U32 getCallAverage() const { return mCallAverage; } - - U32 getHistoricalCount(S32 history_index = 0) const; - U32 getHistoricalCalls(S32 history_index = 0) const; - - static NamedTimer& getRootNamedTimer(); - - S32 getFrameStateIndex() const { return mFrameStateIndex; } - - FrameState& getFrameState() const; - - private: - friend class LLFastTimer; - friend class NamedTimerFactory; - - // - // methods - // - NamedTimer(const std::string& name); - // recursive call to gather total time from children - static void accumulateTimings(); - - // updates cumulative times and hierarchy, - // can be called multiple times in a frame, at any point - static void processTimes(); - - static void buildHierarchy(); - static void resetFrame(); - static void reset(); - - // - // members - // - S32 mFrameStateIndex; - - std::string mName; - - U32 mTotalTimeCounter; - - U32 mCountAverage; - U32 mCallAverage; - - U32* mCountHistory; - U32* mCallHistory; - - // tree structure - NamedTimer* mParent; // NamedTimer of caller(parent) - std::vector<NamedTimer*> mChildren; - bool mCollapsed; // don't show children - bool mNeedsSorting; // sort children whenever child added - }; - - // used to statically declare a new named timer - class LL_COMMON_API DeclareTimer - : public LLInstanceTracker<DeclareTimer> - { - friend class LLFastTimer; - public: - DeclareTimer(const std::string& name, bool open); - DeclareTimer(const std::string& name); - - static void updateCachedPointers(); - - private: - NamedTimer& mTimer; - FrameState* mFrameState; - }; - -public: - LLFastTimer(LLFastTimer::FrameState* state); - - LL_FORCE_INLINE LLFastTimer(LLFastTimer::DeclareTimer& timer) - : mFrameState(timer.mFrameState) - { -#if TIME_FAST_TIMERS - U64 timer_start = getCPUClockCount64(); -#endif -#if FAST_TIMER_ON - LLFastTimer::FrameState* frame_state = mFrameState; - mStartTime = getCPUClockCount32(); - - frame_state->mActiveCount++; - frame_state->mCalls++; - // keep current parent as long as it is active when we are - frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0); - - LLFastTimer::CurTimerData* cur_timer_data = &LLFastTimer::sCurTimerData; - mLastTimerData = *cur_timer_data; - cur_timer_data->mCurTimer = this; - cur_timer_data->mFrameState = frame_state; - cur_timer_data->mChildTime = 0; -#endif -#if TIME_FAST_TIMERS - U64 timer_end = getCPUClockCount64(); - sTimerCycles += timer_end - timer_start; -#endif -#if DEBUG_FAST_TIMER_THREADS -#if !LL_RELEASE - assert_main_thread(); -#endif -#endif - } - - LL_FORCE_INLINE ~LLFastTimer() - { -#if TIME_FAST_TIMERS - U64 timer_start = getCPUClockCount64(); -#endif -#if FAST_TIMER_ON - LLFastTimer::FrameState* frame_state = mFrameState; - U32 total_time = getCPUClockCount32() - mStartTime; - - frame_state->mSelfTimeCounter += total_time - LLFastTimer::sCurTimerData.mChildTime; - frame_state->mActiveCount--; - - // store last caller to bootstrap tree creation - // do this in the destructor in case of recursion to get topmost caller - frame_state->mLastCaller = mLastTimerData.mFrameState; - - // we are only tracking self time, so subtract our total time delta from parents - mLastTimerData.mChildTime += total_time; - - LLFastTimer::sCurTimerData = mLastTimerData; -#endif -#if TIME_FAST_TIMERS - U64 timer_end = getCPUClockCount64(); - sTimerCycles += timer_end - timer_start; - sTimerCalls++; -#endif - } - -public: - static LLMutex* sLogLock; - static std::queue<LLSD> sLogQueue; - static BOOL sLog; - static BOOL sMetricLog; - static std::string sLogName; - static bool sPauseHistory; - static bool sResetHistory; - static U64 sTimerCycles; - static U32 sTimerCalls; - - typedef std::vector<FrameState> info_list_t; - static info_list_t& getFrameStateList(); - - - // call this once a frame to reset timers - static void nextFrame(); - - // dumps current cumulative frame stats to log - // call nextFrame() to reset timers - static void dumpCurTimes(); - - // call this to reset timer hierarchy, averages, etc. - static void reset(); - - static U64 countsPerSecond(); - static S32 getLastFrameIndex() { return sLastFrameIndex; } - static S32 getCurFrameIndex() { return sCurFrameIndex; } - - static void writeLog(std::ostream& os); - static const NamedTimer* getTimerByName(const std::string& name); - - struct CurTimerData - { - LLFastTimer* mCurTimer; - FrameState* mFrameState; - U32 mChildTime; - }; - static CurTimerData sCurTimerData; - static std::string sClockType; - -private: - static U32 getCPUClockCount32(); - static U64 getCPUClockCount64(); - static U64 sClockResolution; - - static S32 sCurFrameIndex; - static S32 sLastFrameIndex; - static U64 sLastFrameTime; - static info_list_t* sTimerInfos; - - U32 mStartTime; - LLFastTimer::FrameState* mFrameState; - LLFastTimer::CurTimerData mLastTimerData; - -}; - -typedef class LLFastTimer LLFastTimer; - -#endif // LL_LLFASTTIMER_CLASS_H diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 9a6d1eff5c..0dd6030fa2 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -31,6 +31,7 @@ #include <vector> #include <boost/function.hpp> #include <boost/type_traits/is_convertible.hpp> +#include <boost/type_traits/is_enum.hpp> #include <boost/unordered_map.hpp> #include <boost/shared_ptr.hpp> @@ -209,9 +210,7 @@ namespace LLInitParam class LL_COMMON_API Parser { LOG_CLASS(Parser); - public: - typedef std::vector<std::pair<std::string, bool> > name_stack_t; typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t; typedef std::vector<std::string> possible_values_t; @@ -224,32 +223,81 @@ namespace LLInitParam typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t; typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t; + private: + template<typename T, bool is_enum = boost::is_enum<T>::value> + struct ReaderWriter + { + static bool read(T& param, Parser* parser) + { + parser_read_func_map_t::iterator found_it = parser->mParserReadFuncs->find(&typeid(T)); + if (found_it != parser->mParserReadFuncs->end()) + { + return found_it->second(*parser, (void*)¶m); + } + return false; + } + + static bool write(const T& param, Parser* parser, name_stack_t& name_stack) + { + parser_write_func_map_t::iterator found_it = parser->mParserWriteFuncs->find(&typeid(T)); + if (found_it != parser->mParserWriteFuncs->end()) + { + return found_it->second(*parser, (const void*)¶m, name_stack); + } + return false; + } + }; + + // read enums as ints + template<typename T> + struct ReaderWriter<T, true> + { + static bool read(T& param, Parser* parser) + { + // read all enums as ints + parser_read_func_map_t::iterator found_it = parser->mParserReadFuncs->find(&typeid(S32)); + if (found_it != parser->mParserReadFuncs->end()) + { + S32 value; + if (found_it->second(*parser, (void*)&value)) + { + param = (T)value; + return true; + } + } + return false; + } + + static bool write(const T& param, Parser* parser, name_stack_t& name_stack) + { + parser_write_func_map_t::iterator found_it = parser->mParserWriteFuncs->find(&typeid(S32)); + if (found_it != parser->mParserWriteFuncs->end()) + { + return found_it->second(*parser, (const void*)¶m, name_stack); + } + return false; + } + }; + + public: + Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map) : mParseSilently(false), mParserReadFuncs(&read_map), mParserWriteFuncs(&write_map), mParserInspectFuncs(&inspect_map) {} + virtual ~Parser(); template <typename T> bool readValue(T& param) { - parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); - if (found_it != mParserReadFuncs->end()) - { - return found_it->second(*this, (void*)¶m); - } - return false; + return ReaderWriter<T>::read(param, this); } template <typename T> bool writeValue(const T& param, name_stack_t& name_stack) { - parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T)); - if (found_it != mParserWriteFuncs->end()) - { - return found_it->second(*this, (const void*)¶m, name_stack); - } - return false; + return ReaderWriter<T>::write(param, this, name_stack); } // dispatch inspection to registered inspection functions, for each parameter in a param block @@ -841,30 +889,24 @@ namespace LLInitParam self_t& typed_param = static_cast<self_t&>(param); // no further names in stack, attempt to parse value now if (name_stack_range.first == name_stack_range.second) - { - if (parser.readValue(typed_param.getValue())) + { + std::string name; + + // try to parse a known named value + if(name_value_lookup_t::valueNamesExist() + && parser.readValue(name) + && name_value_lookup_t::getValueFromName(name, typed_param.getValue())) { - typed_param.clearValueName(); + typed_param.setValueName(name); typed_param.setProvided(); return true; } - - // try to parse a known named value - if(name_value_lookup_t::valueNamesExist()) + // try to read value directly + else if (parser.readValue(typed_param.getValue())) { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, typed_param.getValue())) - { - typed_param.setValueName(name); - typed_param.setProvided(); - return true; - } - - } + typed_param.clearValueName(); + typed_param.setProvided(); + return true; } } return false; @@ -987,30 +1029,29 @@ namespace LLInitParam static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name) { self_t& typed_param = static_cast<self_t&>(param); - // attempt to parse block... + + if (name_stack_range.first == name_stack_range.second) + { // try to parse a known named value + std::string name; + + if(name_value_lookup_t::valueNamesExist() + && parser.readValue(name) + && name_value_lookup_t::getValueFromName(name, typed_param.getValue())) + { + typed_param.setValueName(name); + typed_param.setProvided(); + return true; + } + } + if(typed_param.deserializeBlock(parser, name_stack_range, new_name)) - { + { // attempt to parse block... typed_param.clearValueName(); typed_param.setProvided(); return true; } - if(name_value_lookup_t::valueNamesExist()) - { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, typed_param.getValue())) - { - typed_param.setValueName(name); - typed_param.setProvided(); - return true; - } - } - } return false; } @@ -1160,30 +1201,22 @@ namespace LLInitParam value_t value; // no further names in stack, attempt to parse value now if (name_stack_range.first == name_stack_range.second) - { - // attempt to read value directly - if (parser.readValue(value)) + { + std::string name; + + // try to parse a known named value + if(name_value_lookup_t::valueNamesExist() + && parser.readValue(name) + && name_value_lookup_t::getValueFromName(name, value)) { typed_param.add(value); + typed_param.mValues.back().setValueName(name); return true; } - - // try to parse a known named value - if(name_value_lookup_t::valueNamesExist()) + else if (parser.readValue(value)) // attempt to read value directly { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, value)) - { - typed_param.add(value); - typed_param.mValues.back().setValueName(name); - return true; - } - - } + typed_param.add(value); + return true; } } return false; @@ -1362,28 +1395,27 @@ namespace LLInitParam param_value_t& value = typed_param.mValues.back(); + if (name_stack_range.first == name_stack_range.second) + { // try to parse a known named value + std::string name; + + if(name_value_lookup_t::valueNamesExist() + && parser.readValue(name) + && name_value_lookup_t::getValueFromName(name, value.getValue())) + { + typed_param.mValues.back().setValueName(name); + typed_param.setProvided(); + return true; + } + } + // attempt to parse block... if(value.deserializeBlock(parser, name_stack_range, new_name)) { typed_param.setProvided(); return true; } - else if(name_value_lookup_t::valueNamesExist()) - { - // try to parse a known named value - std::string name; - if (parser.readValue(name)) - { - // try to parse a per type named value - if (name_value_lookup_t::getValueFromName(name, value.getValue())) - { - typed_param.mValues.back().setValueName(name); - typed_param.setProvided(); - return true; - } - } - } if (new_value) { // failed to parse new value, pop it off diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 10013e0f92..e725bdd9fa 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -26,7 +26,9 @@ #ifndef LLMEMORY_H #define LLMEMORY_H -#include "llmemtype.h" +#include "linden_common.h" + +class LLMutex ; #if LL_WINDOWS && LL_DEBUG #define LL_CHECK_MEMORY llassert(_CrtCheckMemory()); diff --git a/indra/llcommon/llmemtype.cpp b/indra/llcommon/llmemtype.cpp deleted file mode 100644 index 6290a7158f..0000000000 --- a/indra/llcommon/llmemtype.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/** - * @file llmemtype.cpp - * @brief Simple memory allocation/deallocation tracking stuff here - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llmemtype.h" -#include "llallocator.h" - -std::vector<char const *> LLMemType::DeclareMemType::mNameList; - -LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init"); -LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup"); -LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main"); -LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame"); - -LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput"); -LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay"); -LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio"); - -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending"); -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks"); -LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies"); - -LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll"); -LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks"); - -LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render"); -LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep"); - -LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network"); -LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics"); -LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase"); -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw"); -LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted"); - -LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage"); -LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage"); -LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable"); - -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object"); -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI"); -LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach"); - -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff"); -LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass"); - -LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition"); - -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort"); - -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors"); -LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom"); - -LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools"); - -LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar"); -LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh"); -LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles"); -LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions"); - -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow"); -LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle"); - -LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation"); -LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume"); -LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive"); - -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script"); -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun"); -LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode"); - -LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient"); -LLMemType::DeclareMemType LLMemType::MTYPE_IO_URL_REQUEST("IOUrlRequest"); - -LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit"); - -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8"); -LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9"); - -LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other"); - - -LLMemType::DeclareMemType::DeclareMemType(char const * st) -{ - mID = (S32)mNameList.size(); - mName = st; - - mNameList.push_back(mName); -} - -LLMemType::DeclareMemType::~DeclareMemType() -{ -} - -LLMemType::LLMemType(LLMemType::DeclareMemType& dt) -{ - mTypeIndex = dt.mID; - LLAllocator::pushMemType(dt.mID); -} - -LLMemType::~LLMemType() -{ - LLAllocator::popMemType(); -} - -char const * LLMemType::getNameFromID(S32 id) -{ - if (id < 0 || id >= (S32)DeclareMemType::mNameList.size()) - { - return "INVALID"; - } - - return DeclareMemType::mNameList[id]; -} - -//-------------------------------------------------------------------------------------------------- diff --git a/indra/llcommon/llmemtype.h b/indra/llcommon/llmemtype.h deleted file mode 100644 index 4945dbaf60..0000000000 --- a/indra/llcommon/llmemtype.h +++ /dev/null @@ -1,242 +0,0 @@ -/** - * @file llmemtype.h - * @brief Runtime memory usage debugging utilities. - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -#ifndef LL_MEMTYPE_H -#define LL_MEMTYPE_H - -//---------------------------------------------------------------------------- -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- - -#include "linden_common.h" -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -// WARNING: Never commit with MEM_TRACK_MEM == 1 -//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#define MEM_TRACK_MEM (0 && LL_WINDOWS) - -#include <vector> - -#define MEM_TYPE_NEW(T) - -class LL_COMMON_API LLMemType -{ -public: - - // class we'll initialize all instances of as - // static members of MemType. Then use - // to construct any new mem type. - class LL_COMMON_API DeclareMemType - { - public: - DeclareMemType(char const * st); - ~DeclareMemType(); - - S32 mID; - char const * mName; - - // array so we can map an index ID to Name - static std::vector<char const *> mNameList; - }; - - LLMemType(DeclareMemType& dt); - ~LLMemType(); - - static char const * getNameFromID(S32 id); - - static DeclareMemType MTYPE_INIT; - static DeclareMemType MTYPE_STARTUP; - static DeclareMemType MTYPE_MAIN; - static DeclareMemType MTYPE_FRAME; - - static DeclareMemType MTYPE_GATHER_INPUT; - static DeclareMemType MTYPE_JOY_KEY; - - static DeclareMemType MTYPE_IDLE; - static DeclareMemType MTYPE_IDLE_PUMP; - static DeclareMemType MTYPE_IDLE_NETWORK; - static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS; - static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION; - static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE; - static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY; - static DeclareMemType MTYPE_IDLE_AUDIO; - - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING; - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS; - static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES; - - static DeclareMemType MTYPE_MESSAGE_CHECK_ALL; - static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS; - - static DeclareMemType MTYPE_RENDER; - static DeclareMemType MTYPE_SLEEP; - - static DeclareMemType MTYPE_NETWORK; - static DeclareMemType MTYPE_PHYSICS; - static DeclareMemType MTYPE_INTERESTLIST; - - static DeclareMemType MTYPE_IMAGEBASE; - static DeclareMemType MTYPE_IMAGERAW; - static DeclareMemType MTYPE_IMAGEFORMATTED; - - static DeclareMemType MTYPE_APPFMTIMAGE; - static DeclareMemType MTYPE_APPRAWIMAGE; - static DeclareMemType MTYPE_APPAUXRAWIMAGE; - - static DeclareMemType MTYPE_DRAWABLE; - - static DeclareMemType MTYPE_OBJECT; - static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE; - static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE; - - static DeclareMemType MTYPE_DISPLAY; - static DeclareMemType MTYPE_DISPLAY_UPDATE; - static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA; - static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM; - static DeclareMemType MTYPE_DISPLAY_SWAP; - static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD; - static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION; - static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE; - static DeclareMemType MTYPE_DISPLAY_STATE_SORT; - static DeclareMemType MTYPE_DISPLAY_SKY; - static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM; - static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH; - static DeclareMemType MTYPE_DISPLAY_RENDER_UI; - static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS; - - static DeclareMemType MTYPE_VERTEX_DATA; - static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR; - static DeclareMemType MTYPE_VERTEX_DESTRUCTOR; - static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES; - static DeclareMemType MTYPE_VERTEX_CREATE_INDICES; - static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER; - static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES; - static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS; - static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES; - static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER; - static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES; - static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES; - static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER; - static DeclareMemType MTYPE_VERTEX_SET_STRIDE; - static DeclareMemType MTYPE_VERTEX_SET_BUFFER; - static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER; - static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS; - - static DeclareMemType MTYPE_SPACE_PARTITION; - - static DeclareMemType MTYPE_PIPELINE; - static DeclareMemType MTYPE_PIPELINE_INIT; - static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS; - static DeclareMemType MTYPE_PIPELINE_RESTORE_GL; - static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS; - static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL; - static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE; - static DeclareMemType MTYPE_PIPELINE_ADD_POOL; - static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE; - static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT; - static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE; - static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM; - static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE; - static DeclareMemType MTYPE_PIPELINE_MARK_MOVED; - static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT; - static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED; - static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD; - static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL; - static DeclareMemType MTYPE_PIPELINE_STATE_SORT; - static DeclareMemType MTYPE_PIPELINE_POST_SORT; - - static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS; - static DeclareMemType MTYPE_PIPELINE_RENDER_HL; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF; - static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW; - static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT; - static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS; - static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP; - static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS; - static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR; - static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM; - - static DeclareMemType MTYPE_UPKEEP_POOLS; - - static DeclareMemType MTYPE_AVATAR; - static DeclareMemType MTYPE_AVATAR_MESH; - static DeclareMemType MTYPE_PARTICLES; - static DeclareMemType MTYPE_REGIONS; - - static DeclareMemType MTYPE_INVENTORY; - static DeclareMemType MTYPE_INVENTORY_DRAW; - static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS; - static DeclareMemType MTYPE_INVENTORY_DO_FOLDER; - static DeclareMemType MTYPE_INVENTORY_POST_BUILD; - static DeclareMemType MTYPE_INVENTORY_FROM_XML; - static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM; - static DeclareMemType MTYPE_INVENTORY_VIEW_INIT; - static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW; - static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE; - - static DeclareMemType MTYPE_ANIMATION; - static DeclareMemType MTYPE_VOLUME; - static DeclareMemType MTYPE_PRIMITIVE; - - static DeclareMemType MTYPE_SCRIPT; - static DeclareMemType MTYPE_SCRIPT_RUN; - static DeclareMemType MTYPE_SCRIPT_BYTECODE; - - static DeclareMemType MTYPE_IO_PUMP; - static DeclareMemType MTYPE_IO_TCP; - static DeclareMemType MTYPE_IO_BUFFER; - static DeclareMemType MTYPE_IO_HTTP_SERVER; - static DeclareMemType MTYPE_IO_SD_SERVER; - static DeclareMemType MTYPE_IO_SD_CLIENT; - static DeclareMemType MTYPE_IO_URL_REQUEST; - - static DeclareMemType MTYPE_DIRECTX_INIT; - - static DeclareMemType MTYPE_TEMP1; - static DeclareMemType MTYPE_TEMP2; - static DeclareMemType MTYPE_TEMP3; - static DeclareMemType MTYPE_TEMP4; - static DeclareMemType MTYPE_TEMP5; - static DeclareMemType MTYPE_TEMP6; - static DeclareMemType MTYPE_TEMP7; - static DeclareMemType MTYPE_TEMP8; - static DeclareMemType MTYPE_TEMP9; - - static DeclareMemType MTYPE_OTHER; // Special; used by display code - - S32 mTypeIndex; -}; - -//---------------------------------------------------------------------------- - -#endif - diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp index b82d52797e..3678c8e1c1 100644 --- a/indra/llcommon/llstat.cpp +++ b/indra/llcommon/llstat.cpp @@ -37,736 +37,30 @@ // statics -S32 LLPerfBlock::sStatsFlags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS; // Control what is being recorded -LLPerfBlock::stat_map_t LLPerfBlock::sStatMap; // Map full path string to LLStatTime objects, tracks all active objects -std::string LLPerfBlock::sCurrentStatPath = ""; // Something like "/total_time/physics/physics step" - -//------------------------------------------------------------------------ -// Live config file to trigger stats logging -static const char STATS_CONFIG_FILE_NAME[] = "/dev/shm/simperf/simperf_proc_config.llsd"; -static const F32 STATS_CONFIG_REFRESH_RATE = 5.0; // seconds - -class LLStatsConfigFile : public LLLiveFile -{ -public: - LLStatsConfigFile() - : LLLiveFile(filename(), STATS_CONFIG_REFRESH_RATE), - mChanged(false), mStatsp(NULL) { } - - static std::string filename(); - -protected: - /* virtual */ bool loadFile(); - -public: - void init(LLPerfStats* statsp); - static LLStatsConfigFile& instance(); - // return the singleton stats config file - - bool mChanged; - -protected: - LLPerfStats* mStatsp; -}; - -std::string LLStatsConfigFile::filename() -{ - return STATS_CONFIG_FILE_NAME; -} - -void LLStatsConfigFile::init(LLPerfStats* statsp) -{ - mStatsp = statsp; -} - -LLStatsConfigFile& LLStatsConfigFile::instance() -{ - static LLStatsConfigFile the_file; - return the_file; -} - - -/* virtual */ -// Load and parse the stats configuration file -bool LLStatsConfigFile::loadFile() -{ - if (!mStatsp) - { - llwarns << "Tries to load performance configure file without initializing LPerfStats" << llendl; - return false; - } - mChanged = true; - - LLSD stats_config; - { - llifstream file(filename().c_str()); - if (file.is_open()) - { - LLSDSerialize::fromXML(stats_config, file); - if (stats_config.isUndefined()) - { - llinfos << "Performance statistics configuration file ill-formed, not recording statistics" << llendl; - mStatsp->setReportPerformanceDuration( 0.f ); - return false; - } - } - else - { // File went away, turn off stats if it was on - if ( mStatsp->frameStatsIsRunning() ) - { - llinfos << "Performance statistics configuration file deleted, not recording statistics" << llendl; - mStatsp->setReportPerformanceDuration( 0.f ); - } - return true; - } - } - - F32 duration = 0.f; - F32 interval = 0.f; - S32 flags = LLPerfBlock::LLSTATS_BASIC_STATS; - - const char * w = "duration"; - if (stats_config.has(w)) - { - duration = (F32)stats_config[w].asReal(); - } - w = "interval"; - if (stats_config.has(w)) - { - interval = (F32)stats_config[w].asReal(); - } - w = "flags"; - if (stats_config.has(w)) - { - flags = (S32)stats_config[w].asInteger(); - if (flags == LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS && - duration > 0) - { // No flags passed in, but have a duration, so reset to basic stats - flags = LLPerfBlock::LLSTATS_BASIC_STATS; - } - } - - mStatsp->setReportPerformanceDuration( duration, flags ); - mStatsp->setReportPerformanceInterval( interval ); - - if ( duration > 0 ) - { - if ( interval == 0.f ) - { - llinfos << "Recording performance stats every frame for " << duration << " sec" << llendl; - } - else - { - llinfos << "Recording performance stats every " << interval << " seconds for " << duration << " seconds" << llendl; - } - } - else - { - llinfos << "Performance stats recording turned off" << llendl; - } - return true; -} - - -//------------------------------------------------------------------------ - -LLPerfStats::LLPerfStats(const std::string& process_name, S32 process_pid) : - mFrameStatsFileFailure(FALSE), - mSkipFirstFrameStats(FALSE), - mProcessName(process_name), - mProcessPID(process_pid), - mReportPerformanceStatInterval(1.f), - mReportPerformanceStatEnd(0.0) -{ } - -LLPerfStats::~LLPerfStats() -{ - LLPerfBlock::clearDynamicStats(); - mFrameStatsFile.close(); -} - -void LLPerfStats::init() -{ - // Initialize the stats config file instance. - (void) LLStatsConfigFile::instance().init(this); - (void) LLStatsConfigFile::instance().checkAndReload(); -} - -// Open file for statistics -void LLPerfStats::openPerfStatsFile() -{ - if ( !mFrameStatsFile - && !mFrameStatsFileFailure ) - { - std::string stats_file = llformat("/dev/shm/simperf/%s_proc.%d.llsd", mProcessName.c_str(), mProcessPID); - mFrameStatsFile.close(); - mFrameStatsFile.clear(); - mFrameStatsFile.open(stats_file, llofstream::out); - if ( mFrameStatsFile.fail() ) - { - llinfos << "Error opening statistics log file " << stats_file << llendl; - mFrameStatsFileFailure = TRUE; - } - else - { - LLSD process_info = LLSD::emptyMap(); - process_info["name"] = mProcessName; - process_info["pid"] = (LLSD::Integer) mProcessPID; - process_info["stat_rate"] = (LLSD::Integer) mReportPerformanceStatInterval; - // Add process-specific info. - addProcessHeaderInfo(process_info); - - mFrameStatsFile << LLSDNotationStreamer(process_info) << std::endl; - } - } -} - -// Dump out performance metrics over some time interval -void LLPerfStats::dumpIntervalPerformanceStats() -{ - // Ensure output file is OK - openPerfStatsFile(); - - if ( mFrameStatsFile ) - { - LLSD stats = LLSD::emptyMap(); - - LLStatAccum::TimeScale scale; - if ( getReportPerformanceInterval() == 0.f ) - { - scale = LLStatAccum::SCALE_PER_FRAME; - } - else if ( getReportPerformanceInterval() < 0.5f ) - { - scale = LLStatAccum::SCALE_100MS; - } - else - { - scale = LLStatAccum::SCALE_SECOND; - } - - // Write LLSD into log - stats["utc_time"] = (LLSD::String) LLError::utcTime(); - stats["timestamp"] = U64_to_str((totalTime() / 1000) + (gUTCOffset * 1000)); // milliseconds since epoch - stats["frame_number"] = (LLSD::Integer) LLFrameTimer::getFrameCount(); - - // Add process-specific frame info. - addProcessFrameInfo(stats, scale); - LLPerfBlock::addStatsToLLSDandReset( stats, scale ); - - mFrameStatsFile << LLSDNotationStreamer(stats) << std::endl; - } -} - -// Set length of performance stat recording. -// If turning stats on, caller must provide flags -void LLPerfStats::setReportPerformanceDuration( F32 seconds, S32 flags /* = LLSTATS_NO_OPTIONAL_STATS */ ) -{ - if ( seconds <= 0.f ) - { - mReportPerformanceStatEnd = 0.0; - LLPerfBlock::setStatsFlags(LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS); // Make sure all recording is off - mFrameStatsFile.close(); - LLPerfBlock::clearDynamicStats(); - } - else - { - mReportPerformanceStatEnd = LLFrameTimer::getElapsedSeconds() + ((F64) seconds); - // Clear failure flag to try and create the log file once - mFrameStatsFileFailure = FALSE; - mSkipFirstFrameStats = TRUE; // Skip the first report (at the end of this frame) - LLPerfBlock::setStatsFlags(flags); - } -} - -void LLPerfStats::updatePerFrameStats() -{ - (void) LLStatsConfigFile::instance().checkAndReload(); - static LLFrameTimer performance_stats_timer; - if ( frameStatsIsRunning() ) - { - if ( mReportPerformanceStatInterval == 0 ) - { // Record info every frame - if ( mSkipFirstFrameStats ) - { // Skip the first time - was started this frame - mSkipFirstFrameStats = FALSE; - } - else - { - dumpIntervalPerformanceStats(); - } - } - else - { - performance_stats_timer.setTimerExpirySec( getReportPerformanceInterval() ); - if (performance_stats_timer.checkExpirationAndReset( mReportPerformanceStatInterval )) - { - dumpIntervalPerformanceStats(); - } - } - - if ( LLFrameTimer::getElapsedSeconds() > mReportPerformanceStatEnd ) - { // Reached end of time, clear it to stop reporting - setReportPerformanceDuration(0.f); // Don't set mReportPerformanceStatEnd directly - llinfos << "Recording performance stats completed" << llendl; - } - } -} - - //------------------------------------------------------------------------ - -U64 LLStatAccum::sScaleTimes[NUM_SCALES] = -{ - USEC_PER_SEC / 10, // 100 millisec - USEC_PER_SEC * 1, // seconds - USEC_PER_SEC * 60, // minutes -#if ENABLE_LONG_TIME_STATS - // enable these when more time scales are desired - USEC_PER_SEC * 60*60, // hours - USEC_PER_SEC * 24*60*60, // days - USEC_PER_SEC * 7*24*60*60, // weeks -#endif -}; - - - -LLStatAccum::LLStatAccum(bool useFrameTimer) - : mUseFrameTimer(useFrameTimer), - mRunning(FALSE), - mLastTime(0), - mLastSampleValue(0.0), - mLastSampleValid(FALSE) -{ -} - -LLStatAccum::~LLStatAccum() -{ -} - - - -void LLStatAccum::reset(U64 when) -{ - mRunning = TRUE; - mLastTime = when; - - for (int i = 0; i < NUM_SCALES; ++i) - { - mBuckets[i].accum = 0.0; - mBuckets[i].endTime = when + sScaleTimes[i]; - mBuckets[i].lastValid = false; - } -} - -void LLStatAccum::sum(F64 value) -{ - sum(value, getCurrentUsecs()); -} - -void LLStatAccum::sum(F64 value, U64 when) -{ - if (!mRunning) - { - reset(when); - return; - } - if (when < mLastTime) - { - // This happens a LOT on some dual core systems. - lldebugs << "LLStatAccum::sum clock has gone backwards from " - << mLastTime << " to " << when << ", resetting" << llendl; - - reset(when); - return; - } - - // how long is this value for - U64 timeSpan = when - mLastTime; - - for (int i = 0; i < NUM_SCALES; ++i) - { - Bucket& bucket = mBuckets[i]; - - if (when < bucket.endTime) - { - bucket.accum += value; - } - else - { - U64 timeScale = sScaleTimes[i]; - - U64 timeLeft = when - bucket.endTime; - // how much time is left after filling this bucket - - if (timeLeft < timeScale) - { - F64 valueLeft = value * timeLeft / timeSpan; - - bucket.lastValid = true; - bucket.lastAccum = bucket.accum + (value - valueLeft); - bucket.accum = valueLeft; - bucket.endTime += timeScale; - } - else - { - U64 timeTail = timeLeft % timeScale; - - bucket.lastValid = true; - bucket.lastAccum = value * timeScale / timeSpan; - bucket.accum = value * timeTail / timeSpan; - bucket.endTime += (timeLeft - timeTail) + timeScale; - } - } - } - - mLastTime = when; -} - - -F32 LLStatAccum::meanValue(TimeScale scale) const -{ - if (!mRunning) - { - return 0.0; - } - if ( scale == SCALE_PER_FRAME ) - { // Per-frame not supported here - scale = SCALE_100MS; - } - - if (scale < 0 || scale >= NUM_SCALES) - { - llwarns << "llStatAccum::meanValue called for unsupported scale: " - << scale << llendl; - return 0.0; - } - - const Bucket& bucket = mBuckets[scale]; - - F64 value = bucket.accum; - U64 timeLeft = bucket.endTime - mLastTime; - U64 scaleTime = sScaleTimes[scale]; - - if (bucket.lastValid) - { - value += bucket.lastAccum * timeLeft / scaleTime; - } - else if (timeLeft < scaleTime) - { - value *= scaleTime / (scaleTime - timeLeft); - } - else - { - value = 0.0; - } - - return (F32)(value / scaleTime); -} - - -U64 LLStatAccum::getCurrentUsecs() const -{ - if (mUseFrameTimer) - { - return LLFrameTimer::getTotalTime(); - } - else - { - return totalTime(); - } -} - - -// ------------------------------------------------------------------------ - -LLStatRate::LLStatRate(bool use_frame_timer) - : LLStatAccum(use_frame_timer) -{ -} - -void LLStatRate::count(U32 value) -{ - sum((F64)value * sScaleTimes[SCALE_SECOND]); -} - - -void LLStatRate::mark() - { - // Effectively the same as count(1), but sets mLastSampleValue - U64 when = getCurrentUsecs(); - - if ( mRunning - && (when > mLastTime) ) - { // Set mLastSampleValue to the time from the last mark() - F64 duration = ((F64)(when - mLastTime)) / sScaleTimes[SCALE_SECOND]; - if ( duration > 0.0 ) - { - mLastSampleValue = 1.0 / duration; - } - else - { - mLastSampleValue = 0.0; - } - } - - sum( (F64) sScaleTimes[SCALE_SECOND], when); - } - - -// ------------------------------------------------------------------------ - - -LLStatMeasure::LLStatMeasure(bool use_frame_timer) - : LLStatAccum(use_frame_timer) -{ -} - -void LLStatMeasure::sample(F64 value) -{ - U64 when = getCurrentUsecs(); - - if (mLastSampleValid) - { - F64 avgValue = (value + mLastSampleValue) / 2.0; - F64 interval = (F64)(when - mLastTime); - - sum(avgValue * interval, when); - } - else - { - reset(when); - } - - mLastSampleValid = TRUE; - mLastSampleValue = value; -} - - -// ------------------------------------------------------------------------ - -LLStatTime::LLStatTime(const std::string & key) - : LLStatAccum(false), - mFrameNumber(LLFrameTimer::getFrameCount()), - mTotalTimeInFrame(0), - mKey(key) -#if LL_DEBUG - , mRunning(FALSE) -#endif -{ -} - -void LLStatTime::start() -{ - // Reset frame accumluation if the frame number has changed - U32 frame_number = LLFrameTimer::getFrameCount(); - if ( frame_number != mFrameNumber ) - { - mFrameNumber = frame_number; - mTotalTimeInFrame = 0; - } - - sum(0.0); - -#if LL_DEBUG - // Shouldn't be running already - llassert( !mRunning ); - mRunning = TRUE; -#endif -} - -void LLStatTime::stop() -{ - U64 end_time = getCurrentUsecs(); - U64 duration = end_time - mLastTime; - sum(F64(duration), end_time); - //llinfos << "mTotalTimeInFrame incremented from " << mTotalTimeInFrame << " to " << (mTotalTimeInFrame + duration) << llendl; - mTotalTimeInFrame += duration; - -#if LL_DEBUG - mRunning = FALSE; -#endif -} - -/* virtual */ F32 LLStatTime::meanValue(TimeScale scale) const -{ - if ( LLStatAccum::SCALE_PER_FRAME == scale ) - { - return (F32)mTotalTimeInFrame; - } - else - { - return LLStatAccum::meanValue(scale); - } -} - - -// ------------------------------------------------------------------------ - - -// Use this constructor for pre-defined LLStatTime objects -LLPerfBlock::LLPerfBlock(LLStatTime* stat ) : mPredefinedStat(stat), mDynamicStat(NULL) -{ - if (mPredefinedStat) - { - // If dynamic stats are turned on, this will create a separate entry in the stat map. - initDynamicStat(mPredefinedStat->mKey); - - // Start predefined stats. These stats are not part of the stat map. - mPredefinedStat->start(); - } -} - -// Use this constructor for normal, optional LLPerfBlock time slices -LLPerfBlock::LLPerfBlock( const char* key ) : mPredefinedStat(NULL), mDynamicStat(NULL) -{ - if ((sStatsFlags & LLSTATS_BASIC_STATS) == 0) - { // These are off unless the base set is enabled - return; - } - - initDynamicStat(key); -} - - -// Use this constructor for dynamically created LLPerfBlock time slices -// that are only enabled by specific control flags -LLPerfBlock::LLPerfBlock( const char* key1, const char* key2, S32 flags ) : mPredefinedStat(NULL), mDynamicStat(NULL) -{ - if ((sStatsFlags & flags) == 0) - { - return; - } - - if (NULL == key2 || strlen(key2) == 0) - { - initDynamicStat(key1); - } - else - { - std::ostringstream key; - key << key1 << "_" << key2; - initDynamicStat(key.str()); - } -} - -// Set up the result data map if dynamic stats are enabled -void LLPerfBlock::initDynamicStat(const std::string& key) -{ - // Early exit if dynamic stats aren't enabled. - if (sStatsFlags == LLSTATS_NO_OPTIONAL_STATS) - return; - - mLastPath = sCurrentStatPath; // Save and restore current path - sCurrentStatPath += "/" + key; // Add key to current path - - // See if the LLStatTime object already exists - stat_map_t::iterator iter = sStatMap.find(sCurrentStatPath); - if ( iter == sStatMap.end() ) - { - // StatEntry object doesn't exist, so create it - mDynamicStat = new StatEntry( key ); - sStatMap[ sCurrentStatPath ] = mDynamicStat; // Set the entry for this path - } - else - { - // Found this path in the map, use the object there - mDynamicStat = (*iter).second; // Get StatEntry for the current path - } - - if (mDynamicStat) - { - mDynamicStat->mStat.start(); - mDynamicStat->mCount++; - } - else - { - llwarns << "Initialized NULL dynamic stat at '" << sCurrentStatPath << "'" << llendl; - sCurrentStatPath = mLastPath; - } -} - - -// Destructor does the time accounting -LLPerfBlock::~LLPerfBlock() -{ - if (mPredefinedStat) mPredefinedStat->stop(); - if (mDynamicStat) - { - mDynamicStat->mStat.stop(); - sCurrentStatPath = mLastPath; // Restore the path in case sStatsEnabled changed during this block - } -} - - -// Clear the map of any dynamic stats. Static routine -void LLPerfBlock::clearDynamicStats() -{ - std::for_each(sStatMap.begin(), sStatMap.end(), DeletePairedPointer()); - sStatMap.clear(); -} - -// static - Extract the stat info into LLSD -void LLPerfBlock::addStatsToLLSDandReset( LLSD & stats, - LLStatAccum::TimeScale scale ) -{ - // If we aren't in per-frame scale, we need to go from second to microsecond. - U32 scale_adjustment = 1; - if (LLStatAccum::SCALE_PER_FRAME != scale) - { - scale_adjustment = USEC_PER_SEC; - } - stat_map_t::iterator iter = sStatMap.begin(); - for ( ; iter != sStatMap.end(); ++iter ) - { // Put the entry into LLSD "/full/path/to/stat/" = microsecond total time - const std::string & stats_full_path = (*iter).first; - - StatEntry * stat = (*iter).second; - if (stat) - { - if (stat->mCount > 0) - { - stats[stats_full_path] = LLSD::emptyMap(); - stats[stats_full_path]["us"] = (LLSD::Integer) (scale_adjustment * stat->mStat.meanValue(scale)); - if (stat->mCount > 1) - { - stats[stats_full_path]["count"] = (LLSD::Integer) stat->mCount; - } - stat->mCount = 0; - } - } - else - { // Shouldn't have a NULL pointer in the map. - llwarns << "Unexpected NULL dynamic stat at '" << stats_full_path << "'" << llendl; - } - } -} - - -// ------------------------------------------------------------------------ - LLTimer LLStat::sTimer; LLFrameTimer LLStat::sFrameTimer; -void LLStat::init() +void LLStat::reset() { - llassert(mNumBins > 0); mNumValues = 0; mLastValue = 0.f; - mLastTime = 0.f; - mCurBin = (mNumBins-1); + delete[] mBins; + mBins = new ValueEntry[mNumBins]; + mCurBin = mNumBins-1; mNextBin = 0; - mBins = new F32[mNumBins]; - mBeginTime = new F64[mNumBins]; - mTime = new F64[mNumBins]; - mDT = new F32[mNumBins]; - for (U32 i = 0; i < mNumBins; i++) - { - mBins[i] = 0.f; - mBeginTime[i] = 0.0; - mTime[i] = 0.0; - mDT[i] = 0.f; - } +} + +LLStat::LLStat(std::string name, S32 num_bins, BOOL use_frame_timer) +: mUseFrameTimer(use_frame_timer), + mNumBins(num_bins), + mName(name), + mBins(NULL) +{ + llassert(mNumBins > 0); + mLastTime = 0.f; + + reset(); if (!mName.empty()) { @@ -783,27 +77,10 @@ LLStat::stat_map_t& LLStat::getStatList() return stat_list; } -LLStat::LLStat(const U32 num_bins, const BOOL use_frame_timer) - : mUseFrameTimer(use_frame_timer), - mNumBins(num_bins) -{ - init(); -} - -LLStat::LLStat(std::string name, U32 num_bins, BOOL use_frame_timer) - : mUseFrameTimer(use_frame_timer), - mNumBins(num_bins), - mName(name) -{ - init(); -} LLStat::~LLStat() { delete[] mBins; - delete[] mBeginTime; - delete[] mTime; - delete[] mDT; if (!mName.empty()) { @@ -815,76 +92,15 @@ LLStat::~LLStat() } } -void LLStat::reset() -{ - U32 i; - - mNumValues = 0; - mLastValue = 0.f; - mCurBin = (mNumBins-1); - delete[] mBins; - delete[] mBeginTime; - delete[] mTime; - delete[] mDT; - mBins = new F32[mNumBins]; - mBeginTime = new F64[mNumBins]; - mTime = new F64[mNumBins]; - mDT = new F32[mNumBins]; - for (i = 0; i < mNumBins; i++) - { - mBins[i] = 0.f; - mBeginTime[i] = 0.0; - mTime[i] = 0.0; - mDT[i] = 0.f; - } -} - -void LLStat::setBeginTime(const F64 time) -{ - mBeginTime[mNextBin] = time; -} - -void LLStat::addValueTime(const F64 time, const F32 value) -{ - if (mNumValues < mNumBins) - { - mNumValues++; - } - - // Increment the bin counters. - mCurBin++; - if ((U32)mCurBin == mNumBins) - { - mCurBin = 0; - } - mNextBin++; - if ((U32)mNextBin == mNumBins) - { - mNextBin = 0; - } - - mBins[mCurBin] = value; - mTime[mCurBin] = time; - mDT[mCurBin] = (F32)(mTime[mCurBin] - mBeginTime[mCurBin]); - //this value is used to prime the min/max calls - mLastTime = mTime[mCurBin]; - mLastValue = value; - - // Set the begin time for the next stat segment. - mBeginTime[mNextBin] = mTime[mCurBin]; - mTime[mNextBin] = mTime[mCurBin]; - mDT[mNextBin] = 0.f; -} - void LLStat::start() { if (mUseFrameTimer) { - mBeginTime[mNextBin] = sFrameTimer.getElapsedSeconds(); + mBins[mNextBin].mBeginTime = sFrameTimer.getElapsedSeconds(); } else { - mBeginTime[mNextBin] = sTimer.getElapsedTimeF64(); + mBins[mNextBin].mBeginTime = sTimer.getElapsedTimeF64(); } } @@ -897,41 +113,41 @@ void LLStat::addValue(const F32 value) // Increment the bin counters. mCurBin++; - if ((U32)mCurBin == mNumBins) + if (mCurBin >= mNumBins) { mCurBin = 0; } mNextBin++; - if ((U32)mNextBin == mNumBins) + if (mNextBin >= mNumBins) { mNextBin = 0; } - mBins[mCurBin] = value; + mBins[mCurBin].mValue = value; if (mUseFrameTimer) { - mTime[mCurBin] = sFrameTimer.getElapsedSeconds(); + mBins[mCurBin].mTime = sFrameTimer.getElapsedSeconds(); } else { - mTime[mCurBin] = sTimer.getElapsedTimeF64(); + mBins[mCurBin].mTime = sTimer.getElapsedTimeF64(); } - mDT[mCurBin] = (F32)(mTime[mCurBin] - mBeginTime[mCurBin]); + mBins[mCurBin].mDT = (F32)(mBins[mCurBin].mTime - mBins[mCurBin].mBeginTime); //this value is used to prime the min/max calls - mLastTime = mTime[mCurBin]; + mLastTime = mBins[mCurBin].mTime; mLastValue = value; // Set the begin time for the next stat segment. - mBeginTime[mNextBin] = mTime[mCurBin]; - mTime[mNextBin] = mTime[mCurBin]; - mDT[mNextBin] = 0.f; + mBins[mNextBin].mBeginTime = mBins[mCurBin].mTime; + mBins[mNextBin].mTime = mBins[mCurBin].mTime; + mBins[mNextBin].mDT = 0.f; } F32 LLStat::getMax() const { - U32 i; + S32 i; F32 current_max = mLastValue; if (mNumBins == 0) { @@ -942,13 +158,13 @@ F32 LLStat::getMax() const for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - if (mBins[i] > current_max) + if (mBins[i].mValue > current_max) { - current_max = mBins[i]; + current_max = mBins[i].mValue; } } } @@ -957,17 +173,17 @@ F32 LLStat::getMax() const F32 LLStat::getMean() const { - U32 i; + S32 i; F32 current_mean = 0.f; - U32 samples = 0; + S32 samples = 0; for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - current_mean += mBins[i]; + current_mean += mBins[i].mValue; samples++; } @@ -985,7 +201,7 @@ F32 LLStat::getMean() const F32 LLStat::getMin() const { - U32 i; + S32 i; F32 current_min = mLastValue; if (mNumBins == 0) @@ -997,53 +213,19 @@ F32 LLStat::getMin() const for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - if (mBins[i] < current_min) + if (mBins[i].mValue < current_min) { - current_min = mBins[i]; + current_min = mBins[i].mValue; } } } return current_min; } -F32 LLStat::getSum() const -{ - U32 i; - F32 sum = 0.f; - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == (U32)mNextBin) - { - continue; - } - sum += mBins[i]; - } - - return sum; -} - -F32 LLStat::getSumDuration() const -{ - U32 i; - F32 sum = 0.f; - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) - { - // Skip the bin we're currently filling. - if (i == (U32)mNextBin) - { - continue; - } - sum += mDT[i]; - } - - return sum; -} - F32 LLStat::getPrev(S32 age) const { S32 bin; @@ -1059,7 +241,7 @@ F32 LLStat::getPrev(S32 age) const // Bogus for bin we're currently working on. return 0.f; } - return mBins[bin]; + return mBins[bin].mValue; } F32 LLStat::getPrevPerSec(S32 age) const @@ -1077,107 +259,34 @@ F32 LLStat::getPrevPerSec(S32 age) const // Bogus for bin we're currently working on. return 0.f; } - return mBins[bin] / mDT[bin]; -} - -F64 LLStat::getPrevBeginTime(S32 age) const -{ - S32 bin; - bin = mCurBin - age; - - while (bin < 0) - { - bin += mNumBins; - } - - if (bin == mNextBin) - { - // Bogus for bin we're currently working on. - return 0.f; - } - - return mBeginTime[bin]; -} - -F64 LLStat::getPrevTime(S32 age) const -{ - S32 bin; - bin = mCurBin - age; - - while (bin < 0) - { - bin += mNumBins; - } - - if (bin == mNextBin) - { - // Bogus for bin we're currently working on. - return 0.f; - } - - return mTime[bin]; -} - -F32 LLStat::getBin(S32 bin) const -{ - return mBins[bin]; -} - -F32 LLStat::getBinPerSec(S32 bin) const -{ - return mBins[bin] / mDT[bin]; -} - -F64 LLStat::getBinBeginTime(S32 bin) const -{ - return mBeginTime[bin]; -} - -F64 LLStat::getBinTime(S32 bin) const -{ - return mTime[bin]; + return mBins[bin].mValue / mBins[bin].mDT; } F32 LLStat::getCurrent() const { - return mBins[mCurBin]; + return mBins[mCurBin].mValue; } F32 LLStat::getCurrentPerSec() const { - return mBins[mCurBin] / mDT[mCurBin]; -} - -F64 LLStat::getCurrentBeginTime() const -{ - return mBeginTime[mCurBin]; -} - -F64 LLStat::getCurrentTime() const -{ - return mTime[mCurBin]; -} - -F32 LLStat::getCurrentDuration() const -{ - return mDT[mCurBin]; + return mBins[mCurBin].mValue / mBins[mCurBin].mDT; } F32 LLStat::getMeanPerSec() const { - U32 i; + S32 i; F32 value = 0.f; F32 dt = 0.f; for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - value += mBins[i]; - dt += mDT[i]; + value += mBins[i].mValue; + dt += mBins[i].mDT; } if (dt > 0.f) @@ -1193,14 +302,14 @@ F32 LLStat::getMeanPerSec() const F32 LLStat::getMeanDuration() const { F32 dur = 0.0f; - U32 count = 0; - for (U32 i=0; (i < mNumBins) && (i < mNumValues); i++) + S32 count = 0; + for (S32 i=0; (i < mNumBins) && (i < mNumValues); i++) { - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - dur += mDT[i]; + dur += mBins[i].mDT; count++; } @@ -1217,46 +326,45 @@ F32 LLStat::getMeanDuration() const F32 LLStat::getMaxPerSec() const { - U32 i; F32 value; if (mNextBin != 0) { - value = mBins[0]/mDT[0]; + value = mBins[0].mValue/mBins[0].mDT; } else if (mNumValues > 0) { - value = mBins[1]/mDT[1]; + value = mBins[1].mValue/mBins[1].mDT; } else { value = 0.f; } - for (i = 0; (i < mNumBins) && (i < mNumValues); i++) + for (S32 i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - value = llmax(value, mBins[i]/mDT[i]); + value = llmax(value, mBins[i].mValue/mBins[i].mDT); } return value; } F32 LLStat::getMinPerSec() const { - U32 i; + S32 i; F32 value; if (mNextBin != 0) { - value = mBins[0]/mDT[0]; + value = mBins[0].mValue/mBins[0].mDT; } else if (mNumValues > 0) { - value = mBins[1]/mDT[1]; + value = mBins[1].mValue/mBins[0].mDT; } else { @@ -1266,25 +374,15 @@ F32 LLStat::getMinPerSec() const for (i = 0; (i < mNumBins) && (i < mNumValues); i++) { // Skip the bin we're currently filling. - if (i == (U32)mNextBin) + if (i == mNextBin) { continue; } - value = llmin(value, mBins[i]/mDT[i]); + value = llmin(value, mBins[i].mValue/mBins[i].mDT); } return value; } -F32 LLStat::getMinDuration() const -{ - F32 dur = 0.0f; - for (U32 i=0; (i < mNumBins) && (i < mNumValues); i++) - { - dur = llmin(dur, mDT[i]); - } - return dur; -} - U32 LLStat::getNumValues() const { return mNumValues; @@ -1295,11 +393,6 @@ S32 LLStat::getNumBins() const return mNumBins; } -S32 LLStat::getCurBin() const -{ - return mCurBin; -} - S32 LLStat::getNextBin() const { return mNextBin; diff --git a/indra/llcommon/llstat.h b/indra/llcommon/llstat.h index 1a8404cc07..38377a010b 100644 --- a/indra/llcommon/llstat.h +++ b/indra/llcommon/llstat.h @@ -27,294 +27,46 @@ #ifndef LL_LLSTAT_H #define LL_LLSTAT_H -#include <deque> #include <map> #include "lltimer.h" #include "llframetimer.h" -#include "llfile.h" class LLSD; -// Set this if longer stats are needed -#define ENABLE_LONG_TIME_STATS 0 - -// -// Accumulates statistics for an arbitrary length of time. -// Does this by maintaining a chain of accumulators, each one -// accumulation the results of the parent. Can scale to arbitrary -// amounts of time with very low memory cost. -// - -class LL_COMMON_API LLStatAccum -{ -protected: - LLStatAccum(bool use_frame_timer); - virtual ~LLStatAccum(); - -public: - enum TimeScale { - SCALE_100MS, - SCALE_SECOND, - SCALE_MINUTE, -#if ENABLE_LONG_TIME_STATS - SCALE_HOUR, - SCALE_DAY, - SCALE_WEEK, -#endif - NUM_SCALES, // Use to size storage arrays - SCALE_PER_FRAME // For latest frame information - should be after NUM_SCALES since this doesn't go into the time buckets - }; - - static U64 sScaleTimes[NUM_SCALES]; - - virtual F32 meanValue(TimeScale scale) const; - // see the subclasses for the specific meaning of value - - F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); } - F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); } - F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); } - - void reset(U64 when); - - void sum(F64 value); - void sum(F64 value, U64 when); - - U64 getCurrentUsecs() const; - // Get current microseconds based on timer type - - BOOL mUseFrameTimer; - BOOL mRunning; - - U64 mLastTime; - - struct Bucket - { - Bucket() : - accum(0.0), - endTime(0), - lastValid(false), - lastAccum(0.0) - {} - - F64 accum; - U64 endTime; - - bool lastValid; - F64 lastAccum; - }; - - Bucket mBuckets[NUM_SCALES]; - - BOOL mLastSampleValid; - F64 mLastSampleValue; -}; - -class LL_COMMON_API LLStatMeasure : public LLStatAccum - // gathers statistics about things that are measured - // ex.: tempature, time dilation -{ -public: - LLStatMeasure(bool use_frame_timer = true); - - void sample(F64); - void sample(S32 v) { sample((F64)v); } - void sample(U32 v) { sample((F64)v); } - void sample(S64 v) { sample((F64)v); } - void sample(U64 v) { sample((F64)v); } -}; - - -class LL_COMMON_API LLStatRate : public LLStatAccum - // gathers statistics about things that can be counted over time - // ex.: LSL instructions executed, messages sent, simulator frames completed - // renders it in terms of rate of thing per second -{ -public: - LLStatRate(bool use_frame_timer = true); - - void count(U32); - // used to note that n items have occured - - void mark(); - // used for counting the rate thorugh a point in the code -}; - - -class LL_COMMON_API LLStatTime : public LLStatAccum - // gathers statistics about time spent in a block of code - // measure average duration per second in the block -{ -public: - LLStatTime( const std::string & key = "undefined" ); - - U32 mFrameNumber; // Current frame number - U64 mTotalTimeInFrame; // Total time (microseconds) accumulated during the last frame - - void setKey( const std::string & key ) { mKey = key; }; - - virtual F32 meanValue(TimeScale scale) const; - -private: - void start(); // Start and stop measuring time block - void stop(); - - std::string mKey; // Tag representing this time block - -#if LL_DEBUG - BOOL mRunning; // TRUE if start() has been called -#endif - - friend class LLPerfBlock; -}; - -// ---------------------------------------------------------------------------- - - -// Use this class on the stack to record statistics about an area of code -class LL_COMMON_API LLPerfBlock -{ -public: - struct StatEntry - { - StatEntry(const std::string& key) : mStat(LLStatTime(key)), mCount(0) {} - LLStatTime mStat; - U32 mCount; - }; - typedef std::map<std::string, StatEntry*> stat_map_t; - - // Use this constructor for pre-defined LLStatTime objects - LLPerfBlock(LLStatTime* stat); - - // Use this constructor for normal, optional LLPerfBlock time slices - LLPerfBlock( const char* key ); - - // Use this constructor for dynamically created LLPerfBlock time slices - // that are only enabled by specific control flags - LLPerfBlock( const char* key1, const char* key2, S32 flags = LLSTATS_BASIC_STATS ); - - ~LLPerfBlock(); - - enum - { // Stats bitfield flags - LLSTATS_NO_OPTIONAL_STATS = 0x00, // No optional stats gathering, just pre-defined LLStatTime objects - LLSTATS_BASIC_STATS = 0x01, // Gather basic optional runtime stats - LLSTATS_SCRIPT_FUNCTIONS = 0x02, // Include LSL function calls - }; - static void setStatsFlags( S32 flags ) { sStatsFlags = flags; }; - static S32 getStatsFlags() { return sStatsFlags; }; - - static void clearDynamicStats(); // Reset maps to clear out dynamic objects - static void addStatsToLLSDandReset( LLSD & stats, // Get current information and clear time bin - LLStatAccum::TimeScale scale ); - -private: - // Initialize dynamically created LLStatTime objects - void initDynamicStat(const std::string& key); - - std::string mLastPath; // Save sCurrentStatPath when this is called - LLStatTime * mPredefinedStat; // LLStatTime object to get data - StatEntry * mDynamicStat; // StatEntryobject to get data - - static S32 sStatsFlags; // Control what is being recorded - static stat_map_t sStatMap; // Map full path string to LLStatTime objects - static std::string sCurrentStatPath; // Something like "frame/physics/physics step" -}; - -// ---------------------------------------------------------------------------- - -class LL_COMMON_API LLPerfStats -{ -public: - LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0); - virtual ~LLPerfStats(); - - virtual void init(); // Reset and start all stat timers - virtual void updatePerFrameStats(); - // Override these function to add process-specific information to the performance log header and per-frame logging. - virtual void addProcessHeaderInfo(LLSD& info) { /* not implemented */ } - virtual void addProcessFrameInfo(LLSD& info, LLStatAccum::TimeScale scale) { /* not implemented */ } - - // High-resolution frame stats - BOOL frameStatsIsRunning() { return (mReportPerformanceStatEnd > 0.); }; - F32 getReportPerformanceInterval() const { return mReportPerformanceStatInterval; }; - void setReportPerformanceInterval( F32 interval ) { mReportPerformanceStatInterval = interval; }; - void setReportPerformanceDuration( F32 seconds, S32 flags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS ); - void setProcessName(const std::string& process_name) { mProcessName = process_name; } - void setProcessPID(S32 process_pid) { mProcessPID = process_pid; } - -protected: - void openPerfStatsFile(); // Open file for high resolution metrics logging - void dumpIntervalPerformanceStats(); - - llofstream mFrameStatsFile; // File for per-frame stats - BOOL mFrameStatsFileFailure; // Flag to prevent repeat opening attempts - BOOL mSkipFirstFrameStats; // Flag to skip one (partial) frame report - std::string mProcessName; - S32 mProcessPID; - -private: - F32 mReportPerformanceStatInterval; // Seconds between performance stats - F64 mReportPerformanceStatEnd; // End time (seconds) for performance stats -}; - // ---------------------------------------------------------------------------- class LL_COMMON_API LLStat { private: typedef std::multimap<std::string, LLStat*> stat_map_t; - void init(); static stat_map_t& getStatList(); public: - LLStat(U32 num_bins = 32, BOOL use_frame_timer = FALSE); - LLStat(std::string name, U32 num_bins = 32, BOOL use_frame_timer = FALSE); + LLStat(std::string name = std::string(), S32 num_bins = 32, BOOL use_frame_timer = FALSE); ~LLStat(); - void reset(); - void start(); // Start the timer for the current "frame", otherwise uses the time tracked from // the last addValue + void reset(); void addValue(const F32 value = 1.f); // Adds the current value being tracked, and tracks the DT. void addValue(const S32 value) { addValue((F32)value); } void addValue(const U32 value) { addValue((F32)value); } - void setBeginTime(const F64 time); - void addValueTime(const F64 time, const F32 value = 1.f); - - S32 getCurBin() const; S32 getNextBin() const; - F32 getCurrent() const; - F32 getCurrentPerSec() const; - F64 getCurrentBeginTime() const; - F64 getCurrentTime() const; - F32 getCurrentDuration() const; - F32 getPrev(S32 age) const; // Age is how many "addValues" previously - zero is current F32 getPrevPerSec(S32 age) const; // Age is how many "addValues" previously - zero is current - F64 getPrevBeginTime(S32 age) const; - F64 getPrevTime(S32 age) const; - - F32 getBin(S32 bin) const; - F32 getBinPerSec(S32 bin) const; - F64 getBinBeginTime(S32 bin) const; - F64 getBinTime(S32 bin) const; - - F32 getMax() const; - F32 getMaxPerSec() const; + F32 getCurrent() const; + F32 getCurrentPerSec() const; + F32 getMin() const; + F32 getMinPerSec() const; F32 getMean() const; F32 getMeanPerSec() const; F32 getMeanDuration() const; - - F32 getMin() const; - F32 getMinPerSec() const; - F32 getMinDuration() const; - - F32 getSum() const; - F32 getSumDuration() const; + F32 getMax() const; + F32 getMaxPerSec() const; U32 getNumValues() const; S32 getNumBins() const; @@ -326,10 +78,21 @@ private: U32 mNumBins; F32 mLastValue; F64 mLastTime; - F32 *mBins; - F64 *mBeginTime; - F64 *mTime; - F32 *mDT; + + struct ValueEntry + { + ValueEntry() + : mValue(0.f), + mBeginTime(0.0), + mTime(0.0), + mDT(0.f) + {} + F32 mValue; + F64 mBeginTime; + F64 mTime; + F32 mDT; + }; + ValueEntry* mBins; S32 mCurBin; S32 mNextBin; diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index db8c9c85ab..0aaa50d231 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -44,10 +44,16 @@ #include "llmd5.h" #include "llstring.h" #include "lltimer.h" +#include "llthread.h" const LLUUID LLUUID::null; const LLTransactionID LLTransactionID::tnull; +// static +LLMutex * LLUUID::mMutex = NULL; + + + /* NOT DONE YET!!! @@ -734,6 +740,7 @@ void LLUUID::getCurrentTime(uuid_time_t *timestamp) getSystemTime(&time_last); uuids_this_tick = uuids_per_tick; init = TRUE; + mMutex = new LLMutex(NULL); } uuid_time_t time_now = {0,0}; @@ -785,6 +792,7 @@ void LLUUID::generate() #endif if (!has_init) { + has_init = 1; if (getNodeID(node_id) <= 0) { get_random_bytes(node_id, 6); @@ -806,18 +814,24 @@ void LLUUID::generate() #else clock_seq = (U16)ll_rand(65536); #endif - has_init = 1; } // get current time getCurrentTime(×tamp); + U16 our_clock_seq = clock_seq; - // if clock went backward change clockseq - if (cmpTime(×tamp, &time_last) == -1) { + // if clock hasn't changed or went backward, change clockseq + if (cmpTime(×tamp, &time_last) != 1) + { + LLMutexLock lock(mMutex); clock_seq = (clock_seq + 1) & 0x3FFF; - if (clock_seq == 0) clock_seq++; + if (clock_seq == 0) + clock_seq++; + our_clock_seq = clock_seq; // Ensure we're using a different clock_seq value from previous time } + time_last = timestamp; + memcpy(mData+10, node_id, 6); /* Flawfinder: ignore */ U32 tmp; tmp = timestamp.low; @@ -839,7 +853,8 @@ void LLUUID::generate() tmp >>= 8; mData[6] = (unsigned char) tmp; - tmp = clock_seq; + tmp = our_clock_seq; + mData[9] = (unsigned char) tmp; tmp >>= 8; mData[8] = (unsigned char) tmp; @@ -849,8 +864,6 @@ void LLUUID::generate() md5_uuid.update(mData,16); md5_uuid.finalize(); md5_uuid.raw_digest(mData); - - time_last = timestamp; } void LLUUID::generate(const std::string& hash_string) @@ -864,8 +877,14 @@ U32 LLUUID::getRandomSeed() static unsigned char seed[16]; /* Flawfinder: ignore */ getNodeID(&seed[0]); - seed[6]='\0'; - seed[7]='\0'; + + // Incorporate the pid into the seed to prevent + // processes that start on the same host at the same + // time from generating the same seed. + pid_t pid = LLApp::getPid(); + + seed[6]=(unsigned char)(pid >> 8); + seed[7]=(unsigned char)(pid); getSystemTime((uuid_time_t *)(&seed[8])); LLMD5 md5_seed; diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index 0b9e7d0cd0..7889828c85 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -31,6 +31,8 @@ #include "stdtypes.h" #include "llpreprocessor.h" +class LLMutex; + const S32 UUID_BYTES = 16; const S32 UUID_WORDS = 4; const S32 UUID_STR_LENGTH = 37; // actually wrong, should be 36 and use size below @@ -118,6 +120,7 @@ public: static BOOL validate(const std::string& in_string); // Validate that the UUID string is legal. static const LLUUID null; + static LLMutex * mMutex; static U32 getRandomSeed(); static S32 getNodeID(unsigned char * node_id); diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 8585af0a29..6a5ff314e4 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 3; const S32 LL_VERSION_MINOR = 4; -const S32 LL_VERSION_PATCH = 4; +const S32 LL_VERSION_PATCH = 6; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 7db19b1841..51a8eaf998 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -580,8 +580,13 @@ size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void const size_t body_size(op->mReqBody->size()); if (body_size <= op->mCurlBodyPos) { - LL_WARNS("HttpCore") << "Request body position beyond body size. Aborting request." - << LL_ENDL; + if (body_size < op->mCurlBodyPos) + { + // Warn but continue if the read position moves beyond end-of-body + // for some reason. + LL_WARNS("HttpCore") << "Request body position beyond body size. Truncating request body." + << LL_ENDL; + } return 0; } diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp index d6dcde4b9f..34e25a8a71 100644 --- a/indra/llcrashlogger/llcrashlogger.cpp +++ b/indra/llcrashlogger/llcrashlogger.cpp @@ -366,7 +366,7 @@ bool LLCrashLogger::sendCrashLogs() { sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5); } - + mSentCrashLogs = sent; return true; diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 916c346b7a..3f8d1baddd 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -30,7 +30,6 @@ #include "llmath.h" #include "v4coloru.h" -#include "llmemtype.h" #include "llimagebmp.h" #include "llimagetga.h" @@ -96,8 +95,7 @@ LLImageBase::LLImageBase() mHeight(0), mComponents(0), mBadBufferAllocation(false), - mAllowOverSize(false), - mMemType(LLMemType::MTYPE_IMAGEBASE) + mAllowOverSize(false) { } @@ -167,8 +165,6 @@ void LLImageBase::deleteData() // virtual U8* LLImageBase::allocateData(S32 size) { - LLMemType mt1(mMemType); - if (size < 0) { size = mWidth * mHeight * mComponents; @@ -213,7 +209,6 @@ U8* LLImageBase::allocateData(S32 size) // virtual U8* LLImageBase::reallocateData(S32 size) { - LLMemType mt1(mMemType); U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size); if (!new_datap) { @@ -279,14 +274,12 @@ S32 LLImageRaw::sRawImageCount = 0; LLImageRaw::LLImageRaw() : LLImageBase() { - mMemType = LLMemType::MTYPE_IMAGERAW; ++sRawImageCount; } LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) : LLImageBase() { - mMemType = LLMemType::MTYPE_IMAGERAW; //llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE ); allocateDataSize(width, height, components); ++sRawImageCount; @@ -295,7 +288,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components) LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy) : LLImageBase() { - mMemType = LLMemType::MTYPE_IMAGERAW; if(no_copy) { @@ -375,29 +367,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components) return TRUE; } -#if 0 -U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const -{ - LLMemType mt1(mMemType); - U8 *data = new U8[width*height*getComponents()]; - - // Should do some simple bounds checking - if (!data) - { - llerrs << "Out of memory in LLImageRaw::getSubImage" << llendl; - return NULL; - } - - U32 i; - for (i = y_pos; i < y_pos+height; i++) - { - memcpy(data + i*width*getComponents(), /* Flawfinder: ignore */ - getData() + ((y_pos + i)*getWidth() + x_pos)*getComponents(), getComponents()*width); - } - return data; -} -#endif - BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height, const U8 *data, U32 stride, BOOL reverse_y) { @@ -462,7 +431,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a) // Reverses the order of the rows in the image void LLImageRaw::verticalFlip() { - LLMemType mt1(mMemType); S32 row_bytes = getWidth() * getComponents(); llassert(row_bytes > 0); std::vector<U8> line_buffer(row_bytes); @@ -595,7 +563,6 @@ void LLImageRaw::composite( LLImageRaw* src ) // Src and dst can be any size. Src has 4 components. Dst has 3 components. void LLImageRaw::compositeScaled4onto3(LLImageRaw* src) { - LLMemType mt1(mMemType); llinfos << "compositeScaled4onto3" << llendl; LLImageRaw* dst = this; // Just for clarity. @@ -699,8 +666,17 @@ void LLImageRaw::fill( const LLColor4U& color ) } } +LLPointer<LLImageRaw> LLImageRaw::duplicate() +{ + if(getNumRefs() < 2) + { + return this; //nobody else refences to this image, no need to duplicate. + } - + //make a duplicate + LLPointer<LLImageRaw> dup = new LLImageRaw(getData(), getWidth(), getHeight(), getComponents()); + return dup; +} // Src and dst can be any size. Src and dst can each have 3 or 4 components. void LLImageRaw::copy(LLImageRaw* src) @@ -837,7 +813,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src ) // Src and dst can be any size. Src and dst have same number of components. void LLImageRaw::copyScaled( LLImageRaw* src ) { - LLMemType mt1(mMemType); LLImageRaw* dst = this; // Just for clarity. llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) ); @@ -866,57 +841,9 @@ void LLImageRaw::copyScaled( LLImageRaw* src ) } } -#if 0 -//scale down image by not blending a pixel with its neighbors. -BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height) -{ - LLMemType mt1(mMemType); - - S8 c = getComponents() ; - llassert((1 == c) || (3 == c) || (4 == c) ); - - S32 old_width = getWidth(); - S32 old_height = getHeight(); - - S32 new_data_size = old_width * new_height * c ; - llassert_always(new_data_size > 0); - - F32 ratio_x = (F32)old_width / new_width ; - F32 ratio_y = (F32)old_height / new_height ; - if( ratio_x < 1.0f || ratio_y < 1.0f ) - { - return TRUE; // Nothing to do. - } - ratio_x -= 1.0f ; - ratio_y -= 1.0f ; - - U8* new_data = allocateMemory(new_data_size) ; - llassert_always(new_data != NULL) ; - - U8* old_data = getData() ; - S32 i, j, k, s, t; - for(i = 0, s = 0, t = 0 ; i < new_height ; i++) - { - for(j = 0 ; j < new_width ; j++) - { - for(k = 0 ; k < c ; k++) - { - new_data[s++] = old_data[t++] ; - } - t += (S32)(ratio_x * c + 0.1f) ; - } - t += (S32)(ratio_y * old_width * c + 0.1f) ; - } - - setDataAndSize(new_data, new_width, new_height, c) ; - - return TRUE ; -} -#endif BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data ) { - LLMemType mt1(mMemType); llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) ); S32 old_width = getWidth(); @@ -1346,7 +1273,6 @@ LLImageFormatted::LLImageFormatted(S8 codec) mDiscardLevel(-1), mLevels(0) { - mMemType = LLMemType::MTYPE_IMAGEFORMATTED; } // virtual diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 5f54585005..1d56411ae8 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -30,7 +30,7 @@ #include "lluuid.h" #include "llstring.h" #include "llthread.h" -#include "llmemtype.h" +#include "llpointer.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 @@ -176,8 +176,6 @@ private: bool mAllowOverSize ; static LLPrivateMemoryPool* sPrivatePoolp ; -public: - LLMemType::DeclareMemType& mMemType; // debug }; // Raw representation of an image (used for textures, and other uncompressed formats @@ -211,13 +209,15 @@ public: void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE); void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE); BOOL scale( S32 new_width, S32 new_height, BOOL scale_image = TRUE ); - //BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ; - + // Fill the buffer with a constant color void fill( const LLColor4U& color ); // Copy operations + //duplicate this raw image if refCount > 1. + LLPointer<LLImageRaw> duplicate(); + // Src and dst can be any size. Src and dst can each have 3 or 4 components. void copy( LLImageRaw* src ); diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 452aad25cb..5412f98ee5 100755 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -26,7 +26,6 @@ #include "lldir.h" #include "llimagej2c.h" -#include "llmemtype.h" #include "lltimer.h" #include "llmath.h" #include "llmemory.h" @@ -161,7 +160,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count ) { LLTimer elapsed; - LLMemType mt1(mMemType); BOOL res = TRUE; @@ -227,7 +225,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time) BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time) { LLTimer elapsed; - LLMemType mt1(mMemType); resetLastError(); BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible); if (!mLastError.empty()) @@ -404,7 +401,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename) BOOL LLImageJ2C::validate(U8 *data, U32 file_size) { - LLMemType mt1(mMemType); resetLastError(); diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 08476fb72c..e255d65b43 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -49,8 +49,7 @@ mWidth(0), mHeight(0), mComponents(0), mBadBufferAllocation(false), -mAllowOverSize(false), -mMemType(LLMemType::MTYPE_IMAGEBASE) +mAllowOverSize(false) { } LLImageBase::~LLImageBase() {} diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index a5cfe59bda..4dda41d325 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -30,7 +30,6 @@ #include "lldarray.h" #include "llfoldertype.h" #include "llinventorytype.h" -#include "llmemtype.h" #include "llpermissions.h" #include "llrefcount.h" #include "llsaleinfo.h" @@ -54,7 +53,6 @@ public: // Initialization //-------------------------------------------------------------------- public: - MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); LLInventoryObject(); LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid, @@ -129,7 +127,6 @@ public: // Initialization //-------------------------------------------------------------------- public: - MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); LLInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid, const LLPermissions& permissions, @@ -242,7 +239,6 @@ public: // Initialization //-------------------------------------------------------------------- public: - MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid, LLFolderType::EType preferred_type, const std::string& name); diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index a871bcbb25..37c603348e 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -205,7 +205,7 @@ void LLParcel::init(const LLUUID &owner_id, mAABBMin.setVec(SOME_BIG_NUMBER, SOME_BIG_NUMBER, SOME_BIG_NUMBER); mAABBMax.setVec(SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER); - mLocalID = 0; + mLocalID = INVALID_PARCEL_ID; //mSimWidePrimCorrection = 0; setMaxPrimCapacity((S32)(sim_object_limit * area / (F32)(REGION_WIDTH_METERS * REGION_WIDTH_METERS))); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 499f690e76..0279e8bef9 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -97,6 +97,7 @@ const U32 RT_OTHER = 0x1 << 3; const U32 RT_LIST = 0x1 << 4; const U32 RT_SELL = 0x1 << 5; +const S32 INVALID_PARCEL_ID = -1; // Timeouts for parcels // default is 21 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 1814400000000 diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp index b675153b2e..62c245f125 100755 --- a/indra/llkdu/tests/llimagej2ckdu_test.cpp +++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp @@ -58,8 +58,7 @@ mWidth(0), mHeight(0), mComponents(0), mBadBufferAllocation(false), -mAllowOverSize(false), -mMemType(LLMemType::MTYPE_IMAGEBASE) +mAllowOverSize(false) { } LLImageBase::~LLImageBase() { } U8* LLImageBase::allocateData(S32 ) { return NULL; } diff --git a/indra/llmath/llcamera.cpp b/indra/llmath/llcamera.cpp index 22ba26f99b..c14c117da9 100644 --- a/indra/llmath/llcamera.cpp +++ b/indra/llmath/llcamera.cpp @@ -163,7 +163,7 @@ size_t LLCamera::readFrustumFromBuffer(const char *buffer) S32 LLCamera::AABBInFrustum(const LLVector4a ¢er, const LLVector4a& radius) { - static const LLVector4a scaler[] = { + const LLVector4a scaler[] = { LLVector4a(-1,-1,-1), LLVector4a( 1,-1,-1), LLVector4a(-1, 1,-1), @@ -207,7 +207,7 @@ S32 LLCamera::AABBInFrustum(const LLVector4a ¢er, const LLVector4a& radius) S32 LLCamera::AABBInFrustumNoFarClip(const LLVector4a& center, const LLVector4a& radius) { - static const LLVector4a scaler[] = { + const LLVector4a scaler[] = { LLVector4a(-1,-1,-1), LLVector4a( 1,-1,-1), LLVector4a(-1, 1,-1), diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index 4ac1e55cfc..7348904c61 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -78,7 +78,7 @@ public: typedef LLOctreeTraveler<T> oct_traveler; typedef LLTreeTraveler<T> tree_traveler; - typedef std::vector<LLPointer<T> > element_list; + typedef std::vector< LLPointer<T> > element_list; // note: don't remove the whitespace between "> >" typedef LLPointer<T>* element_iter; typedef const LLPointer<T>* const_element_iter; typedef typename std::vector<LLTreeListener<T>*>::iterator tree_listener_iter; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 85ea14f9bc..02c8d2b86f 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -35,7 +35,6 @@ #include <cmath> #include "llerror.h" -#include "llmemtype.h" #include "llvolumemgr.h" #include "v2math.h" @@ -378,8 +377,6 @@ public: LLProfile::Face* LLProfile::addCap(S16 faceID) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - Face *face = vector_append(mFaces, 1); face->mIndex = 0; @@ -392,8 +389,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID) LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - Face *face = vector_append(mFaces, 1); face->mIndex = i; @@ -409,7 +404,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO //static S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) { // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); S32 np = 0; // Generate an n-sided "circular" path. @@ -475,8 +469,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of // filleted and chamfered corners void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - // Generate an n-sided "circular" path. // 0 is (1,0), and we go counter-clockwise along a circular path from there. const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f }; @@ -730,8 +722,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3 S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { // this is basically LLProfile::generate stripped down to only operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (detail < MIN_LOD) { detail = MIN_LOD; @@ -842,8 +832,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if ((!mDirty) && (!is_sculpted)) { return FALSE; @@ -1116,8 +1104,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai BOOL LLProfileParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1193,8 +1179,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1286,7 +1270,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd) void LLProfileParams::copyParams(const LLProfileParams ¶ms) { - LLMemType m1(LLMemType::MTYPE_VOLUME); setCurveType(params.getCurveType()); setBegin(params.getBegin()); setEnd(params.getEnd()); @@ -1503,8 +1486,6 @@ const LLVector2 LLPathParams::getEndScale() const S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) { // this is basically LLPath::generate stripped down to only the operations that influence the number of points - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (detail < MIN_LOD) { detail = MIN_LOD; @@ -1554,8 +1535,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if ((!mDirty) && (!is_sculpted)) { return FALSE; @@ -1683,8 +1662,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL is_sculpted, S32 sculpt_size) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - mOpen = TRUE; // Draw end caps if (getPathLength() == 0) { @@ -1706,8 +1683,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, BOOL LLPathParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -1852,8 +1827,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const BOOL LLPathParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ // *NOTE: changing the size or type of these buffers will require @@ -2061,8 +2034,6 @@ S32 LLVolume::sNumMeshPoints = 0; LLVolume::LLVolume(const LLVolumeParams ¶ms, const F32 detail, const BOOL generate_single_face, const BOOL is_unique) : mParams(params) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - mUnique = is_unique; mFaceMask = 0x0; mDetail = detail; @@ -2134,7 +2105,6 @@ LLVolume::~LLVolume() BOOL LLVolume::generate() { - LLMemType m1(LLMemType::MTYPE_VOLUME); llassert_always(mProfilep); //Added 10.03.05 Dave Parks @@ -2730,8 +2700,6 @@ S32 LLVolume::getNumFaces() const void LLVolume::createVolumeFaces() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (mGenerateSingleFace) { // do nothing @@ -2903,8 +2871,6 @@ F32 LLVolume::sculptGetSurfaceArea() // create placeholder shape void LLVolume::sculptGeneratePlaceholder() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); @@ -2941,9 +2907,6 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR - - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 sizeS = mPathp->mPath.size(); S32 sizeT = mProfilep->mProfile.size(); @@ -3092,7 +3055,6 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32 // sculpt replaces generate() for sculpted surfaces void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) { - LLMemType m1(LLMemType::MTYPE_VOLUME); U8 sculpt_type = mParams.getSculptType(); BOOL data_is_empty = FALSE; @@ -3229,7 +3191,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams ¶ms) const void LLVolumeParams::copyParams(const LLVolumeParams ¶ms) { - LLMemType m1(LLMemType::MTYPE_VOLUME); mProfileParams.copyParams(params.mProfileParams); mPathParams.copyParams(params.mPathParams); mSculptID = params.getSculptID(); @@ -3601,8 +3562,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h S32 *LLVolume::getTriangleIndices(U32 &num_indices) const { - LLMemType m1(LLMemType::MTYPE_VOLUME); - S32 expected_num_triangle_indices = getNumTriangleIndices(); if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES) { @@ -4330,8 +4289,6 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices, const LLMatrix3& norm_mat_in, S32 face_mask) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - LLMatrix4a mat; mat.loadu(mat_in); @@ -4793,241 +4750,8 @@ BOOL equalTriangle(const S32 *a, const S32 *b) return FALSE; } -BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, - const std::vector<Point>& input_vertices, - const S32 num_input_triangles, - S32 *input_triangles, - S32 &num_output_vertices, - LLVector3 **output_vertices, - S32 &num_output_triangles, - S32 **output_triangles) -{ - LLMemType m1(LLMemType::MTYPE_VOLUME); - - /* Testing: avoid any cleanup - static BOOL skip_cleanup = TRUE; - if ( skip_cleanup ) - { - num_output_vertices = num_input_vertices; - num_output_triangles = num_input_triangles; - - *output_vertices = new LLVector3[num_input_vertices]; - for (S32 index = 0; index < num_input_vertices; index++) - { - (*output_vertices)[index] = input_vertices[index].mPos; - } - - *output_triangles = new S32[num_input_triangles*3]; - memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore - return TRUE; - } - */ - - // Here's how we do this: - // Create a structure which contains the original vertex index and the - // LLVector3 data. - // "Sort" the data by the vectors - // Create an array the size of the old vertex list, with a mapping of - // old indices to new indices. - // Go through triangles, shift so the lowest index is first - // Sort triangles by first index - // Remove duplicate triangles - // Allocate and pack new triangle data. - - //LLTimer cleanupTimer; - //llinfos << "In vertices: " << num_input_vertices << llendl; - //llinfos << "In triangles: " << num_input_triangles << llendl; - - S32 i; - typedef std::multiset<LLVertexIndexPair*, lessVertex> vertex_set_t; - vertex_set_t vertex_list; - - LLVertexIndexPair *pairp = NULL; - for (i = 0; i < num_input_vertices; i++) - { - LLVertexIndexPair *new_pairp = new LLVertexIndexPair(input_vertices[i].mPos, i); - vertex_list.insert(new_pairp); - } - - // Generate the vertex mapping and the list of vertices without - // duplicates. This will crash if there are no vertices. - llassert(num_input_vertices > 0); // check for no vertices! - S32 *vertex_mapping = new S32[num_input_vertices]; - LLVector3 *new_vertices = new LLVector3[num_input_vertices]; - LLVertexIndexPair *prev_pairp = NULL; - - S32 new_num_vertices; - - new_num_vertices = 0; - for (vertex_set_t::iterator iter = vertex_list.begin(), - end = vertex_list.end(); - iter != end; iter++) - { - pairp = *iter; - if (!prev_pairp || ((pairp->mVertex - prev_pairp->mVertex).magVecSquared() >= VERTEX_SLOP_SQRD)) - { - new_vertices[new_num_vertices] = pairp->mVertex; - //llinfos << "Added vertex " << new_num_vertices << " : " << pairp->mVertex << llendl; - new_num_vertices++; - // Update the previous - prev_pairp = pairp; - } - else - { - //llinfos << "Removed duplicate vertex " << pairp->mVertex << ", distance magVecSquared() is " << (pairp->mVertex - prev_pairp->mVertex).magVecSquared() << llendl; - } - vertex_mapping[pairp->mIndex] = new_num_vertices - 1; - } - - // Iterate through triangles and remove degenerates, re-ordering vertices - // along the way. - S32 *new_triangles = new S32[num_input_triangles * 3]; - S32 new_num_triangles = 0; - - for (i = 0; i < num_input_triangles; i++) - { - S32 v1 = i*3; - S32 v2 = v1 + 1; - S32 v3 = v1 + 2; - - //llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; - input_triangles[v1] = vertex_mapping[input_triangles[v1]]; - input_triangles[v2] = vertex_mapping[input_triangles[v2]]; - input_triangles[v3] = vertex_mapping[input_triangles[v3]]; - - if ((input_triangles[v1] == input_triangles[v2]) - || (input_triangles[v1] == input_triangles[v3]) - || (input_triangles[v2] == input_triangles[v3])) - { - //llinfos << "Removing degenerate triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; - // Degenerate triangle, skip - continue; - } - - if (input_triangles[v1] < input_triangles[v2]) - { - if (input_triangles[v1] < input_triangles[v3]) - { - // (0 < 1) && (0 < 2) - new_triangles[new_num_triangles*3] = input_triangles[v1]; - new_triangles[new_num_triangles*3+1] = input_triangles[v2]; - new_triangles[new_num_triangles*3+2] = input_triangles[v3]; - } - else - { - // (0 < 1) && (2 < 0) - new_triangles[new_num_triangles*3] = input_triangles[v3]; - new_triangles[new_num_triangles*3+1] = input_triangles[v1]; - new_triangles[new_num_triangles*3+2] = input_triangles[v2]; - } - } - else if (input_triangles[v2] < input_triangles[v3]) - { - // (1 < 0) && (1 < 2) - new_triangles[new_num_triangles*3] = input_triangles[v2]; - new_triangles[new_num_triangles*3+1] = input_triangles[v3]; - new_triangles[new_num_triangles*3+2] = input_triangles[v1]; - } - else - { - // (1 < 0) && (2 < 1) - new_triangles[new_num_triangles*3] = input_triangles[v3]; - new_triangles[new_num_triangles*3+1] = input_triangles[v1]; - new_triangles[new_num_triangles*3+2] = input_triangles[v2]; - } - new_num_triangles++; - } - - if (new_num_triangles == 0) - { - llwarns << "Created volume object with 0 faces." << llendl; - delete[] new_triangles; - delete[] vertex_mapping; - delete[] new_vertices; - return FALSE; - } - - typedef std::set<S32*, lessTriangle> triangle_set_t; - triangle_set_t triangle_list; - - for (i = 0; i < new_num_triangles; i++) - { - triangle_list.insert(&new_triangles[i*3]); - } - - // Sort through the triangle list, and delete duplicates - - S32 *prevp = NULL; - S32 *curp = NULL; - - S32 *sorted_tris = new S32[new_num_triangles*3]; - S32 cur_tri = 0; - for (triangle_set_t::iterator iter = triangle_list.begin(), - end = triangle_list.end(); - iter != end; iter++) - { - curp = *iter; - if (!prevp || !equalTriangle(prevp, curp)) - { - //llinfos << "Added triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl; - sorted_tris[cur_tri*3] = *curp; - sorted_tris[cur_tri*3+1] = *(curp+1); - sorted_tris[cur_tri*3+2] = *(curp+2); - cur_tri++; - prevp = curp; - } - else - { - //llinfos << "Skipped triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl; - } - } - - *output_vertices = new LLVector3[new_num_vertices]; - num_output_vertices = new_num_vertices; - for (i = 0; i < new_num_vertices; i++) - { - (*output_vertices)[i] = new_vertices[i]; - } - - *output_triangles = new S32[cur_tri*3]; - num_output_triangles = cur_tri; - memcpy(*output_triangles, sorted_tris, 3*cur_tri*sizeof(S32)); /* Flawfinder: ignore */ - - /* - llinfos << "Out vertices: " << num_output_vertices << llendl; - llinfos << "Out triangles: " << num_output_triangles << llendl; - for (i = 0; i < num_output_vertices; i++) - { - llinfos << i << ":" << (*output_vertices)[i] << llendl; - } - for (i = 0; i < num_output_triangles; i++) - { - llinfos << i << ":" << (*output_triangles)[i*3] << ":" << (*output_triangles)[i*3+1] << ":" << (*output_triangles)[i*3+2] << llendl; - } - */ - - //llinfos << "Out vertices: " << num_output_vertices << llendl; - //llinfos << "Out triangles: " << num_output_triangles << llendl; - delete[] vertex_mapping; - vertex_mapping = NULL; - delete[] new_vertices; - new_vertices = NULL; - delete[] new_triangles; - new_triangles = NULL; - delete[] sorted_tris; - sorted_tris = NULL; - triangle_list.clear(); - std::for_each(vertex_list.begin(), vertex_list.end(), DeletePointer()); - vertex_list.clear(); - - return TRUE; -} - - BOOL LLVolumeParams::importFile(LLFILE *fp) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - //llinfos << "importing volume" << llendl; const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -5082,8 +4806,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - //llinfos << "importing volume" << llendl; const S32 BUFSIZE = 16384; // *NOTE: changing the size or type of this buffer will require @@ -5123,8 +4845,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const { - LLMemType m1(LLMemType::MTYPE_VOLUME); - output_stream <<"\tshape 0\n"; output_stream <<"\t{\n"; mPathParams.exportLegacyStream(output_stream); @@ -6340,8 +6060,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0, BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - const std::vector<LLVolume::Point>& mesh = volume->getMesh(); const std::vector<LLVector3>& profile = volume->getProfile().mProfile; S32 max_s = volume->getProfile().getTotal(); @@ -6492,8 +6210,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (!(mTypeMask & HOLLOW_MASK) && !(mTypeMask & OPEN_MASK) && ((volume->getParams().getPathParams().getBegin()==0.0f)&& @@ -6880,8 +6596,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) void LLVolumeFace::createBinormals() { - LLMemType m1(LLMemType::MTYPE_VOLUME); - if (!mBinormals) { allocateBinormals(mNumVertices); @@ -7153,8 +6867,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) { - LLMemType m1(LLMemType::MTYPE_VOLUME); - BOOL flat = mTypeMask & FLAT_MASK; U8 sculpt_type = volume->getParams().getSculptType(); diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 2e6f9e2f71..c845556557 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -1023,17 +1023,6 @@ public: LLVector3* normal = NULL, LLVector3* bi_normal = NULL); - // The following cleans up vertices and triangles, - // getting rid of degenerate triangles and duplicate vertices, - // and allocates new arrays with the clean data. - static BOOL cleanupTriangleData( const S32 num_input_vertices, - const std::vector<Point> &input_vertices, - const S32 num_input_triangles, - S32 *input_triangles, - S32 &num_output_vertices, - LLVector3 **output_vertices, - S32 &num_output_triangles, - S32 **output_triangles); LLFaceID generateFaceMask(); BOOL isFaceMaskValid(LLFaceID face_mask); diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp index c60b750088..9083273ee5 100644 --- a/indra/llmath/llvolumemgr.cpp +++ b/indra/llmath/llvolumemgr.cpp @@ -26,7 +26,6 @@ #include "linden_common.h" #include "llvolumemgr.h" -#include "llmemtype.h" #include "llvolume.h" @@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup) // protected LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params) { - LLMemType m1(LLMemType::MTYPE_VOLUME); LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params); insertGroup(volgroup); return volgroup; @@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail) mRefs++; if (mVolumeLODs[detail].isNull()) { - LLMemType m1(LLMemType::MTYPE_VOLUME); mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]); } mLODRefs[detail]++; diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp index 9105b1c1fd..5ee3c45502 100644 --- a/indra/llmath/tests/alignment_test.cpp +++ b/indra/llmath/tests/alignment_test.cpp @@ -79,7 +79,7 @@ template<> template<> void alignment_test_object_t::test<1>() { # ifdef LL_DEBUG - skip("This test fails on Windows when compiled in debug mode."); +// skip("This test fails on Windows when compiled in debug mode."); # endif const int num_tests = 7; @@ -116,7 +116,7 @@ template<> template<> void alignment_test_object_t::test<3>() { # ifdef LL_DEBUG - skip("This test fails on Windows when compiled in debug mode."); +// skip("This test fails on Windows when compiled in debug mode."); # endif const int ARR_SIZE = 7; @@ -128,12 +128,14 @@ void alignment_test_object_t::test<3>() } MyVector4a *veca = new MyVector4a[ARR_SIZE]; + //std::cout << "veca base is " << (S32) veca << std::endl; ensure("LLAligment veca base", is_aligned(veca,16)); for(int i=0; i<ARR_SIZE; i++) { std::cout << "veca[" << i << "]" << std::endl; ensure("LLAlignment veca member unaligned", is_aligned(&veca[i],16)); } + delete [] veca; } } diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 700525e1fa..a6e2c89ba4 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -348,7 +348,7 @@ void LLAvatarNameCache::requestNamesViaCapability() while(!sAskQueue.empty()) { it = sAskQueue.begin(); - const LLUUID& agent_id = *it; + LLUUID agent_id = *it; sAskQueue.erase(it); if (url.empty()) @@ -416,7 +416,7 @@ void LLAvatarNameCache::requestNamesViaLegacy() for (S32 requests = 0; !sAskQueue.empty() && requests < MAX_REQUESTS; ++requests) { it = sAskQueue.begin(); - const LLUUID& agent_id = *it; + LLUUID agent_id = *it; sAskQueue.erase(it); // Mark as pending first, just in case the callback is immediately @@ -563,8 +563,7 @@ void LLAvatarNameCache::eraseUnrefreshed() const LLAvatarName& av_name = it->second; if (av_name.mExpires < max_unrefreshed) { - const LLUUID& agent_id = it->first; - LL_DEBUGS("AvNameCache") << agent_id + LL_DEBUGS("AvNameCache") << it->first << " user '" << av_name.mUsername << "' " << "expired " << now - av_name.mExpires << " secs ago" << LL_ENDL; diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index 250cace6e9..01da20f060 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -30,7 +30,6 @@ #include "llbuffer.h" #include "llmath.h" -#include "llmemtype.h" #include "llstl.h" #include "llthread.h" @@ -44,7 +43,6 @@ LLSegment::LLSegment() : mData(NULL), mSize(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : @@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) : mData(data), mSize(data_len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLSegment::~LLSegment() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } bool LLSegment::isOnChannel(S32 channel) const @@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384; allocate(DEFAULT_HEAP_BUFFER_SIZE); } @@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); allocate(size); } @@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : mNextFree(NULL), mReclaimedBytes(0) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if((len > 0) && src) { allocate(len); @@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) : // virtual LLHeapBuffer::~LLHeapBuffer() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); delete[] mBuffer; mBuffer = NULL; mSize = 0; @@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment( S32 size, LLSegment& segment) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // get actual size of the segment. S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer))); @@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const void LLHeapBuffer::allocate(S32 size) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); mReclaimedBytes = 0; mBuffer = new U8[size]; if(mBuffer) @@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() : mNextBaseChannel(0), mMutexp(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferArray::~LLBufferArray() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer()); delete mMutexp; @@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len) { LLMutexLock lock(mMutexp) ; - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector<LLSegment> segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector<LLSegment> segments; if(copyIntoBuffers(channel, src, len, segments)) { @@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter( const U8* src, S32 len) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); std::vector<LLSegment> segments; LLMutexLock lock(mMutexp) ; @@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t end = mSegments.end(); segment_iterator_t it = getSegment(address); if(it == end) @@ -414,7 +398,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( LLSegment& segment) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); segment_iterator_t rv = mSegments.begin(); segment_iterator_t end = mSegments.end(); if(!address) @@ -578,7 +561,6 @@ U8* LLBufferArray::readAfter( U8* dest, S32& len) const { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); U8* rv = start; if(!dest || len <= 0) { @@ -642,7 +624,6 @@ U8* LLBufferArray::seek( S32 delta) const { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); const_segment_iterator_t it; const_segment_iterator_t end = mSegments.end(); U8* rv = start; @@ -786,8 +767,6 @@ U8* LLBufferArray::seek( //test use only bool LLBufferArray::takeContents(LLBufferArray& source) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); - LLMutexLock lock(mMutexp); source.lock(); @@ -813,7 +792,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( S32 len) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // start at the end of the buffers, because it is the most likely // to have free space. LLSegment segment; @@ -852,7 +830,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment( bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); // Find out which buffer contains the segment, and if it is found, // ask it to reclaim the memory. @@ -885,7 +862,6 @@ bool LLBufferArray::copyIntoBuffers( std::vector<LLSegment>& segments) { ASSERT_LLBUFFERARRAY_MUTEX_LOCKED - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!src || !len) return false; S32 copied = 0; LLSegment segment; diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index 8d8ad05ad5..a51a48edc3 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -30,7 +30,6 @@ #include "llbufferstream.h" #include "llbuffer.h" -#include "llmemtype.h" #include "llthread.h" static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4; @@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf( mChannels(channels), mBuffer(buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStreamBuf::~LLBufferStreamBuf() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); sync(); } // virtual int LLBufferStreamBuf::underflow() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); //lldebugs << "LLBufferStreamBuf::underflow()" << llendl; if(!mBuffer) { @@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow() // virtual int LLBufferStreamBuf::overflow(int c) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer) { return EOF; @@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c) // virtual int LLBufferStreamBuf::sync() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); int return_value = -1; if(!mBuffer) { @@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff( std::ios::openmode which) #endif { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); if(!mBuffer || ((way == std::ios::beg) && (off < 0)) || ((way == std::ios::end) && (off > 0))) @@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream( std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } LLBufferStream::~LLBufferStream() { - LLMemType m1(LLMemType::MTYPE_IO_BUFFER); } diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 479efabb5f..8f4af1984c 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -36,7 +36,6 @@ #include "llsdserialize.h" #include "lluuid.h" #include "message.h" -#include "llmemtype.h" #include <boost/regex.hpp> @@ -663,7 +662,6 @@ boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, ol void LLCacheName::processPending() { - LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING); const F32 SECS_BETWEEN_PROCESS = 0.1f; if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS)) { @@ -769,7 +767,6 @@ std::string LLCacheName::getDefaultLastName() void LLCacheName::Impl::processPendingAsks() { - LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS); sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue); sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue); mAskNameQueue.clear(); @@ -778,7 +775,6 @@ void LLCacheName::Impl::processPendingAsks() void LLCacheName::Impl::processPendingReplies() { - LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES); // First call all the callbacks, because they might send messages. for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it) { diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index e0410906fb..0c2d4b823d 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -679,7 +679,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) setPacketInID((id + 1) % LL_MAX_OUT_PACKET_ID); mLastPacketGap = 0; - mOutOfOrderRate.count(0); return; } @@ -775,7 +774,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) } } - mOutOfOrderRate.count(gap); mLastPacketGap = gap; } diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index d1c400c6a2..430d6358f7 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -40,7 +40,6 @@ #include "llpacketack.h" #include "lluuid.h" #include "llthrottle.h" -#include "llstat.h" // // Constants @@ -126,8 +125,6 @@ public: S32 getUnackedPacketCount() const { return mUnackedPacketCount; } S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } F64 getNextPingSendTime() const { return mNextPingSendTime; } - F32 getOutOfOrderRate(LLStatAccum::TimeScale scale = LLStatAccum::SCALE_MINUTE) - { return mOutOfOrderRate.meanValue(scale); } U32 getLastPacketGap() const { return mLastPacketGap; } LLHost getHost() const { return mHost; } F64 getLastPacketInTime() const { return mLastPacketInTime; } @@ -275,7 +272,6 @@ protected: LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers S32 mCurrentResendCount; // Number of resent packets since last spam - LLStatRate mOutOfOrderRate; // Rate of out of order packets coming in. U32 mLastPacketGap; // Gap in sequence number of last packet. const F32 mHeartbeatInterval; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index 987f386aa3..1236fc8b71 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -37,12 +37,10 @@ #include "lliopipe.h" #include "lliosocket.h" #include "llioutil.h" -#include "llmemtype.h" #include "llmemorystream.h" #include "llpumpio.h" #include "llsd.h" #include "llsdserialize_xml.h" -#include "llstat.h" #include "llstl.h" #include "lltimer.h" @@ -141,6 +139,11 @@ private: }; static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PIPE("HTTP Pipe"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_GET("HTTP Get"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PUT("HTTP Put"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_POST("HTTP Post"); +static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_DELETE("HTTP Delete"); + LLIOPipe::EStatus LLHTTPPipe::process_impl( const LLChannelDescriptors& channels, buffer_ptr_t& buffer, @@ -177,12 +180,12 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB]; if(verb == HTTP_VERB_GET) { - LLPerfBlock getblock("http_get"); + LLFastTimer _(FTM_PROCESS_HTTP_GET); mNode.get(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_PUT) { - LLPerfBlock putblock("http_put"); + LLFastTimer _(FTM_PROCESS_HTTP_PUT); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -198,7 +201,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_POST) { - LLPerfBlock postblock("http_post"); + LLFastTimer _(FTM_PROCESS_HTTP_POST); LLSD input; if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD) { @@ -214,7 +217,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } else if(verb == HTTP_VERB_DELETE) { - LLPerfBlock delblock("http_delete"); + LLFastTimer _(FTM_PROCESS_HTTP_DELETE); mNode.del(LLHTTPNode::ResponsePtr(mResponse), context); } else if(verb == HTTP_VERB_OPTIONS) @@ -443,7 +446,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_HEADER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); if(eos) { PUMP_DEBUG; @@ -587,13 +589,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) : mContentLength(0), mRootNode(tree) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); } // virtual LLHTTPResponder::~LLHTTPResponder() { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); //lldebugs << "destroying LLHTTPResponder" << llendl; } @@ -603,7 +603,6 @@ bool LLHTTPResponder::readHeaderLine( U8* dest, S32& len) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); --len; U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len); dest[len] = '\0'; @@ -628,7 +627,6 @@ void LLHTTPResponder::markBad( const LLChannelDescriptors& channels, buffer_ptr_t buffer) { - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); mState = STATE_SHORT_CIRCUIT; LLBufferStream out(channels, buffer.get()); out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n" @@ -648,7 +646,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( { LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER); LLIOPipe::EStatus status = STATUS_OK; // parsing headers diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index d5b4d45821..0287026659 100644 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -33,7 +33,6 @@ #include "llbuffer.h" #include "llhost.h" -#include "llmemtype.h" #include "llpumpio.h" // @@ -100,7 +99,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock) // static LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); LLSocket::ptr_t rv; apr_socket_t* socket = NULL; apr_pool_t* new_pool = NULL; @@ -198,7 +196,6 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port) // static LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); LLSocket::ptr_t rv; if(!socket) { @@ -240,12 +237,10 @@ LLSocket::LLSocket(apr_socket_t* socket, apr_pool_t* pool) : mPort(PORT_INVALID) { ll_debug_socket("Constructing wholely formed socket", mSocket); - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLSocket::~LLSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // *FIX: clean up memory we are holding. if(mSocket) { @@ -265,7 +260,6 @@ LLSocket::~LLSocket() void LLSocket::setBlocking(S32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0)); @@ -276,7 +270,6 @@ void LLSocket::setBlocking(S32 timeout) void LLSocket::setNonBlocking() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); // set up the socket options ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0)); ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1)); @@ -293,12 +286,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) : mSource(socket), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketReader::~LLIOSocketReader() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketReader" << llendl; } @@ -314,7 +305,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_READER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mSource) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -396,12 +386,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) : mLastWritten(NULL), mInitialized(false) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOSocketWriter::~LLIOSocketWriter() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOSocketWriter" << llendl; } @@ -416,7 +404,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl( { LLFastTimer t(FTM_PROCESS_SOCKET_WRITER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!mDestination) return STATUS_PRECONDITION_NOT_MET; if(!mInitialized) { @@ -550,12 +537,10 @@ LLIOServerSocket::LLIOServerSocket( mInitialized(false), mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS) { - LLMemType m1(LLMemType::MTYPE_IO_TCP); } LLIOServerSocket::~LLIOServerSocket() { - LLMemType m1(LLMemType::MTYPE_IO_TCP); //lldebugs << "Destroying LLIOServerSocket" << llendl; } @@ -575,7 +560,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( { LLFastTimer t(FTM_PROCESS_SERVER_SOCKET); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_TCP); if(!pump) { llwarns << "Need a pump for server socket." << llendl; diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index 16d825d33b..ae8e0087c1 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -29,7 +29,6 @@ #include "lldarray.h" #include "message.h" // TODO: babbage: Remove... -#include "llstat.h" #include "llstl.h" class LLMsgVarData @@ -263,6 +262,7 @@ enum EMsgDeprecation MD_DEPRECATED }; + class LLMessageTemplate { public: @@ -364,7 +364,6 @@ public: { if (mHandlerFunc) { - LLPerfBlock msg_cb_time("msg_cb", mName); mHandlerFunc(msgsystem, mUserData); return TRUE; } diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index f3ef4f2684..0623e99f0a 100644 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp @@ -34,9 +34,7 @@ #include "apr_poll.h" #include "llapr.h" -#include "llmemtype.h" #include "llstl.h" -#include "llstat.h" // These should not be enabled in production, but they can be // intensely useful during development for finding certain kinds of @@ -153,7 +151,6 @@ struct ll_delete_apr_pollset_fd_client_data typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t; void operator()(const pipe_conditional_t& conditional) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); S32* client_id = (S32*)conditional.second.client_data; delete client_id; } @@ -177,19 +174,16 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) : { mCurrentChain = mRunningChains.end(); - LLMemType m1(LLMemType::MTYPE_IO_PUMP); initialize(pool); } LLPumpIO::~LLPumpIO() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); cleanup(); } bool LLPumpIO::prime(apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); cleanup(); initialize(pool); return ((pool == NULL) ? false : true); @@ -197,7 +191,6 @@ bool LLPumpIO::prime(apr_pool_t* pool) bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(chain.empty()) return false; #if LL_THREADS_APR @@ -233,7 +226,6 @@ bool LLPumpIO::addChain( LLSD context, F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // remember that if the caller is providing a full link // description, we need to have that description matched to a @@ -311,7 +303,6 @@ static std::string events_2_string(apr_int16_t events) bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pipe) return false; ll_debug_poll_fd("Set conditional", poll); @@ -423,7 +414,6 @@ bool LLPumpIO::sleepChain(F64 seconds) bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mRunningChains.end() == mCurrentChain) { return false; @@ -441,6 +431,7 @@ void LLPumpIO::pump() } static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO"); +static LLFastTimer::DeclareTimer FTM_PUMP_POLL("Pump Poll"); LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain) { @@ -454,7 +445,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t //timeout is in microseconds void LLPumpIO::pump(const S32& poll_timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLFastTimer t1(FTM_PUMP_IO); //llinfos << "LLPumpIO::pump()" << llendl; @@ -536,7 +526,7 @@ void LLPumpIO::pump(const S32& poll_timeout) S32 count = 0; S32 client_id = 0; { - LLPerfBlock polltime("pump_poll"); + LLFastTimer _(FTM_PUMP_POLL); apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); } PUMP_DEBUG; @@ -747,7 +737,6 @@ void LLPumpIO::pump(const S32& poll_timeout) bool LLPumpIO::respond(LLIOPipe* pipe) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(NULL == pipe) return false; #if LL_THREADS_APR @@ -766,7 +755,6 @@ bool LLPumpIO::respond( LLIOPipe::buffer_ptr_t data, LLSD context) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // if the caller is providing a full link description, we need to // have that description matched to a particular buffer. if(!data) return false; @@ -789,7 +777,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain"); void LLPumpIO::callback() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); //llinfos << "LLPumpIO::callback()" << llendl; if(true) { @@ -840,7 +827,6 @@ void LLPumpIO::control(LLPumpIO::EControl op) void LLPumpIO::initialize(apr_pool_t* pool) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(!pool) return; #if LL_THREADS_APR // SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly. @@ -852,7 +838,6 @@ void LLPumpIO::initialize(apr_pool_t* pool) void LLPumpIO::cleanup() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); #if LL_THREADS_APR if(mChainsMutex) apr_thread_mutex_destroy(mChainsMutex); if(mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex); @@ -875,7 +860,6 @@ void LLPumpIO::cleanup() void LLPumpIO::rebuildPollset() { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); // lldebugs << "LLPumpIO::rebuildPollset()" << llendl; if(mPollset) { @@ -928,7 +912,6 @@ void LLPumpIO::rebuildPollset() void LLPumpIO::processChain(LLChainInfo& chain) { PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_PUMP); LLIOPipe::EStatus status = LLIOPipe::STATUS_OK; links_t::iterator it = chain.mHead; links_t::iterator end = chain.mChainLinks.end(); @@ -1130,7 +1113,6 @@ bool LLPumpIO::handleChainError( LLChainInfo& chain, LLIOPipe::EStatus error) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); links_t::reverse_iterator rit; if(chain.mHead == chain.mChainLinks.end()) { @@ -1194,13 +1176,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() : mEOS(false), mHasCurlRequest(false) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS); } void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(timeout > 0.0f) { mTimer.start(); @@ -1215,7 +1195,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta) { - LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(mTimer.getStarted()) { F64 expiry = mTimer.expiresAt(); diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 91fd070f07..fcda0e81a3 100644 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp @@ -31,7 +31,6 @@ #include "llbufferstream.h" #include "llfiltersd2xmlrpc.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsd.h" #include "llsdserialize.h" @@ -50,18 +49,15 @@ LLSDRPCResponse::LLSDRPCResponse() : mIsError(false), mIsFault(false) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } // virtual LLSDRPCResponse::~LLSDRPCResponse() { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } bool LLSDRPCResponse::extractResponse(const LLSD& sd) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); bool rv = true; if(sd.has(LLSDRPC_RESPONSE_NAME)) { @@ -94,7 +90,6 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl( { LLFastTimer t(FTM_SDRPC_RESPONSE); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); if(mIsError) { error(pump); @@ -119,13 +114,11 @@ LLSDRPCClient::LLSDRPCClient() : mState(STATE_NONE), mQueue(EPBQ_PROCESS) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } // virtual LLSDRPCClient::~LLSDRPCClient() { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); } bool LLSDRPCClient::call( @@ -135,7 +128,6 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); //llinfos << "RPC: " << uri << "." << method << "(" << *parameter << ")" // << llendl; if(method.empty() || !response) @@ -162,7 +154,6 @@ bool LLSDRPCClient::call( LLSDRPCResponse* response, EPassBackQueue queue) { - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); //llinfos << "RPC: " << uri << "." << method << "(" << parameter << ")" // << llendl; if(method.empty() || parameter.empty() || !response) @@ -193,7 +184,6 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT); if((STATE_NONE == mState) || (!pump)) { // You should have called the call() method already. diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index 9f776aca72..f26ee52f71 100644 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp @@ -31,7 +31,6 @@ #include "llbuffer.h" #include "llbufferstream.h" -#include "llmemtype.h" #include "llpumpio.h" #include "llsdserialize.h" #include "llstl.h" @@ -58,12 +57,10 @@ LLSDRPCServer::LLSDRPCServer() : mPump(NULL), mLock(0) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); } LLSDRPCServer::~LLSDRPCServer() { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); std::for_each( mMethods.begin(), mMethods.end(), @@ -109,7 +106,6 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl( { LLFastTimer t(FTM_PROCESS_SDRPC_SERVER); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // lldebugs << "LLSDRPCServer::process_impl" << llendl; // Once we have all the data, We need to read the sd on // the the in channel, and respond on the out channel @@ -253,7 +249,6 @@ ESDRPCSStatus LLSDRPCServer::callMethod( const LLChannelDescriptors& channels, LLBufferArray* response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // Try to find the method in the method table. ESDRPCSStatus rv = ESDRPCS_DONE; method_map_t::iterator it = mMethods.find(method); @@ -292,7 +287,6 @@ ESDRPCSStatus LLSDRPCServer::callbackMethod( const LLChannelDescriptors& channels, LLBufferArray* response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); // Try to find the method in the callback method table. ESDRPCSStatus rv = ESDRPCS_DONE; method_map_t::iterator it = mCallbackMethods.find(method); @@ -320,7 +314,6 @@ void LLSDRPCServer::buildFault( S32 code, const std::string& msg) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); LLBufferStream ostr(channels, data); ostr << FAULT_PART_1 << code << FAULT_PART_2 << msg << FAULT_PART_3; llinfos << "LLSDRPCServer::buildFault: " << code << ", " << msg << llendl; @@ -332,7 +325,6 @@ void LLSDRPCServer::buildResponse( LLBufferArray* data, const LLSD& response) { - LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER); LLBufferStream ostr(channels, data); ostr << RESPONSE_PART_1; LLSDSerialize::toNotation(response, ostr); diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index f3f0007205..227efdb07a 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -34,7 +34,6 @@ #include <openssl/ssl.h> #include "llcurl.h" #include "llioutil.h" -#include "llmemtype.h" #include "llproxy.h" #include "llpumpio.h" #include "llsd.h" @@ -81,7 +80,6 @@ LLURLRequestDetail::LLURLRequestDetail() : mIsBodyLimitSet(false), mSSLVerifyCallback(NULL) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCurlRequest = new LLCurlEasyRequest(); if(!mCurlRequest->isValid()) //failed. @@ -93,7 +91,6 @@ LLURLRequestDetail::LLURLRequestDetail() : LLURLRequestDetail::~LLURLRequestDetail() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); delete mCurlRequest; mLastRead = NULL; } @@ -156,7 +153,6 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action) LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) : mAction(action) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); initialize(); } @@ -165,21 +161,18 @@ LLURLRequest::LLURLRequest( const std::string& url) : mAction(action) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); initialize(); setURL(url); } LLURLRequest::~LLURLRequest() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); delete mDetail; mDetail = NULL ; } void LLURLRequest::setURL(const std::string& url) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mDetail->mURL = url; } @@ -190,7 +183,6 @@ std::string LLURLRequest::getURL() const void LLURLRequest::addHeader(const char* header) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mDetail->mCurlRequest->slist_append(header); } @@ -202,7 +194,6 @@ void LLURLRequest::setBodyLimit(U32 size) void LLURLRequest::setCallback(LLURLRequestComplete* callback) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCompletionCallback = callback; mDetail->mCurlRequest->setHeaderCallback(&headerCallback, (void*)callback); } @@ -267,8 +258,6 @@ LLIOPipe::EStatus LLURLRequest::handleError( LLIOPipe::EStatus status, LLPumpIO* pump) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); - if(!isValid()) { return STATUS_EXPIRED ; @@ -302,7 +291,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( { LLFastTimer t(FTM_PROCESS_URL_REQUEST); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); //llinfos << "LLURLRequest::process_impl()" << llendl; if (!buffer) return STATUS_ERROR; @@ -368,7 +356,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl( } } - while(1) + bool keep_looping = true; + while(keep_looping) { CURLcode result; @@ -420,8 +409,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl( case CURLE_FAILED_INIT: case CURLE_COULDNT_CONNECT: status = STATUS_NO_CONNECTION; + keep_looping = false; break; - default: + default: // CURLE_URL_MALFORMAT llwarns << "URLRequest Error: " << result << ", " << LLCurl::strerror(result) @@ -429,6 +419,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl( << (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL) << llendl; status = STATUS_ERROR; + keep_looping = false; break; } } @@ -455,7 +446,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl( void LLURLRequest::initialize() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mState = STATE_INITIALIZED; mDetail = new LLURLRequestDetail; @@ -476,7 +466,6 @@ bool LLURLRequest::configure() { LLFastTimer t(FTM_URL_REQUEST_CONFIGURE); - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); bool rv = false; S32 bytes = mDetail->mResponseBuffer->countAfter( mDetail->mChannels.in(), @@ -556,7 +545,6 @@ size_t LLURLRequest::downCallback( size_t nmemb, void* user) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); LLURLRequest* req = (LLURLRequest*)user; if(STATE_WAITING_FOR_RESPONSE == req->mState) { @@ -592,7 +580,6 @@ size_t LLURLRequest::upCallback( size_t nmemb, void* user) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); LLURLRequest* req = (LLURLRequest*)user; S32 bytes = llmin( (S32)(size * nmemb), @@ -690,7 +677,6 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( { LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR); PUMP_DEBUG; - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); // The destination host is in the context. if(context.isUndefined() || !mRequest) { @@ -718,13 +704,11 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl( LLURLRequestComplete::LLURLRequestComplete() : mRequestStatus(LLIOPipe::STATUS_ERROR) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); } // virtual LLURLRequestComplete::~LLURLRequestComplete() { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); } //virtual @@ -763,7 +747,6 @@ void LLURLRequestComplete::noResponse() void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status) { - LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mRequestStatus = status; } diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index b9cddc8e45..00b9d81611 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -886,8 +886,17 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user return; } - - std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); + // If we want to use a special path (e.g. LL_PATH_CACHE), we want to make sure we create the + // proper expanded filename. + std::string expanded_filename; + if (local_path != LL_PATH_NONE) + { + expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename ); + } + else + { + expanded_filename = local_filename; + } llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl; BOOL delete_local_on_completion = FALSE; diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 6a425cfe98..ae95087377 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -80,7 +80,6 @@ #include "v3math.h" #include "v4math.h" #include "lltransfertargetvfile.h" -#include "llmemtype.h" // Constants //const char* MESSAGE_LOG_FILENAME = "message.log"; @@ -793,7 +792,6 @@ S32 LLMessageSystem::getReceiveBytes() const void LLMessageSystem::processAcks() { - LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS); F64 mt_sec = getMessageTimeSeconds(); { gTransferManager.updateTransfers(); @@ -4020,7 +4018,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds ) // TODO: babbage: move gServicePump in to LLMessageSystem? bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump) { - LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL); if(checkMessages(frame_count)) { return true; diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp index a2be307cc8..7c3def6024 100644 --- a/indra/llmessage/tests/llhttpclient_test.cpp +++ b/indra/llmessage/tests/llhttpclient_test.cpp @@ -48,7 +48,7 @@ namespace tut { LLSD storage; - + class LLSDStorageNode : public LLHTTPNode { public: @@ -82,8 +82,13 @@ namespace tut { public: HTTPClientTestData(): - local_server(STRINGIZE("http://127.0.0.1:" << getenv("PORT") << "/")) + PORT(getenv("PORT")), + // Turning NULL PORT into empty string doesn't make things work; + // that's just to keep this initializer from blowing up. We test + // PORT separately in the constructor body. + local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/")) { + ensure("Set environment variable PORT to local test server port", PORT); apr_pool_create(&mPool, NULL); LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); @@ -91,7 +96,7 @@ namespace tut LLHTTPClient::setPump(*mClientPump); } - + ~HTTPClientTestData() { delete mServerPump; @@ -107,7 +112,7 @@ namespace tut LLHTTPStandardServices::useServices(); LLHTTPRegistrar::buildAllServices(root); } - + void runThePump(float timeout = 100.0f) { LLTimer timer; @@ -134,6 +139,7 @@ namespace tut mServerPump = NULL; } + const char* const PORT; const std::string local_server; private: @@ -148,11 +154,11 @@ namespace tut { std::string msg = llformat("error() called when not expected, status %d", - mStatus); + mStatus); fail(msg); } } - + void ensureStatusError() { if (!mSawError) @@ -160,7 +166,7 @@ namespace tut fail("error() wasn't called"); } } - + LLSD getResult() { return mResult; @@ -169,7 +175,7 @@ namespace tut { return mHeader; } - + protected: bool mSawError; U32 mStatus; @@ -187,18 +193,18 @@ namespace tut : mClient(client) { } - + public: static Result* build(HTTPClientTestData& client) { return new Result(client); } - + ~Result() { mClient.mResultDeleted = true; } - + virtual void error(U32 status, const std::string& reason) { mClient.mSawError = true; @@ -216,7 +222,7 @@ namespace tut const LLSD& content) { LLHTTPClient::Responder::completed(status, reason, content); - + mClient.mSawCompleted = true; } @@ -244,12 +250,12 @@ namespace tut mResult.clear(); mHeader.clear(); mResultDeleted = false; - + return Result::build(*this); } }; - - + + typedef test_group<HTTPClientTestData> HTTPClientTestGroup; typedef HTTPClientTestGroup::object HTTPClientTestObject; HTTPClientTestGroup httpClientTestGroup("http_client"); diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 3fc54573a7..8183467dc5 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -15,7 +15,6 @@ include_directories( if (DARWIN) include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) find_library(COCOA_LIBRARY Cocoa) endif (DARWIN) @@ -68,7 +67,7 @@ add_dependencies(SLPlugin if (DARWIN) # Mac version needs to link against Carbon - target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY}) + target_link_libraries(SLPlugin ${COCOA_LIBRARY}) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) add_custom_command( TARGET SLPlugin POST_BUILD diff --git a/indra/llplugin/slplugin/slplugin-objc.h b/indra/llplugin/slplugin/slplugin-objc.h index 602d848f7e..f2c2b3239c 100644 --- a/indra/llplugin/slplugin/slplugin-objc.h +++ b/indra/llplugin/slplugin/slplugin-objc.h @@ -28,8 +28,26 @@ * @endcond */ +//Protos for ObjectiveC classes (cannot import cocoa here due to BOOL conflict) +class NSWindow; /* Defined in slplugin-objc.mm: */ -void setupCocoa(); -void createAutoReleasePool(); -void deleteAutoReleasePool(); + +class LLCocoaPlugin +{ +public: + LLCocoaPlugin(); + void setupCocoa(); + void createAutoReleasePool(); + void deleteAutoReleasePool(); + void setupGroup(); + void updateWindows(); + void processEvents(); +public: + //EventTargetRef mEventTarget; + NSWindow* mFrontWindow; + NSWindow* mPluginWindow; + int mHackState; +}; + + diff --git a/indra/llplugin/slplugin/slplugin-objc.mm b/indra/llplugin/slplugin/slplugin-objc.mm index 646416b9d2..a434739350 100644 --- a/indra/llplugin/slplugin/slplugin-objc.mm +++ b/indra/llplugin/slplugin/slplugin-objc.mm @@ -30,11 +30,13 @@ #include <AppKit/AppKit.h> +#import <Cocoa/Cocoa.h> #include "slplugin-objc.h" +//Note: NSApp is a global defined by cocoa which is an id to the application. -void setupCocoa() +void LLCocoaPlugin::setupCocoa() { static bool inited = false; @@ -56,6 +58,8 @@ void setupCocoa() // Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image [[[NSWindow alloc] init] release]; + mPluginWindow = [NSApp mainWindow]; + deleteAutoReleasePool(); inited = true; @@ -64,7 +68,7 @@ void setupCocoa() static NSAutoreleasePool *sPool = NULL; -void createAutoReleasePool() +void LLCocoaPlugin::createAutoReleasePool() { if(!sPool) { @@ -72,7 +76,7 @@ void createAutoReleasePool() } } -void deleteAutoReleasePool() +void LLCocoaPlugin::deleteAutoReleasePool() { if(sPool) { @@ -80,3 +84,94 @@ void deleteAutoReleasePool() sPool = NULL; } } + +LLCocoaPlugin::LLCocoaPlugin():mHackState(0) +{ + NSArray* window_list = [NSApp orderedWindows]; + mFrontWindow = [window_list objectAtIndex:0]; +} + +void LLCocoaPlugin::processEvents() +{ + // Some plugins (webkit at least) will want an event loop. This qualifies. + NSEvent * event; + event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; + [NSApp sendEvent: event]; +} + + +//Turns out the window ordering stuff never gets hit with any of the current plugins. +//Leaving the following code here 'just in case' for the time being. + +void LLCocoaPlugin::setupGroup() +{ + // CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group); + // if(layer_group) + // { + // // Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube) + // SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer")); + // SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel); + // } + +} + +void LLCocoaPlugin::updateWindows() //SPATTERS give this a better name. +{ +// NSArray* window_list = [NSApp orderedWindows]; +// NSWindow* current_window = [window_list objectAtIndex:0]; +// NSWindow* parent_window = [ current_window parentWindow ]; +// bool this_is_front_process = false; +// bool parent_is_front_process = false; +// +// +// // Check for a change in this process's frontmost window. +// if ( current_window != mFrontWindow ) +// { +// // and figure out whether this process or its parent are currently frontmost +// if ( current_window == parent_window ) parent_is_front_process = true; +// if ( current_window == mPluginWindow ) this_is_front_process = true; +// +// if (current_window != NULL && mFrontWindow == NULL) +// { +// // Opening the first window +// +// if(mHackState == 0) +// { +// // Next time through the event loop, lower the window group layer +// mHackState = 1; +// } +// +// if(parent_is_front_process) +// { +// // Bring this process's windows to the front. +// [mPluginWindow makeKeyAndOrderFront:NSApp]; +// [mPluginWindow setOrderedIndex:0]; +// } +// +// [NSApp activateIgnoringOtherApps:YES]; +// } +// +// else if (( current_window == NULL) && (mFrontWindow != NULL)) +// { +// // Closing the last window +// +// if(this_is_front_process) +// { +// // Try to bring this process's parent to the front +// [parent_window makeKeyAndOrderFront:NSApp]; +// [parent_window setOrderedIndex:0]; +// } +// } +// else if(mHackState == 1) +// { +//// if(layer_group) +//// { +//// // Set the window group level back to something less extreme +//// SetWindowGroupLevel(layer_group, kCGNormalWindowLevel); +//// } +// mHackState = 2; +// } +// +// mFrontWindow = [window_list objectAtIndex:0]; +// } + } diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 516a58db88..6c9ba0ae52 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -37,8 +37,12 @@ #include "llapr.h" #include "llstring.h" +#include <iostream> +#include <fstream> +using namespace std; + + #if LL_DARWIN - #include <Carbon/Carbon.h> #include "slplugin-objc.h" #endif @@ -176,6 +180,7 @@ int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL int main(int argc, char **argv) #endif { + ll_init_apr(); // Set up llerror logging @@ -216,26 +221,25 @@ int main(int argc, char **argv) // Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown. signal(SIGILL, &crash_handler); // illegal instruction -# if LL_DARWIN - signal(SIGEMT, &crash_handler); // emulate instruction executed -# endif // LL_DARWIN signal(SIGFPE, &crash_handler); // floating-point exception signal(SIGBUS, &crash_handler); // bus error signal(SIGSEGV, &crash_handler); // segmentation violation signal(SIGSYS, &crash_handler); // non-existent system call invoked #endif +# if LL_DARWIN + signal(SIGEMT, &crash_handler); // emulate instruction executed -#if LL_DARWIN - setupCocoa(); - createAutoReleasePool(); -#endif + LLCocoaPlugin cocoa_interface; + cocoa_interface.setupCocoa(); + cocoa_interface.createAutoReleasePool(); +#endif //LL_DARWIN LLPluginProcessChild *plugin = new LLPluginProcessChild(); plugin->init(port); #if LL_DARWIN - deleteAutoReleasePool(); + cocoa_interface.deleteAutoReleasePool(); #endif LLTimer timer; @@ -246,114 +250,22 @@ int main(int argc, char **argv) #endif #if LL_DARWIN + // If the plugin opens a new window (such as the Flash plugin's fullscreen player), we may need to bring this plugin process to the foreground. // Use this to track the current frontmost window and bring this process to the front if it changes. - WindowRef front_window = NULL; - WindowGroupRef layer_group = NULL; - int window_hack_state = 0; - CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group); - if(layer_group) - { - // Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube) - SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer")); - SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel); - } -#endif - -#if LL_DARWIN - EventTargetRef event_target = GetEventDispatcherTarget(); + // cocoa_interface.mEventTarget = GetEventDispatcherTarget(); #endif while(!plugin->isDone()) { #if LL_DARWIN - createAutoReleasePool(); + cocoa_interface.createAutoReleasePool(); #endif timer.reset(); plugin->idle(); #if LL_DARWIN { - // Some plugins (webkit at least) will want an event loop. This qualifies. - EventRef event; - if(ReceiveNextEvent(0, 0, kEventDurationNoWait, true, &event) == noErr) - { - SendEventToEventTarget (event, event_target); - ReleaseEvent(event); - } - - // Check for a change in this process's frontmost window. - if(GetFrontWindowOfClass(kAllWindowClasses, true) != front_window) - { - ProcessSerialNumber self = { 0, kCurrentProcess }; - ProcessSerialNumber parent = { 0, kNoProcess }; - ProcessSerialNumber front = { 0, kNoProcess }; - Boolean this_is_front_process = false; - Boolean parent_is_front_process = false; - { - // Get this process's parent - ProcessInfoRec info; - info.processInfoLength = sizeof(ProcessInfoRec); - info.processName = NULL; - info.processAppSpec = NULL; - if(GetProcessInformation( &self, &info ) == noErr) - { - parent = info.processLauncher; - } - - // and figure out whether this process or its parent are currently frontmost - if(GetFrontProcess(&front) == noErr) - { - (void) SameProcess(&self, &front, &this_is_front_process); - (void) SameProcess(&parent, &front, &parent_is_front_process); - } - } - - if((GetFrontWindowOfClass(kAllWindowClasses, true) != NULL) && (front_window == NULL)) - { - // Opening the first window - - if(window_hack_state == 0) - { - // Next time through the event loop, lower the window group layer - window_hack_state = 1; - } - - if(layer_group) - { - SetWindowGroup(GetFrontWindowOfClass(kAllWindowClasses, true), layer_group); - } - - if(parent_is_front_process) - { - // Bring this process's windows to the front. - (void) SetFrontProcess( &self ); - } - - ActivateWindow(GetFrontWindowOfClass(kAllWindowClasses, true), true); - } - else if((GetFrontWindowOfClass(kAllWindowClasses, true) == NULL) && (front_window != NULL)) - { - // Closing the last window - - if(this_is_front_process) - { - // Try to bring this process's parent to the front - (void) SetFrontProcess(&parent); - } - } - else if(window_hack_state == 1) - { - if(layer_group) - { - // Set the window group level back to something less extreme - SetWindowGroupLevel(layer_group, kCGNormalWindowLevel); - } - window_hack_state = 2; - } - - front_window = GetFrontWindowOfClass(kAllWindowClasses, true); - - } - } + cocoa_interface.processEvents(); + } #endif F64 elapsed = timer.getElapsedTimeF64(); F64 remaining = plugin->getSleepTime() - elapsed; @@ -377,7 +289,8 @@ int main(int argc, char **argv) // LL_INFOS("slplugin") << "slept for "<< timer.getElapsedTimeF64() * 1000.0f << " ms" << LL_ENDL; } - + + #if LL_WINDOWS // More agressive checking of interfering exception handlers. // Doesn't appear to be required so far - even for plugins @@ -387,14 +300,14 @@ int main(int argc, char **argv) #endif #if LL_DARWIN - deleteAutoReleasePool(); + cocoa_interface.deleteAutoReleasePool(); #endif } - delete plugin; ll_cleanup_apr(); + return 0; } diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 28ed051c55..5ed05e2201 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -628,25 +628,41 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac if (v) { U32 v_idx = idx[j*stride+v_offset]*3; + v_idx = llclamp(v_idx, (U32) 0, (U32) v->getCount()); vert.getPosition().set(v->get(v_idx), v->get(v_idx+1), v->get(v_idx+2)); } - if (n) + //bounds check n and t lookups because some FBX to DAE converters + //use negative indices and empty arrays to indicate data does not exist + //for a particular channel + if (n && n->getCount() > 0) { U32 n_idx = idx[j*stride+n_offset]*3; + n_idx = llclamp(n_idx, (U32) 0, (U32) n->getCount()); vert.getNormal().set(n->get(n_idx), n->get(n_idx+1), n->get(n_idx+2)); } + else + { + vert.getNormal().clear(); + } + - if (t) + if (t && t->getCount() > 0) { U32 t_idx = idx[j*stride+t_offset]*2; + t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount()); vert.mTexCoord.setVec(t->get(t_idx), t->get(t_idx+1)); } + else + { + vert.mTexCoord.clear(); + } + verts.push_back(vert); } diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 6dee192783..946251f383 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -27,7 +27,6 @@ #include "linden_common.h" #include "material_codes.h" -#include "llmemtype.h" #include "llerror.h" #include "message.h" #include "llprimitive.h" @@ -189,7 +188,6 @@ void LLPrimitive::clearTextureList() // static LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); LLPrimitive *retval = new LLPrimitive(); if (retval) @@ -207,7 +205,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) //=============================================================== void LLPrimitive::init_primitive(LLPCode p_code) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); clearTextureList(); mPrimitiveCode = p_code; } @@ -705,7 +702,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume) { - LLMemType m1(LLMemType::MTYPE_VOLUME); LLVolume *volumep; if (unique_volume) { diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp index 36e04df7b7..7ef87ed382 100644 --- a/indra/llprimitive/llprimtexturelist.cpp +++ b/indra/llprimitive/llprimtexturelist.cpp @@ -28,7 +28,6 @@ #include "llprimtexturelist.h" #include "lltextureentry.h" -#include "llmemtype.h" // static //int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++ @@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const // sets the size of the mEntryList container void LLPrimTextureList::setSize(S32 new_size) { - LLMemType m1(LLMemType::MTYPE_PRIMITIVE); if (new_size < 0) { new_size = 0; diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 0b56b3889c..9d06dd6904 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -44,7 +44,6 @@ #include "llmath.h" #include "m4math.h" #include "llstring.h" -#include "llmemtype.h" #include "llstacktrace.h" #include "llglheaders.h" @@ -1133,7 +1132,8 @@ void LLGLManager::initExtensions() // Misc glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange); glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange); - + glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*) &mGLMaxTextureSize); + #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL; if (mHasVertexBufferObject) @@ -2323,7 +2323,6 @@ void LLGLNamePool::release(GLuint name) //static void LLGLNamePool::upkeepPools() { - LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS); for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter) { LLGLNamePool & pool = *iter; diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index d70e764769..823de9d361 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -147,6 +147,7 @@ public: S32 mVRAM; // VRAM in MB S32 mGLMaxVertexRange; S32 mGLMaxIndexRange; + S32 mGLMaxTextureSize; void getPixelFormat(); // Get the best pixel format diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index c1b96a43da..e35feda2d5 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -109,8 +109,8 @@ void LLRenderTarget::resize(U32 resx, U32 resy, U32 color_fmt) bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples) { - resx = llmin(resx, (U32) 4096); - resy = llmin(resy, (U32) 4096); + resx = llmin(resx, (U32) gGLManager.mGLMaxTextureSize); + resy = llmin(resy, (U32) gGLManager.mGLMaxTextureSize); stop_glerror(); release(); diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 2fe0aa0b72..dfbd8cd4ee 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -31,7 +31,6 @@ #include "llvertexbuffer.h" // #include "llrender.h" #include "llglheaders.h" -#include "llmemtype.h" #include "llrender.h" #include "llvector4a.h" #include "llshadermgr.h" @@ -870,7 +869,6 @@ void LLVertexBuffer::unbind() //static void LLVertexBuffer::cleanupClass() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS); unbind(); sStreamIBOPool.cleanup(); @@ -951,8 +949,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) : mMappable(false), mFence(NULL) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR); - mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping); //zero out offsets @@ -1012,7 +1008,6 @@ S32 LLVertexBuffer::getSize() const //virtual LLVertexBuffer::~LLVertexBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR); destroyGLBuffer(); destroyGLIndices(); @@ -1132,8 +1127,6 @@ void LLVertexBuffer::releaseIndices() void LLVertexBuffer::createGLBuffer(U32 size) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES); - if (mGLBuffer) { destroyGLBuffer(); @@ -1163,8 +1156,6 @@ void LLVertexBuffer::createGLBuffer(U32 size) void LLVertexBuffer::createGLIndices(U32 size) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES); - if (mGLIndices) { destroyGLIndices(); @@ -1199,7 +1190,6 @@ void LLVertexBuffer::createGLIndices(U32 size) void LLVertexBuffer::destroyGLBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER); if (mGLBuffer) { if (mMappedDataUsingVBOs) @@ -1220,7 +1210,6 @@ void LLVertexBuffer::destroyGLBuffer() void LLVertexBuffer::destroyGLIndices() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES); if (mGLIndices) { if (mMappedIndexDataUsingVBOs) @@ -1241,8 +1230,6 @@ void LLVertexBuffer::destroyGLIndices() void LLVertexBuffer::updateNumVerts(S32 nverts) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS); - llassert(nverts >= 0); if (nverts > 65536) @@ -1265,8 +1252,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts) void LLVertexBuffer::updateNumIndices(S32 nindices) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES); - llassert(nindices >= 0); U32 needed_size = sizeof(U16) * nindices; @@ -1283,8 +1268,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices) void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER); - stop_glerror(); if (nverts < 0 || nindices < 0 || @@ -1435,8 +1418,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) llassert(newnverts >= 0); llassert(newnindices >= 0); - LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER); - updateNumVerts(newnverts); updateNumIndices(newnindices); @@ -1484,7 +1465,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map"); volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range) { bindGLBuffer(true); - LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); if (mFinal) { llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl; @@ -1533,7 +1513,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo if (!mVertexLocked) { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES); mVertexLocked = true; sMappedCount++; stop_glerror(); @@ -1664,7 +1643,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map"); volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER); bindGLIndices(true); if (mFinal) { @@ -1711,8 +1689,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range if (!mIndexLocked) { - LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES); - mIndexLocked = true; sMappedCount++; stop_glerror(); @@ -1835,7 +1811,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range"); void LLVertexBuffer::unmapBuffer() { - LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER); if (!useVBOs()) { return; //nothing to unmap @@ -2189,7 +2164,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) { flush(); - LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER); //set up pointers if the data mask is different ... bool setup = (sLastMask != data_mask); @@ -2331,7 +2305,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask) // virtual (default) void LLVertexBuffer::setupVertexBuffer(U32 data_mask) { - LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER); stop_glerror(); volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 054b9173d3..1594be2512 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1105,17 +1105,26 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user) const LLRect old_rect = getRect(); LLView::handleReshape(new_rect, by_user); - if (by_user && !isMinimized()) + if (by_user && !getHost()) { - storeRectControl(); - mPositioning = LLFloaterEnums::POSITIONING_RELATIVE; - LLRect screen_rect = calcScreenRect(); - mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert(); + static_cast<LLFloaterView*>(getParent())->adjustToFitScreen(this, !isMinimized()); } // if not minimized, adjust all snapped dependents to new shape if (!isMinimized()) { + if (by_user) + { + if (isDocked()) + { + setDocked( false, false); + } + storeRectControl(); + mPositioning = LLFloaterEnums::POSITIONING_RELATIVE; + LLRect screen_rect = calcScreenRect(); + mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert(); + } + // gather all snapped dependents for(handle_set_iter_t dependent_it = mDependents.begin(); dependent_it != mDependents.end(); ++dependent_it) @@ -1711,56 +1720,10 @@ void LLFloater::onClickHelp( LLFloater* self ) } } -// static -LLFloater* LLFloater::getClosableFloaterFromFocus() -{ - LLFloater* focused_floater = NULL; - LLInstanceTracker<LLFloater>::instance_iter it = beginInstances(); - LLInstanceTracker<LLFloater>::instance_iter end_it = endInstances(); - for (; it != end_it; ++it) - { - if (it->hasFocus()) - { - LLFloater& floater = *it; - focused_floater = &floater; - break; - } - } - - if (it == endInstances()) - { - // nothing found, return - return NULL; - } - - // The focused floater may not be closable, - // Find and close a parental floater that is closeable, if any. - LLFloater* prev_floater = NULL; - for(LLFloater* floater_to_close = focused_floater; - NULL != floater_to_close; - floater_to_close = gFloaterView->getParentFloater(floater_to_close)) - { - if(floater_to_close->isCloseable()) - { - return floater_to_close; - } - - // If floater has as parent root view - // gFloaterView->getParentFloater(floater_to_close) returns - // the same floater_to_close, so we need to check this. - if (prev_floater == floater_to_close) { - break; - } - prev_floater = floater_to_close; - } - - return NULL; -} - // static -void LLFloater::closeFocusedFloater() +void LLFloater::closeFrontmostFloater() { - LLFloater* floater_to_close = LLFloater::getClosableFloaterFromFocus(); + LLFloater* floater_to_close = gFloaterView->getFrontmostClosableFloater(); if(floater_to_close) { floater_to_close->closeFloater(); @@ -2478,6 +2441,24 @@ void LLFloaterView::highlightFocusedFloater() } } +LLFloater* LLFloaterView::getFrontmostClosableFloater() +{ + child_list_const_iter_t child_it; + LLFloater* frontmost_floater = NULL; + + for ( child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) + { + frontmost_floater = (LLFloater *)(*child_it); + + if (frontmost_floater->isInVisibleChain() && frontmost_floater->isCloseable()) + { + return frontmost_floater; + } + } + + return NULL; +} + void LLFloaterView::unhighlightFocusedFloater() { for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index e64b6d04d3..aef63bcf93 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -325,12 +325,10 @@ public: virtual void setTornOff(bool torn_off) { mTornOff = torn_off; } - // Return a closeable floater, if any, given the current focus. - static LLFloater* getClosableFloaterFromFocus(); - // Close the floater returned by getClosableFloaterFromFocus() and + // Close the floater returned by getFrontmostClosableFloater() and // handle refocusing. - static void closeFocusedFloater(); + static void closeFrontmostFloater(); // LLNotification::Params contextualNotification(const std::string& name) // { @@ -559,6 +557,7 @@ public: S32 getZOrder(LLFloater* child); void setFloaterSnapView(LLHandle<LLView> snap_view) {mSnapView = snap_view; } + LLFloater* getFrontmostClosableFloater(); private: void hiddenFloaterClosed(LLFloater* floater); diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index efb9848a90..cd6cc6a75e 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1764,6 +1764,25 @@ bool LLMenuGL::addChild(LLView* view, S32 tab_group) return false; } +// Used in LLContextMenu and in LLTogleableMenu +// to add an item of context menu branch +bool LLMenuGL::addContextChild(LLView* view, S32 tab_group) +{ + LLContextMenu* context = dynamic_cast<LLContextMenu*>(view); + if (context) + return appendContextSubMenu(context); + + LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view); + if (separator) + return append(separator); + + LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view); + if (item) + return append(item); + + return false; +} + void LLMenuGL::removeChild( LLView* ctrl) { // previously a dynamic_cast with if statement to check validity @@ -2501,6 +2520,30 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) return success; } +// add a context menu branch +BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu) +{ + if (menu == this) + { + llerrs << "Can't attach a context menu to itself" << llendl; + } + + LLContextMenuBranch *item; + LLContextMenuBranch::Params p; + p.name = menu->getName(); + p.label = menu->getLabel(); + p.branch = (LLContextMenu *)menu; + p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); + p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); + p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); + p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); + + item = LLUICtrlFactory::create<LLContextMenuBranch>(p); + LLMenuGL::sMenuContainer->addChild(item->getBranch()); + + return append( item ); +} + void LLMenuGL::setEnabledSubMenus(BOOL enable) { setEnabled(enable); @@ -3725,39 +3768,6 @@ void LLTearOffMenu::closeTearOff() mMenu->setDropShadowed(TRUE); } - -//----------------------------------------------------------------------------- -// class LLContextMenuBranch -// A branch to another context menu -//----------------------------------------------------------------------------- -class LLContextMenuBranch : public LLMenuItemGL -{ -public: - struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params> - { - Mandatory<LLContextMenu*> branch; - }; - - LLContextMenuBranch(const Params&); - - virtual ~LLContextMenuBranch() - {} - - // called to rebuild the draw label - virtual void buildDrawLabel( void ); - - // onCommit() - do the primary funcationality of the menu item. - virtual void onCommit( void ); - - LLContextMenu* getBranch() { return mBranch.get(); } - void setHighlight( BOOL highlight ); - -protected: - void showSubMenu(); - - LLHandle<LLContextMenu> mBranch; -}; - LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p) : LLMenuItemGL(p), mBranch( p.branch()->getHandle() ) @@ -4034,44 +4044,8 @@ void LLContextMenu::draw() LLMenuGL::draw(); } -BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu) -{ - - if (menu == this) - { - llerrs << "Can't attach a context menu to itself" << llendl; - } - - LLContextMenuBranch *item; - LLContextMenuBranch::Params p; - p.name = menu->getName(); - p.label = menu->getLabel(); - p.branch = menu; - p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor"); - p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor"); - p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor"); - p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor"); - - item = LLUICtrlFactory::create<LLContextMenuBranch>(p); - LLMenuGL::sMenuContainer->addChild(item->getBranch()); - - return append( item ); -} - bool LLContextMenu::addChild(LLView* view, S32 tab_group) { - LLContextMenu* context = dynamic_cast<LLContextMenu*>(view); - if (context) - return appendContextSubMenu(context); - - LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view); - if (separator) - return append(separator); - - LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view); - if (item) - return append(item); - - return false; + return addContextChild(view, tab_group); } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 67b3e1fbe6..00899020bc 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -519,6 +519,9 @@ public: void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; } bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; } + // add a context menu branch + BOOL appendContextSubMenu(LLMenuGL *menu); + protected: void createSpilloverBranch(); void cleanupSpilloverBranch(); @@ -528,6 +531,10 @@ protected: // add a menu - this will create a cascading menu virtual BOOL appendMenu( LLMenuGL* menu ); + // Used in LLContextMenu and in LLTogleableMenu + // to add an item of context menu branch + bool addContextChild(LLView* view, S32 tab_group); + // TODO: create accessor methods for these? typedef std::list< LLMenuItemGL* > item_list_t; item_list_t mItems; @@ -679,8 +686,6 @@ public: virtual bool addChild (LLView* view, S32 tab_group = 0); - BOOL appendContextSubMenu(LLContextMenu *menu); - LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); } LLView* getSpawningView() const { return mSpawningViewHandle.get(); } @@ -694,6 +699,38 @@ protected: }; +//----------------------------------------------------------------------------- +// class LLContextMenuBranch +// A branch to another context menu +//----------------------------------------------------------------------------- +class LLContextMenuBranch : public LLMenuItemGL +{ +public: + struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params> + { + Mandatory<LLContextMenu*> branch; + }; + + LLContextMenuBranch(const Params&); + + virtual ~LLContextMenuBranch() + {} + + // called to rebuild the draw label + virtual void buildDrawLabel( void ); + + // onCommit() - do the primary funcationality of the menu item. + virtual void onCommit( void ); + + LLContextMenu* getBranch() { return mBranch.get(); } + void setHighlight( BOOL highlight ); + +protected: + void showSubMenu(); + + LLHandle<LLContextMenu> mBranch; +}; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLMenuBarGL diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 210a320f41..2bf88532c6 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1116,6 +1116,11 @@ bool LLNotificationChannel::isEmpty() const return mItems.empty(); } +S32 LLNotificationChannel::size() const +{ + return mItems.size(); +} + LLNotificationChannel::Iterator LLNotificationChannel::begin() { return mItems.begin(); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 4ae02b943f..d7534c416d 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -813,6 +813,7 @@ public: std::string getParentChannelName() { return mParent; } bool isEmpty() const; + S32 size() const; Iterator begin(); Iterator end(); diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp index 87aeb4d7a7..ba90fa5e0c 100644 --- a/indra/llui/llresizebar.cpp +++ b/indra/llui/llresizebar.cpp @@ -139,13 +139,6 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) if( valid_rect.localPointInRect( screen_x, screen_y ) && mResizingView ) { - // undock floater when user resize it - LLFloater* parent = dynamic_cast<LLFloater*>( getParent()); - if (parent && parent->isDocked()) - { - parent->setDocked( false, false); - } - // Resize the parent LLRect orig_rect = mResizingView->getRect(); LLRect scaled_rect = orig_rect; @@ -219,20 +212,66 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) // update last valid mouse cursor position based on resized view's actual size LLRect new_rect = mResizingView->getRect(); + switch(mSide) { case LEFT: - mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft; + { + S32 actual_delta_x = new_rect.mLeft - orig_rect.mLeft; + if (actual_delta_x != delta_x) + { + // restore everything by left + new_rect.mBottom = orig_rect.mBottom; + new_rect.mTop = orig_rect.mTop; + new_rect.mRight = orig_rect.mRight; + mResizingView->setShape(new_rect, true); + } + mDragLastScreenX += actual_delta_x; + break; + } case RIGHT: + { + S32 actual_delta_x = new_rect.mRight - orig_rect.mRight; + if (actual_delta_x != delta_x) + { + // restore everything by left + new_rect.mBottom = orig_rect.mBottom; + new_rect.mTop = orig_rect.mTop; + new_rect.mLeft = orig_rect.mLeft; + mResizingView->setShape(new_rect, true); + } mDragLastScreenX += new_rect.mRight - orig_rect.mRight; break; + } case TOP: + { + S32 actual_delta_y = new_rect.mTop - orig_rect.mTop; + if (actual_delta_y != delta_y) + { + // restore everything by left + new_rect.mBottom = orig_rect.mBottom; + new_rect.mLeft = orig_rect.mLeft; + new_rect.mRight = orig_rect.mRight; + mResizingView->setShape(new_rect, true); + } mDragLastScreenY += new_rect.mTop - orig_rect.mTop; break; + } case BOTTOM: + { + S32 actual_delta_y = new_rect.mBottom - orig_rect.mBottom; + if (actual_delta_y != delta_y) + { + // restore everything by left + new_rect.mTop = orig_rect.mTop; + new_rect.mLeft = orig_rect.mLeft; + new_rect.mRight = orig_rect.mRight; + mResizingView->setShape(new_rect, true); + } mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom; break; + } default: break; } diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index c3a51c36c9..24794305ac 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -257,23 +257,65 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) // update last valid mouse cursor position based on resized view's actual size LLRect new_rect = resizing_view->getRect(); + S32 actual_delta_x = 0; + S32 actual_delta_y = 0; switch(mCorner) { case LEFT_TOP: - mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft; - mDragLastScreenY += new_rect.mTop - orig_rect.mTop; + actual_delta_x = new_rect.mLeft - orig_rect.mLeft; + actual_delta_y = new_rect.mTop - orig_rect.mTop; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mRight = orig_rect.mRight; + new_rect.mBottom = orig_rect.mBottom; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; case LEFT_BOTTOM: - mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft; - mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom; + actual_delta_x = new_rect.mLeft - orig_rect.mLeft; + actual_delta_y = new_rect.mBottom - orig_rect.mBottom; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mRight = orig_rect.mRight; + new_rect.mTop = orig_rect.mTop; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; case RIGHT_TOP: - mDragLastScreenX += new_rect.mRight - orig_rect.mRight; - mDragLastScreenY += new_rect.mTop - orig_rect.mTop; + actual_delta_x = new_rect.mRight - orig_rect.mRight; + actual_delta_y = new_rect.mTop - orig_rect.mTop; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mLeft = orig_rect.mLeft; + new_rect.mBottom = orig_rect.mBottom; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; case RIGHT_BOTTOM: - mDragLastScreenX += new_rect.mRight - orig_rect.mRight; - mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom; + actual_delta_x = new_rect.mRight - orig_rect.mRight; + actual_delta_y = new_rect.mBottom - orig_rect.mBottom; + if (actual_delta_x != delta_x + || actual_delta_y != delta_y) + { + new_rect.mLeft = orig_rect.mLeft; + new_rect.mTop = orig_rect.mTop; + resizing_view->setShape(new_rect, true); + } + + mDragLastScreenX += actual_delta_x; + mDragLastScreenY += actual_delta_y; break; default: break; diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp index af124d9826..cc9ff7a487 100644 --- a/indra/llui/llscrolllistcolumn.cpp +++ b/indra/llui/llscrolllistcolumn.cpp @@ -236,7 +236,8 @@ void LLScrollColumnHeader::handleReshape(const LLRect& new_rect, bool by_user) // tell scroll list to layout columns again // do immediate update to get proper feedback to resize handle // which needs to know how far the resize actually went - mColumn->mParentCtrl->updateColumns(); + const bool force_update = true; + mColumn->mParentCtrl->updateColumns(force_update); } } diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 3e0653e9a4..e6a9049fa6 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -580,6 +580,15 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r addColumn(col_params); } + S32 num_cols = item->getNumColumns(); + S32 i = 0; + for (LLScrollListCell* cell = item->getColumn(i); i < num_cols; cell = item->getColumn(++i)) + { + if (i >= (S32)mColumnsIndexed.size()) break; + + cell->setWidth(mColumnsIndexed[i]->getWidth()); + } + updateLineHeightInsert(item); updateLayout(); @@ -606,7 +615,6 @@ S32 LLScrollListCtrl::calcMaxContentWidth() if (mColumnWidthsDirty) { - mColumnWidthsDirty = false; // update max content width for this column, by looking at all items column->mMaxContentWidth = column->mHeader ? LLFontGL::getFontSansSerifSmall()->getWidth(column->mLabel) + mColumnPadding + HEADING_TEXT_PADDING : 0; item_list::iterator iter; @@ -620,6 +628,7 @@ S32 LLScrollListCtrl::calcMaxContentWidth() } max_item_width += column->mMaxContentWidth; } + mColumnWidthsDirty = false; return max_item_width; } @@ -634,7 +643,7 @@ bool LLScrollListCtrl::updateColumnWidths() if (!column) continue; // update column width - S32 new_width = column->getWidth(); + S32 new_width = 0; if (column->mRelWidth >= 0) { new_width = (S32)llround(column->mRelWidth*mItemListRect.getWidth()); @@ -643,6 +652,10 @@ bool LLScrollListCtrl::updateColumnWidths() { new_width = (mItemListRect.getWidth() - mTotalStaticColumnWidth - mTotalColumnPadding) / mNumDynamicWidthColumns; } + else + { + new_width = column->getWidth(); + } if (column->getWidth() != new_width) { @@ -684,9 +697,9 @@ void LLScrollListCtrl::updateLineHeightInsert(LLScrollListItem* itemp) } -void LLScrollListCtrl::updateColumns() +void LLScrollListCtrl::updateColumns(bool force_update) { - if (!mColumnsDirty) + if (!mColumnsDirty && !force_update) return; mColumnsDirty = false; @@ -740,7 +753,7 @@ void LLScrollListCtrl::updateColumns() } // propagate column widths to individual cells - if (columns_changed_width) + if (columns_changed_width || force_update) { item_list::iterator iter; for (iter = mItemList.begin(); iter != mItemList.end(); iter++) diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 38450b6313..0b629a76f7 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -342,7 +342,7 @@ public: static void onClickColumn(void *userdata); - virtual void updateColumns(); + virtual void updateColumns(bool force_update = false); S32 calcMaxContentWidth(); bool updateColumnWidths(); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 144b6960a1..46fbd1e6a0 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -239,7 +239,8 @@ LLTextEditor::Params::Params() show_line_numbers("show_line_numbers", false), default_color("default_color"), commit_on_focus_lost("commit_on_focus_lost", false), - show_context_menu("show_context_menu") + show_context_menu("show_context_menu"), + enable_tooltip_paste("enable_tooltip_paste") { addSynonym(prevalidate_callback, "text_type"); } @@ -258,7 +259,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mTabsToNextField(p.ignore_tab), mPrevalidateFunc(p.prevalidate_callback()), mContextMenu(NULL), - mShowContextMenu(p.show_context_menu) + mShowContextMenu(p.show_context_menu), + mEnableTooltipPaste(p.enable_tooltip_paste) { mSourceID.generate(); @@ -1411,6 +1413,23 @@ void LLTextEditor::pasteHelper(bool is_primary) // Clean up string (replace tabs and remove characters that our fonts don't support). LLWString clean_string(paste); + cleanStringForPaste(clean_string); + + // Insert the new text into the existing text. + + //paste text with linebreaks. + pasteTextWithLinebreaks(clean_string); + + deselect(); + + onKeyStroke(); + mParseOnTheFly = TRUE; +} + + +// Clean up string (replace tabs and remove characters that our fonts don't support). +void LLTextEditor::cleanStringForPaste(LLWString & clean_string) +{ LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB); if( mAllowEmbeddedItems ) { @@ -1429,10 +1448,11 @@ void LLTextEditor::pasteHelper(bool is_primary) } } } +} - // Insert the new text into the existing text. - //paste text with linebreaks. +void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string) +{ std::basic_string<llwchar>::size_type start = 0; std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start); @@ -1451,15 +1471,8 @@ void LLTextEditor::pasteHelper(bool is_primary) std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start); setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr())); - - deselect(); - - onKeyStroke(); - mParseOnTheFly = TRUE; } - - // copy selection to primary void LLTextEditor::copyPrimary() { @@ -1680,19 +1693,50 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) { return FALSE; } - + if (mReadOnly && mScroller) { handled = (mScroller && mScroller->handleKeyHere( key, mask )) || handleSelectionKey(key, mask) || handleControlKey(key, mask); + } + else + { + if (mEnableTooltipPaste && + LLToolTipMgr::instance().toolTipVisible() && + KEY_TAB == key) + { // Paste the first line of a tooltip into the editor + std::string message; + LLToolTipMgr::instance().getToolTipMessage(message); + LLWString tool_tip_text(utf8str_to_wstring(message)); + + if (tool_tip_text.size() > 0) + { + // Delete any selected characters (the tooltip text replaces them) + if(hasSelection()) + { + deleteSelection(TRUE); + } + + std::basic_string<llwchar>::size_type pos = tool_tip_text.find('\n',0); + if (pos != -1) + { // Extract the first line of the tooltip + tool_tip_text = std::basic_string<llwchar>(tool_tip_text, 0, pos); + } + + // Add the text + cleanStringForPaste(tool_tip_text); + pasteTextWithLinebreaks(tool_tip_text); + handled = TRUE; + } + } + else + { // Normal key handling + handled = handleNavigationKey( key, mask ) + || handleSelectionKey(key, mask) + || handleControlKey(key, mask) + || handleSpecialKey(key, mask); } - else - { - handled = handleNavigationKey( key, mask ) - || handleSelectionKey(key, mask) - || handleControlKey(key, mask) - || handleSpecialKey(key, mask); } if( handled ) diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 40821ae9fb..e60fe03e58 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -64,7 +64,8 @@ public: ignore_tab, show_line_numbers, commit_on_focus_lost, - show_context_menu; + show_context_menu, + enable_tooltip_paste; //colors Optional<LLUIColor> default_color; @@ -288,6 +289,8 @@ private: // Methods // void pasteHelper(bool is_primary); + void cleanStringForPaste(LLWString & clean_string); + void pasteTextWithLinebreaks(LLWString & clean_string); void drawLineNumbers(); @@ -321,6 +324,7 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; bool mParseOnTheFly; + bool mEnableTooltipPaste; LLUUID mSourceID; diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp index e4d1a37569..00d52fe10d 100644 --- a/indra/llui/lltoggleablemenu.cpp +++ b/indra/llui/lltoggleablemenu.cpp @@ -101,3 +101,8 @@ bool LLToggleableMenu::toggleVisibility() return true; } + +bool LLToggleableMenu::addChild(LLView* view, S32 tab_group) +{ + return addContextChild(view, tab_group); +} diff --git a/indra/llui/lltoggleablemenu.h b/indra/llui/lltoggleablemenu.h index 2094bd776f..4717b0d0ba 100644 --- a/indra/llui/lltoggleablemenu.h +++ b/indra/llui/lltoggleablemenu.h @@ -47,6 +47,8 @@ public: virtual void handleVisibilityChange (BOOL curVisibilityIn); + virtual bool addChild (LLView* view, S32 tab_group = 0); + const LLRect& getButtonRect() const { return mButtonRect; } // Converts the given local button rect to a screen rect diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 81ea0ebf0c..63b7e452d2 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -117,7 +117,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p) mButtonEnterSignal(NULL), mButtonLeaveSignal(NULL), mButtonRemoveSignal(NULL), - mDragAndDropTarget(false) + mDragAndDropTarget(false), + mCaretIcon(NULL) { mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text; mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon; @@ -830,7 +831,12 @@ void LLToolBar::draw() LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom); // Position the caret - LLIconCtrl* caret = getChild<LLIconCtrl>("caret"); + if (!mCaretIcon) + { + mCaretIcon = getChild<LLIconCtrl>("caret"); + } + + LLIconCtrl* caret = mCaretIcon; caret->setVisible(FALSE); if (mDragAndDropTarget && !mButtonCommands.empty()) { diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h index a50c60282c..31424a36d4 100644 --- a/indra/llui/lltoolbar.h +++ b/indra/llui/lltoolbar.h @@ -37,6 +37,7 @@ class LLToolBar; class LLToolBarButton; +class LLIconCtrl; typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t; typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t; @@ -284,6 +285,8 @@ private: button_signal_t* mButtonRemoveSignal; std::string mButtonTooltipSuffix; + + LLIconCtrl* mCaretIcon; }; diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index f737d48abf..7f1566d64a 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -390,6 +390,15 @@ bool LLToolTip::hasClickCallback() return mHasClickCallback; } +void LLToolTip::getToolTipMessage(std::string & message) +{ + if (mTextBox) + { + message = mTextBox->getText(); + } +} + + // // LLToolTipMgr @@ -594,5 +603,14 @@ void LLToolTipMgr::updateToolTipVisibility() } +// Return the current tooltip text +void LLToolTipMgr::getToolTipMessage(std::string & message) +{ + if (toolTipVisible()) + { + mToolTip->getToolTipMessage(message); + } +} + // EOF diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h index d71a944c3d..fad127fc4c 100644 --- a/indra/llui/lltooltip.h +++ b/indra/llui/lltooltip.h @@ -105,6 +105,8 @@ public: LLToolTip(const Params& p); void initFromParams(const LLToolTip::Params& params); + void getToolTipMessage(std::string & message); + private: class LLTextBox* mTextBox; class LLButton* mInfoButton; @@ -142,6 +144,8 @@ public: LLRect getMouseNearRect(); void updateToolTipVisibility(); + void getToolTipMessage(std::string & message); + private: void createToolTip(const LLToolTip::Params& params); diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index a819d12861..3c68b279f7 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -36,6 +36,8 @@ set(llvfs_HEADER_FILES if (DARWIN) LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp) LIST(APPEND llvfs_HEADER_FILES lldir_mac.h) + LIST(APPEND llvfs_SOURCE_FILES llvfs_objc.mm) + LIST(APPEND llvfs_HEADER_FILES llvfs_objc.h) endif (DARWIN) if (LINUX) @@ -73,8 +75,8 @@ target_link_libraries(llvfs if (DARWIN) include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) - target_link_libraries(llvfs ${CARBON_LIBRARY}) + find_library(COCOA_LIBRARY Cocoa) + target_link_libraries(llvfs ${COCOA_LIBRARY}) endif (DARWIN) diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index c60d3ef3a2..300ff1eef6 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -73,10 +73,8 @@ class LLDir virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask); // pure virtual functions - virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0; - virtual std::string getCurPath() = 0; - virtual BOOL fileExists(const std::string &filename) const = 0; + virtual bool fileExists(const std::string &filename) const = 0; const std::string findFile(const std::string& filename, const std::vector<std::string> filenames) const; const std::string findFile(const std::string& filename, const std::string& searchPath1 = "", const std::string& searchPath2 = "", const std::string& searchPath3 = "") const; diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 407f3b93fb..4edd078640 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -254,7 +254,7 @@ std::string LLDir_Linux::getCurPath() } -BOOL LLDir_Linux::fileExists(const std::string &filename) const +bool LLDir_Linux::fileExists(const std::string &filename) const { struct stat stat_data; // Check the age of the file diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index 7603239867..e83a020ba4 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -47,7 +47,7 @@ public: virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL fileExists(const std::string &filename) const; + /*virtual*/ bool fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index 9f60111275..c5041d434c 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -35,73 +35,27 @@ #include <sys/stat.h> #include <unistd.h> #include <glob.h> - -#include <Carbon/Carbon.h> - -// -------------------------------------------------------------------------------- - -static OSStatus CFCreateDirectory(FSRef *parentRef, CFStringRef name, FSRef *newRef) -{ - OSStatus result = noErr; - HFSUniStr255 uniStr; - - uniStr.length = CFStringGetLength(name); - CFStringGetCharacters(name, CFRangeMake(0, uniStr.length), uniStr.unicode); - result = FSMakeFSRefUnicode(parentRef, uniStr.length, uniStr.unicode, kTextEncodingMacRoman, newRef); - if (result != noErr) - { - result = FSCreateDirectoryUnicode(parentRef, uniStr.length, uniStr.unicode, 0, NULL, newRef, NULL, NULL); - } - - return result; -} +#include <boost/filesystem.hpp> +#include "llvfs_objc.h" // -------------------------------------------------------------------------------- -static void CFStringRefToLLString(CFStringRef stringRef, std::string &llString, bool releaseWhenDone) +static bool CreateDirectory(const std::string &parent, + const std::string &child, + std::string *fullname) { - if (stringRef) - { - long stringSize = CFStringGetLength(stringRef) + 1; - long bufferSize = CFStringGetMaximumSizeForEncoding(stringSize,kCFStringEncodingUTF8); - char* buffer = new char[bufferSize]; - memset(buffer, 0, bufferSize); - if (CFStringGetCString(stringRef, buffer, bufferSize, kCFStringEncodingUTF8)) - llString = buffer; - delete[] buffer; - if (releaseWhenDone) - CFRelease(stringRef); - } -} - -// -------------------------------------------------------------------------------- - -static void CFURLRefToLLString(CFURLRef urlRef, std::string &llString, bool releaseWhenDone) -{ - if (urlRef) - { - CFURLRef absoluteURLRef = CFURLCopyAbsoluteURL(urlRef); - if (absoluteURLRef) - { - CFStringRef stringRef = CFURLCopyFileSystemPath(absoluteURLRef, kCFURLPOSIXPathStyle); - CFStringRefToLLString(stringRef, llString, true); - CFRelease(absoluteURLRef); - } - if (releaseWhenDone) - CFRelease(urlRef); - } -} - -// -------------------------------------------------------------------------------- - -static void FSRefToLLString(FSRef *fsRef, std::string &llString) -{ - OSStatus error = noErr; - char path[MAX_PATH]; - - error = FSRefMakePath(fsRef, (UInt8*) path, sizeof(path)); - if (error == noErr) - llString = path; + + boost::filesystem::path p(parent); + p /= child; + + if (fullname) + *fullname = std::string(p.string()); + + if (! boost::filesystem::create_directory(p)) + { + return (boost::filesystem::is_directory(p)); + } + return true; } // -------------------------------------------------------------------------------- @@ -109,35 +63,28 @@ static void FSRefToLLString(FSRef *fsRef, std::string &llString) LLDir_Mac::LLDir_Mac() { mDirDelimiter = "/"; - mCurrentDirIndex = -1; - mCurrentDirCount = -1; - - CFBundleRef mainBundleRef = NULL; - CFURLRef executableURLRef = NULL; - CFStringRef stringRef = NULL; - OSStatus error = noErr; - FSRef fileRef; - CFStringRef secondLifeString = CFSTR("SecondLife"); - - mainBundleRef = CFBundleGetMainBundle(); - - executableURLRef = CFBundleCopyExecutableURL(mainBundleRef); - - if (executableURLRef != NULL) + + const std::string secondLifeString = "SecondLife"; + + std::string *executablepathstr = getSystemExecutableFolder(); + + //NOTE: LLINFOS/LLERRS will not output to log here. The streams are not initialized. + + if (executablepathstr) { // mExecutablePathAndName - CFURLRefToLLString(executableURLRef, mExecutablePathAndName, false); - - // mExecutableFilename - stringRef = CFURLCopyLastPathComponent(executableURLRef); - CFStringRefToLLString(stringRef, mExecutableFilename, true); - - // mExecutableDir - CFURLRef executableParentURLRef = CFURLCreateCopyDeletingLastPathComponent(NULL, executableURLRef); - CFURLRefToLLString(executableParentURLRef, mExecutableDir, true); + mExecutablePathAndName = *executablepathstr; + + boost::filesystem::path executablepath(*executablepathstr); + +# ifndef BOOST_SYSTEM_NO_DEPRECATED +#endif + mExecutableFilename = executablepath.filename().string(); + mExecutableDir = executablepath.parent_path().string(); // mAppRODataDir - + std::string *resourcepath = getSystemResourceFolder(); + mAppRODataDir = *resourcepath; // *NOTE: When running in a dev tree, use the copy of // skins in indra/newview/ rather than in the application bundle. This @@ -146,10 +93,7 @@ LLDir_Mac::LLDir_Mac() // MBW -- This keeps the mac application from finding other things. // If this is really for skins, it should JUST apply to skins. - - CFURLRef resourcesURLRef = CFBundleCopyResourcesDirectoryURL(mainBundleRef); - CFURLRefToLLString(resourcesURLRef, mAppRODataDir, true); - + U32 build_dir_pos = mExecutableDir.rfind("/build-darwin-"); if (build_dir_pos != std::string::npos) { @@ -166,55 +110,50 @@ LLDir_Mac::LLDir_Mac() } // mOSUserDir - error = FSFindFolder(kUserDomain, kApplicationSupportFolderType, true, &fileRef); - if (error == noErr) - { - FSRef newFileRef; - - // Create the directory - error = CFCreateDirectory(&fileRef, secondLifeString, &newFileRef); - if (error == noErr) - { - // Save the full path to the folder - FSRefToLLString(&newFileRef, mOSUserDir); - - // Create our sub-dirs - (void) CFCreateDirectory(&newFileRef, CFSTR("data"), NULL); - //(void) CFCreateDirectory(&newFileRef, CFSTR("cache"), NULL); - (void) CFCreateDirectory(&newFileRef, CFSTR("logs"), NULL); - (void) CFCreateDirectory(&newFileRef, CFSTR("user_settings"), NULL); - (void) CFCreateDirectory(&newFileRef, CFSTR("browser_profile"), NULL); - } - } - + std::string *appdir = getSystemApplicationSupportFolder(); + std::string rootdir; + + //Create root directory + if (CreateDirectory(*appdir, secondLifeString, &rootdir)) + { + + // Save the full path to the folder + mOSUserDir = rootdir; + + // Create our sub-dirs + CreateDirectory(rootdir, std::string("data"), NULL); + CreateDirectory(rootdir, std::string("logs"), NULL); + CreateDirectory(rootdir, std::string("user_settings"), NULL); + CreateDirectory(rootdir, std::string("browser_profile"), NULL); + } + //mOSCacheDir - FSRef cacheDirRef; - error = FSFindFolder(kUserDomain, kCachedDataFolderType, true, &cacheDirRef); - if (error == noErr) + std::string *cachedir = getSystemCacheFolder(); + + if (cachedir) + { - FSRefToLLString(&cacheDirRef, mOSCacheDir); - (void)CFCreateDirectory(&cacheDirRef, CFSTR("SecondLife"),NULL); + mOSCacheDir = *cachedir; + //SPATTERS TODO: This changes from ~/Library/Cache/Secondlife to ~/Library/Cache/com.app.secondlife/Secondlife. Last dir level could go away. + CreateDirectory(mOSCacheDir, secondLifeString, NULL); } // mOSUserAppDir mOSUserAppDir = mOSUserDir; // mTempDir - error = FSFindFolder(kOnAppropriateDisk, kTemporaryFolderType, true, &fileRef); - if (error == noErr) - { - FSRef tempRef; - error = CFCreateDirectory(&fileRef, secondLifeString, &tempRef); - if (error == noErr) - FSRefToLLString(&tempRef, mTempDir); - } + //Aura 120920 boost::filesystem::temp_directory_path() not yet implemented on mac. :( + std::string *tmpdir = getSystemTempFolder(); + if (tmpdir) + { + + CreateDirectory(*tmpdir, secondLifeString, &mTempDir); + if (tmpdir) delete tmpdir; + } mWorkingDir = getCurPath(); mLLPluginDir = mAppRODataDir + mDirDelimiter + "llplugin"; - - CFRelease(executableURLRef); - executableURLRef = NULL; } } @@ -235,52 +174,18 @@ void LLDir_Mac::initAppDirs(const std::string &app_name, mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins"; } mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); - - //dumpCurrentDirectories(); -} - -U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &mask) -{ - U32 file_count = 0; - glob_t g; - - std::string tmp_str; - tmp_str = dirname; - tmp_str += mask; - - if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0) - { - file_count = g.gl_pathc; - - globfree(&g); - } - - return (file_count); } std::string LLDir_Mac::getCurPath() { - char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ - getcwd(tmp_str, LL_MAX_PATH); - return tmp_str; + return boost::filesystem::path( boost::filesystem::current_path() ).string(); } -BOOL LLDir_Mac::fileExists(const std::string &filename) const +bool LLDir_Mac::fileExists(const std::string &filename) const { - struct stat stat_data; - // Check the age of the file - // Now, we see if the files we've gathered are recent... - int res = stat(filename.c_str(), &stat_data); - if (!res) - { - return TRUE; - } - else - { - return FALSE; - } + return boost::filesystem::exists(filename); } diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h index 64e9485757..558727ebbc 100644 --- a/indra/llvfs/lldir_mac.h +++ b/indra/llvfs/lldir_mac.h @@ -45,16 +45,10 @@ public: const std::string& app_read_only_data_dir); virtual std::string getCurPath(); - virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - virtual BOOL fileExists(const std::string &filename) const; + virtual bool fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); - -private: - int mCurrentDirIndex; - int mCurrentDirCount; - std::string mCurrentDir; }; #endif // LL_LLDIR_MAC_H diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index 21f8c3acdb..a97d72d539 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -272,7 +272,7 @@ std::string LLDir_Solaris::getCurPath() } -BOOL LLDir_Solaris::fileExists(const std::string &filename) const +bool LLDir_Solaris::fileExists(const std::string &filename) const { struct stat stat_data; // Check the age of the file diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h index 0b58a45b15..c6dac57e14 100644 --- a/indra/llvfs/lldir_solaris.h +++ b/indra/llvfs/lldir_solaris.h @@ -47,7 +47,7 @@ public: virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL fileExists(const std::string &filename) const; + /*virtual*/ bool fileExists(const std::string &filename) const; private: DIR *mDirp; diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 7709945123..462d1cce06 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -249,7 +249,7 @@ std::string LLDir_Win32::getCurPath() } -BOOL LLDir_Win32::fileExists(const std::string &filename) const +bool LLDir_Win32::fileExists(const std::string &filename) const { llstat stat_data; // Check the age of the file diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h index 62fb4713ab..450efaf9da 100644 --- a/indra/llvfs/lldir_win32.h +++ b/indra/llvfs/lldir_win32.h @@ -44,7 +44,7 @@ public: /*virtual*/ std::string getCurPath(); /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL fileExists(const std::string &filename) const; + /*virtual*/ bool fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); diff --git a/indra/llvfs/llvfs_objc.h b/indra/llvfs/llvfs_objc.h new file mode 100644 index 0000000000..90101eb2e9 --- /dev/null +++ b/indra/llvfs/llvfs_objc.h @@ -0,0 +1,43 @@ +/** + * @file llvfs_objc.h + * @brief Definition of directory utilities class for Mac OS X + * + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ + +#if !LL_DARWIN +#error This header must not be included when compiling for any target other than Mac OS. Consider including lldir.h instead. +#endif // !LL_DARWIN + +#ifndef LL_LLVFS_OBJC_H +#define LL_LLVFS_OBJC_H + +#include <iostream> + +std::string* getSystemTempFolder(); +std::string* getSystemCacheFolder(); +std::string* getSystemApplicationSupportFolder(); +std::string* getSystemResourceFolder(); +std::string* getSystemExecutableFolder(); + + +#endif LL_LLVFS_OBJC_H diff --git a/indra/llvfs/llvfs_objc.mm b/indra/llvfs/llvfs_objc.mm new file mode 100644 index 0000000000..4f9e2f81e9 --- /dev/null +++ b/indra/llvfs/llvfs_objc.mm @@ -0,0 +1,108 @@ +/** + * @file llvfs_objc.cpp + * @brief Cocoa implementation of directory utilities for Mac OS X + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ +#if LL_DARWIN + +//WARNING: This file CANNOT use standard linden includes due to conflicts between definitions of BOOL + +#include "llvfs_objc.h" +#import <Cocoa/Cocoa.h> + +std::string* getSystemTempFolder() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString * tempDir = NSTemporaryDirectory(); + if (tempDir == nil) + tempDir = @"/tmp"; + std::string *result = ( new std::string([tempDir UTF8String]) ); + [pool release]; + + return result; +} + +//findSystemDirectory scoped exclusively to this file. +std::string* findSystemDirectory(NSSearchPathDirectory searchPathDirectory, + NSSearchPathDomainMask domainMask) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + std::string *result; + NSString *path = nil; + + // Search for the path + NSArray* paths = NSSearchPathForDirectoriesInDomains(searchPathDirectory, + domainMask, + YES); + if ([paths count]) + { + path = [paths objectAtIndex:0]; + //SPATTERS HACK: Always attempt to create directory, ignore errors. + NSError *error = nil; + + [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error]; + + + result = new std::string([path UTF8String]); + } + [pool release]; + return result; +} + +std::string* getSystemExecutableFolder() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSString *bundlePath = [[NSBundle mainBundle] executablePath]; + std::string *result = (new std::string([bundlePath UTF8String])); + [pool release]; + + return result; +} + +std::string* getSystemResourceFolder() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSString *bundlePath = [[NSBundle mainBundle] resourcePath]; + std::string *result = (new std::string([bundlePath UTF8String])); + [pool release]; + + return result; +} + +std::string* getSystemCacheFolder() +{ + return findSystemDirectory (NSCachesDirectory, + NSUserDomainMask); +} + +std::string* getSystemApplicationSupportFolder() +{ + return findSystemDirectory (NSApplicationSupportDirectory, + NSUserDomainMask); + +} + +#endif // LL_DARWIN diff --git a/indra/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp index 323f876c12..3cff622a4b 100644 --- a/indra/llvfs/tests/lldir_test.cpp +++ b/indra/llvfs/tests/lldir_test.cpp @@ -134,7 +134,7 @@ struct LLDir_Dummy: public LLDir return 0; } - virtual BOOL fileExists(const std::string& pathname) const + virtual bool fileExists(const std::string& pathname) const { // Record fileExists() calls so we can check whether caching is // working right. Certain LLDir calls should be able to make decisions diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 5b7424acbb..93b9d36939 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -50,14 +50,15 @@ LLSplashScreen *gSplashScreenp = NULL; BOOL gDebugClicks = FALSE; BOOL gDebugWindowProc = FALSE; -const S32 gURLProtocolWhitelistCount = 3; -const std::string gURLProtocolWhitelist[] = { "file:", "http:", "https:" }; +const S32 gURLProtocolWhitelistCount = 4; +const std::string gURLProtocolWhitelist[] = { "secondlife:", "http:", "https:", "data:" }; // CP: added a handler list - this is what's used to open the protocol and is based on registry entry // only meaningful difference currently is that file: protocols are opened using http: // since no protocol handler exists in registry for file: // Important - these lists should match - protocol to handler -const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" }; +// Maestro: This list isn't referenced anywhere that I could find +//const std::string gURLProtocolWhitelistHandler[] = { "http", "http", "https" }; S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 4da87f4e06..e9147d552e 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -280,7 +280,7 @@ extern BOOL gDebugWindowProc; // Protocols, like "http" and "https" we support in URLs extern const S32 gURLProtocolWhitelistCount; extern const std::string gURLProtocolWhitelist[]; -extern const std::string gURLProtocolWhitelistHandler[]; +//extern const std::string gURLProtocolWhitelistHandler[]; void simpleEscapeString ( std::string& stringIn ); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 39f8a36a6e..a15114cb9b 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2516,6 +2516,23 @@ void exec_cmd(const std::string& cmd, const std::string& arg) // Must begin with protocol identifier. void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) { + bool found = false; + S32 i; + for (i = 0; i < gURLProtocolWhitelistCount; i++) + { + if (escaped_url.find(gURLProtocolWhitelist[i]) != std::string::npos) + { + found = true; + break; + } + } + + if (!found) + { + llwarns << "spawn_web_browser called for url with protocol not on whitelist: " << escaped_url << llendl; + return; + } + llinfos << "spawn_web_browser: " << escaped_url << llendl; #if LL_LINUX || LL_SOLARIS diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 9a4dd41c4e..43c0090993 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -58,7 +58,6 @@ #include <dinput.h> #include <Dbt.h.> -#include "llmemtype.h" // culled from winuser.h #ifndef WM_MOUSEWHEEL /* Added to be compatible with later SDK's */ const S32 WM_MOUSEWHEEL = 0x020A; @@ -1773,8 +1772,6 @@ void LLWindowWin32::gatherInput() MSG msg; int msg_count = 0; - LLMemType m1(LLMemType::MTYPE_GATHER_INPUT); - while ((msg_count < MAX_MESSAGE_PER_UPDATE) && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { mCallbacks->handlePingWatchdog(this, "Main:TranslateGatherInput"); diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 9a3a40e476..ee7d1d50b7 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -254,6 +254,7 @@ public: else { llwarns << "Control " << name << " not found." << llendl; + return T(); } return convert_from_llsd<T>(value, type, name); } diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 96b7e57e97..307a5561a0 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -315,6 +315,8 @@ extern "C" { int yyerror(const char *fmt, ...); } "ATTACH_HUD_BOTTOM_LEFT" { count(); yylval.ival = 36; return(INTEGER_CONSTANT); } "ATTACH_HUD_BOTTOM" { count(); yylval.ival = 37; return(INTEGER_CONSTANT); } "ATTACH_HUD_BOTTOM_RIGHT" { count(); yylval.ival = 38; return(INTEGER_CONSTANT); } +"ATTACH_NECK" { count(); yylval.ival = 39; return(INTEGER_CONSTANT); } +"ATTACH_AVATAR_CENTER" { count(); yylval.ival = 40; return(INTEGER_CONSTANT); } "LAND_LEVEL" { count(); yylval.ival = E_LANDBRUSH_LEVEL; return(INTEGER_CONSTANT); } "LAND_RAISE" { count(); yylval.ival = E_LANDBRUSH_RAISE; return(INTEGER_CONSTANT); } diff --git a/indra/mac_crash_logger/CMakeLists.txt b/indra/mac_crash_logger/CMakeLists.txt index 420e836e36..3906a3bb8c 100644 --- a/indra/mac_crash_logger/CMakeLists.txt +++ b/indra/mac_crash_logger/CMakeLists.txt @@ -23,12 +23,14 @@ include_directories( set(mac_crash_logger_SOURCE_FILES mac_crash_logger.cpp llcrashloggermac.cpp + llcrashloggermacdelegate.mm ) set(mac_crash_logger_HEADER_FILES CMakeLists.txt llcrashloggermac.h + llcrashloggermacdelegate.h ) set_source_files_properties(${mac_crash_logger_HEADER_FILES} @@ -55,9 +57,12 @@ set_target_properties(mac-crash-logger MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +find_library(COCOA_LIBRARY Cocoa) + target_link_libraries(mac-crash-logger ${LLCRASHLOGGER_LIBRARIES} ${LLVFS_LIBRARIES} + ${COCOA_LIBRARIES} ${LLXML_LIBRARIES} ${LLMESSAGE_LIBRARIES} ${LLVFS_LIBRARIES} diff --git a/indra/mac_crash_logger/CrashReporter.nib b/indra/mac_crash_logger/CrashReporter.nib Binary files differnew file mode 100644 index 0000000000..a30d8d205c --- /dev/null +++ b/indra/mac_crash_logger/CrashReporter.nib diff --git a/indra/mac_crash_logger/CrashReporter.nib/classes.nib b/indra/mac_crash_logger/CrashReporter.nib/classes.nib deleted file mode 100644 index c4b887e72b..0000000000 --- a/indra/mac_crash_logger/CrashReporter.nib/classes.nib +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBVersion</key> - <string>1</string> -</dict> -</plist> diff --git a/indra/mac_crash_logger/CrashReporter.nib/info.nib b/indra/mac_crash_logger/CrashReporter.nib/info.nib deleted file mode 100644 index 06805c0e4f..0000000000 --- a/indra/mac_crash_logger/CrashReporter.nib/info.nib +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IBFramework Version</key> - <string>629</string> - <key>IBLastKnownRelativeProjectPath</key> - <string>../../build-darwin-i386/SecondLife.xcodeproj</string> - <key>IBOldestOS</key> - <integer>5</integer> - <key>IBOpenObjects</key> - <array/> - <key>IBSystem Version</key> - <string>9E17</string> - <key>targetFramework</key> - <string>IBCarbonFramework</string> -</dict> -</plist> diff --git a/indra/mac_crash_logger/CrashReporter.nib/objects.xib b/indra/mac_crash_logger/CrashReporter.nib/objects.xib deleted file mode 100644 index 32647391b6..0000000000 --- a/indra/mac_crash_logger/CrashReporter.nib/objects.xib +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" standalone="yes"?> -<object class="NSIBObjectData"> - <object name="rootObject" class="NSCustomObject" id="1"> - </object> - <array count="7" name="allObjects"> - <object class="IBCarbonButton" id="182"> - <ostype name="command">ok </ostype> - <string name="title">Send Report</string> - <string name="bounds">414 273 434 378 </string> - </object> - <object class="IBCarbonButton" id="183"> - <ostype name="command">not!</ostype> - <int name="buttonType">2</int> - <string name="title">Don't Send</string> - <string name="bounds">414 390 434 487 </string> - </object> - <object class="IBCarbonStaticText" id="181"> - <string name="title">Second Life appears to have crashed or frozen the last time it ran. This crash reporter collects information about your computer's hardware configuration, operating system, and some Second Life logs, all of which are used for debugging purposes only. In the space below, please briefly describe what you were doing or trying to do just prior to the crash. Thank you for your help! This report is NOT read by Customer Support. If you have billing or other questions, please go to: http://www.secondlife.com/support/ If you don't wish to send Linden Lab a crash report, press Don't Send. </string> - <string name="bounds">20 20 231 487 </string> - </object> - <object class="IBCarbonWindow" id="166"> - <int name="carbonWindowClass">2</int> - <int name="themeBrush">3</int> - <int name="windowPosition">7</int> - <string name="title">Second Life Crash Logger</string> - <object name="rootControl" class="IBCarbonRootControl" id="167"> - <array count="5" name="subviews"> - <reference idRef="181"/> - <reference idRef="182"/> - <reference idRef="183"/> - <object class="IBCarbonEditText" id="185"> - <ostype name="controlSignature">text</ostype> - <boolean name="isUnicode">TRUE</boolean> - <string name="bounds">242 23 391 484 </string> - </object> - <object class="IBCarbonCheckBox" id="193"> - <ostype name="controlSignature">remb</ostype> - <string name="title">Remember This Choice</string> - <string name="bounds">415 20 433 186 </string> - </object> - </array> - <string name="bounds">0 0 454 507 </string> - </object> - <string name="windowRect">257 653 711 1160 </string> - <string name="ScreenRectAtEncodeTime">0 0 768 1024 </string> - </object> - <reference idRef="185"/> - <reference idRef="167"/> - <reference idRef="193"/> - </array> - <array count="7" name="allParents"> - <reference idRef="167"/> - <reference idRef="167"/> - <reference idRef="167"/> - <reference idRef="1"/> - <reference idRef="167"/> - <reference idRef="166"/> - <reference idRef="167"/> - </array> - <dictionary count="2" name="nameTable"> - <string>CrashReporter</string> - <reference idRef="166"/> - <string>File's Owner</string> - <reference idRef="1"/> - </dictionary> - <string name="targetFramework">IBCarbonFramework</string> - <unsigned_int name="nextObjectID">194</unsigned_int> -</object> diff --git a/indra/mac_crash_logger/CrashReporter.xib b/indra/mac_crash_logger/CrashReporter.xib new file mode 100644 index 0000000000..f6d4776d51 --- /dev/null +++ b/indra/mac_crash_logger/CrashReporter.xib @@ -0,0 +1,3895 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00"> + <data> + <int key="IBDocument.SystemTarget">1070</int> + <string key="IBDocument.SystemVersion">11G63</string> + <string key="IBDocument.InterfaceBuilderVersion">2182</string> + <string key="IBDocument.AppKitVersion">1138.51</string> + <string key="IBDocument.HIToolboxVersion">569.00</string> + <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="NS.object.0">2182</string> + </object> + <array key="IBDocument.IntegratedClassDependencies"> + <string>NSTextField</string> + <string>NSView</string> + <string>NSWindowTemplate</string> + <string>NSMenu</string> + <string>NSMenuItem</string> + <string>NSTextFieldCell</string> + <string>NSButtonCell</string> + <string>IBNSLayoutConstraint</string> + <string>NSButton</string> + <string>NSCustomObject</string> + </array> + <array key="IBDocument.PluginDependencies"> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + </array> + <object class="NSMutableDictionary" key="IBDocument.Metadata"> + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> + <integer value="1" key="NS.object.0"/> + </object> + <array class="NSMutableArray" key="IBDocument.RootObjects" id="1048"> + <object class="NSCustomObject" id="1021"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSCustomObject" id="1014"> + <string key="NSClassName">FirstResponder</string> + </object> + <object class="NSCustomObject" id="1050"> + <string key="NSClassName">NSApplication</string> + </object> + <object class="NSMenu" id="649796088"> + <string key="NSTitle">AMainMenu</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="694149608"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Second Life Crash Logger</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <object class="NSCustomResource" key="NSOnImage" id="35465992"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuCheckmark</string> + </object> + <object class="NSCustomResource" key="NSMixedImage" id="502551668"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuMixedState</string> + </object> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="110575045"> + <string key="NSTitle">Second Life Crash Logger</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="238522557"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">About Second Life Crash Logger</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="304266470"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="609285721"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Preferences…</string> + <string key="NSKeyEquiv">,</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="481834944"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1046388886"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Services</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="752062318"> + <string key="NSTitle">Services</string> + <array class="NSMutableArray" key="NSMenuItems"/> + <string key="NSName">_NSServicesMenu</string> + </object> + </object> + <object class="NSMenuItem" id="646227648"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="755159360"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Hide Second Life Crash Logger</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="342932134"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Hide Others</string> + <string key="NSKeyEquiv">h</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="908899353"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Show All</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1056857174"> + <reference key="NSMenu" ref="110575045"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="632727374"> + <reference key="NSMenu" ref="110575045"/> + <string key="NSTitle">Quit Second Life Crash Logger</string> + <string key="NSKeyEquiv">q</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSAppleMenu</string> + </object> + </object> + <object class="NSMenuItem" id="379814623"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">File</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="720053764"> + <string key="NSTitle">File</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="705341025"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">New</string> + <string key="NSKeyEquiv">n</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="722745758"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Open…</string> + <string key="NSKeyEquiv">o</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1025936716"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Open Recent</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="1065607017"> + <string key="NSTitle">Open Recent</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="759406840"> + <reference key="NSMenu" ref="1065607017"/> + <string key="NSTitle">Clear Menu</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSRecentDocumentsMenu</string> + </object> + </object> + <object class="NSMenuItem" id="425164168"> + <reference key="NSMenu" ref="720053764"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="776162233"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Close</string> + <string key="NSKeyEquiv">w</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1023925487"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Save…</string> + <string key="NSKeyEquiv">s</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="579971712"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Revert to Saved</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1010469920"> + <reference key="NSMenu" ref="720053764"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="294629803"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Page Setup...</string> + <string key="NSKeyEquiv">P</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSToolTip"/> + </object> + <object class="NSMenuItem" id="49223823"> + <reference key="NSMenu" ref="720053764"/> + <string key="NSTitle">Print…</string> + <string key="NSKeyEquiv">p</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="952259628"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Edit</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="789758025"> + <string key="NSTitle">Edit</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1058277027"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Undo</string> + <string key="NSKeyEquiv">z</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="790794224"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Redo</string> + <string key="NSKeyEquiv">Z</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1040322652"> + <reference key="NSMenu" ref="789758025"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="296257095"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Cut</string> + <string key="NSKeyEquiv">x</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="860595796"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Copy</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="29853731"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Paste</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="82994268"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Paste and Match Style</string> + <string key="NSKeyEquiv">V</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="437104165"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Delete</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="583158037"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Select All</string> + <string key="NSKeyEquiv">a</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="212016141"> + <reference key="NSMenu" ref="789758025"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="892235320"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Find</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="963351320"> + <string key="NSTitle">Find</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="447796847"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find…</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="738670835"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find and Replace…</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">12</int> + </object> + <object class="NSMenuItem" id="326711663"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find Next</string> + <string key="NSKeyEquiv">g</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="270902937"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Find Previous</string> + <string key="NSKeyEquiv">G</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="159080638"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Use Selection for Find</string> + <string key="NSKeyEquiv">e</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">7</int> + </object> + <object class="NSMenuItem" id="88285865"> + <reference key="NSMenu" ref="963351320"/> + <string key="NSTitle">Jump to Selection</string> + <string key="NSKeyEquiv">j</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="972420730"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Spelling and Grammar</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="769623530"> + <string key="NSTitle">Spelling and Grammar</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="679648819"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Show Spelling and Grammar</string> + <string key="NSKeyEquiv">:</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="96193923"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Check Document Now</string> + <string key="NSKeyEquiv">;</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="859480356"> + <reference key="NSMenu" ref="769623530"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="948374510"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Check Spelling While Typing</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="967646866"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Check Grammar With Spelling</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="795346622"> + <reference key="NSMenu" ref="769623530"/> + <string key="NSTitle">Correct Spelling Automatically</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="507821607"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Substitutions</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="698887838"> + <string key="NSTitle">Substitutions</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="65139061"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Show Substitutions</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="19036812"> + <reference key="NSMenu" ref="698887838"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="605118523"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Copy/Paste</string> + <string key="NSKeyEquiv">f</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="197661976"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Quotes</string> + <string key="NSKeyEquiv">g</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="672708820"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Dashes</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="708854459"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Smart Links</string> + <string key="NSKeyEquiv">G</string> + <int key="NSKeyEquivModMask">1179648</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="537092702"> + <reference key="NSMenu" ref="698887838"/> + <string key="NSTitle">Text Replacement</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="288088188"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Transformations</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="579392910"> + <string key="NSTitle">Transformations</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1060694897"> + <reference key="NSMenu" ref="579392910"/> + <string key="NSTitle">Make Upper Case</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="879586729"> + <reference key="NSMenu" ref="579392910"/> + <string key="NSTitle">Make Lower Case</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="56570060"> + <reference key="NSMenu" ref="579392910"/> + <string key="NSTitle">Capitalize</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="676164635"> + <reference key="NSMenu" ref="789758025"/> + <string key="NSTitle">Speech</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="785027613"> + <string key="NSTitle">Speech</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="731782645"> + <reference key="NSMenu" ref="785027613"/> + <string key="NSTitle">Start Speaking</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="680220178"> + <reference key="NSMenu" ref="785027613"/> + <string key="NSTitle">Stop Speaking</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="302598603"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Format</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="941447902"> + <string key="NSTitle">Format</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="792887677"> + <reference key="NSMenu" ref="941447902"/> + <string key="NSTitle">Font</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="786677654"> + <string key="NSTitle">Font</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="159677712"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Show Fonts</string> + <string key="NSKeyEquiv">t</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="305399458"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Bold</string> + <string key="NSKeyEquiv">b</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="814362025"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Italic</string> + <string key="NSKeyEquiv">i</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="330926929"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Underline</string> + <string key="NSKeyEquiv">u</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="533507878"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="158063935"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Bigger</string> + <string key="NSKeyEquiv">+</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">3</int> + </object> + <object class="NSMenuItem" id="885547335"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Smaller</string> + <string key="NSKeyEquiv">-</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <int key="NSTag">4</int> + </object> + <object class="NSMenuItem" id="901062459"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="767671776"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Kern</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="175441468"> + <string key="NSTitle">Kern</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="252969304"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="766922938"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Use None</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="677519740"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Tighten</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="238351151"> + <reference key="NSMenu" ref="175441468"/> + <string key="NSTitle">Loosen</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="691570813"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Ligature</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="1058217995"> + <string key="NSTitle">Ligature</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="706297211"> + <reference key="NSMenu" ref="1058217995"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="568384683"> + <reference key="NSMenu" ref="1058217995"/> + <string key="NSTitle">Use None</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="663508465"> + <reference key="NSMenu" ref="1058217995"/> + <string key="NSTitle">Use All</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="769124883"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Baseline</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="18263474"> + <string key="NSTitle">Baseline</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="257962622"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Use Default</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="644725453"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Superscript</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1037576581"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Subscript</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="941806246"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Raise</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1045724900"> + <reference key="NSMenu" ref="18263474"/> + <string key="NSTitle">Lower</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="739652853"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="1012600125"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Show Colors</string> + <string key="NSKeyEquiv">C</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="214559597"> + <reference key="NSMenu" ref="786677654"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="596732606"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Copy Style</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="393423671"> + <reference key="NSMenu" ref="786677654"/> + <string key="NSTitle">Paste Style</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSFontMenu</string> + </object> + </object> + <object class="NSMenuItem" id="215659978"> + <reference key="NSMenu" ref="941447902"/> + <string key="NSTitle">Text</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="446991534"> + <string key="NSTitle">Text</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="875092757"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Align Left</string> + <string key="NSKeyEquiv">{</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="630155264"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Center</string> + <string key="NSKeyEquiv">|</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="945678886"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Justify</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="512868991"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Align Right</string> + <string key="NSKeyEquiv">}</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="163117631"> + <reference key="NSMenu" ref="446991534"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="31516759"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Writing Direction</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="956096989"> + <string key="NSTitle">Writing Direction</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="257099033"> + <reference key="NSMenu" ref="956096989"/> + <bool key="NSIsDisabled">YES</bool> + <string key="NSTitle">Paragraph</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="551969625"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="249532473"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="607364498"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="508151438"> + <reference key="NSMenu" ref="956096989"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="981751889"> + <reference key="NSMenu" ref="956096989"/> + <bool key="NSIsDisabled">YES</bool> + <string key="NSTitle">Selection</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="380031999"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="825984362"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="560145579"> + <reference key="NSMenu" ref="956096989"/> + <string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="908105787"> + <reference key="NSMenu" ref="446991534"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="644046920"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Show Ruler</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="231811626"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Copy Ruler</string> + <string key="NSKeyEquiv">c</string> + <int key="NSKeyEquivModMask">1310720</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="883618387"> + <reference key="NSMenu" ref="446991534"/> + <string key="NSTitle">Paste Ruler</string> + <string key="NSKeyEquiv">v</string> + <int key="NSKeyEquivModMask">1310720</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="586577488"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">View</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="466310130"> + <string key="NSTitle">View</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="102151532"> + <reference key="NSMenu" ref="466310130"/> + <string key="NSTitle">Show Toolbar</string> + <string key="NSKeyEquiv">t</string> + <int key="NSKeyEquivModMask">1572864</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="237841660"> + <reference key="NSMenu" ref="466310130"/> + <string key="NSTitle">Customize Toolbar…</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + </object> + </object> + <object class="NSMenuItem" id="713487014"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Window</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="835318025"> + <string key="NSTitle">Window</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="1011231497"> + <reference key="NSMenu" ref="835318025"/> + <string key="NSTitle">Minimize</string> + <string key="NSKeyEquiv">m</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="575023229"> + <reference key="NSMenu" ref="835318025"/> + <string key="NSTitle">Zoom</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="299356726"> + <reference key="NSMenu" ref="835318025"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + <object class="NSMenuItem" id="625202149"> + <reference key="NSMenu" ref="835318025"/> + <string key="NSTitle">Bring All to Front</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSWindowsMenu</string> + </object> + </object> + <object class="NSMenuItem" id="448692316"> + <reference key="NSMenu" ref="649796088"/> + <string key="NSTitle">Help</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="992780483"> + <string key="NSTitle">Help</string> + <array class="NSMutableArray" key="NSMenuItems"> + <object class="NSMenuItem" id="105068016"> + <reference key="NSMenu" ref="992780483"/> + <string key="NSTitle">Second Life Crash Logger Help</string> + <string key="NSKeyEquiv">?</string> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="35465992"/> + <reference key="NSMixedImage" ref="502551668"/> + </object> + </array> + <string key="NSName">_NSHelpMenu</string> + </object> + </object> + </array> + <string key="NSName">_NSMainMenu</string> + </object> + <object class="NSWindowTemplate" id="972006081"> + <int key="NSWindowStyleMask">15</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{335, 390}, {508, 477}}</string> + <int key="NSWTFlags">1954021376</int> + <string key="NSWindowTitle">Second Life Crash Logger</string> + <string key="NSWindowClass">NSWindow</string> + <nil key="NSViewClass"/> + <nil key="NSUserInterfaceItemIdentifier"/> + <object class="NSView" key="NSWindowView" id="439893737"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <array class="NSMutableArray" key="NSSubviews"> + <object class="NSTextField" id="242877095"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 228}, {474, 229}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="1018085422"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <string key="NSAntiCompressionPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="502956757"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">272891904</int> + <object class="NSMutableString" key="NSContents"> + <bytes key="NS.bytes">U2Vjb25kIExpZmUgYXBwZWFycyB0byBoYXZlIGNyYXNoZWQgb3IgZnJvemVuIHRoZSBsYXN0IHRpbWUg +aXQgcmFuLgoKVGhpcyBjcmFzaCByZXBvcnRlciBjb2xsZWN0cyBpbmZvcm1hdGlvbiBhYm91dCB5b3Vy +IGNvbXB1dGVyJ3MgaGFyZHdhcmUgY29uZmlndXJhdGlvbiwgb3BlcmF0aW5nIHN5c3RlbSwgYW5kIHNv +bWUgU2Vjb25kIExpZmUgbG9ncywgYWxsIG9mIHdoaWNoIGFyZSB1c2VkIGZvciBkZWJ1Z2dpbmcgcHVy +cG9zZXMgb25seS4KCkluIHRoZSBzcGFjZSBiZWxvdywgcGxlYXNlIGJyaWVmbHkgZGVzY3JpYmUgd2hh +dCB5b3Ugd2VyZSBkb2luZyBvciB0cnlpbmcgdG8gZG8ganVzdCBwcmlvciB0byB0aGUgY3Jhc2guICBU +aGFuayB5b3UgZm9yIHlvdXIgaGVscCEKClRoaXMgcmVwb3J0IGlzIE5PVCByZWFkIGJ5IEN1c3RvbWVy +IFN1cHBvcnQuICBJZiB5b3UgaGF2ZSBiaWxsaW5nIG9yIG90aGVyIHF1ZXN0aW9ucywgcGxlYXNlIGdv +IHRvOiBodHRwOi8vd3d3LnNlY29uZGxpZmUuY29tL3N1cHBvcnQvCgpJZiB5b3UgZG9uJ3Qgd2lzaCB0 +byBzZW5kIExpbmRlbiBMYWIgYSBjcmFzaCByZXBvcnQsIHByZXNzIENhbmNlbC4</bytes> + </object> + <object class="NSFont" key="NSSupport" id="1010806345"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">16</int> + </object> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="242877095"/> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <object class="NSColor" key="NSColor" id="355388215"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MAA</bytes> + </object> + </object> + </object> + </object> + <object class="NSTextField" id="1018085422"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{20, 64}, {468, 163}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="688522420"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <string key="NSAntiCompressionPriority">{250, 750}</string> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="867418359"> + <int key="NSCellFlags">-1805517311</int> + <int key="NSCellFlags2">272891904</int> + <string key="NSContents"/> + <object class="NSFont" key="NSSupport"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">9</double> + <int key="NSfFlags">3614</int> + </object> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="1018085422"/> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textBackgroundColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MQA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textColor</string> + <reference key="NSColor" ref="355388215"/> + </object> + </object> + </object> + <object class="NSButton" id="688522420"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{16, 18}, {189, 30}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="93467784"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="445379790"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">262144</int> + <string key="NSContents">Remember This Choice</string> + <reference key="NSSupport" ref="1010806345"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="688522420"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSSwitch</string> + </object> + <object class="NSButtonImageSource" key="NSAlternateImage"> + <string key="NSImageName">NSSwitch</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="93467784"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{285, 23}, {91, 17}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="46276252"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="623922320"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134479872</int> + <string key="NSContents">Send Report</string> + <reference key="NSSupport" ref="1010806345"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="93467784"/> + <int key="NSButtonFlags">-2038152961</int> + <int key="NSButtonFlags2">164</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <object class="NSButton" id="46276252"> + <reference key="NSNextResponder" ref="439893737"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{388, 23}, {100, 17}}</string> + <reference key="NSSuperview" ref="439893737"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView"/> + <string key="NSReuseIdentifierKey">_NS:9</string> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="398179500"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134479872</int> + <string key="NSContents">Don't Send</string> + <reference key="NSSupport" ref="1010806345"/> + <string key="NSCellIdentifier">_NS:9</string> + <reference key="NSControlView" ref="46276252"/> + <int key="NSButtonFlags">-2038152961</int> + <int key="NSButtonFlags2">164</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + </array> + <string key="NSFrameSize">{508, 477}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> + <reference key="NSNextKeyView" ref="242877095"/> + </object> + <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> + <string key="NSMaxSize">{10000000000000, 10000000000000}</string> + <bool key="NSWindowIsRestorable">YES</bool> + </object> + <object class="NSCustomObject" id="976324537"> + <string key="NSClassName">LLCrashLoggerMacDelegate</string> + </object> + </array> + <object class="IBObjectContainer" key="IBDocument.Objects"> + <array class="NSMutableArray" key="connectionRecords"> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">terminate:</string> + <reference key="source" ref="1050"/> + <reference key="destination" ref="632727374"/> + </object> + <int key="connectionID">449</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontStandardAboutPanel:</string> + <reference key="source" ref="1021"/> + <reference key="destination" ref="238522557"/> + </object> + <int key="connectionID">142</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="1021"/> + <reference key="destination" ref="976324537"/> + </object> + <int key="connectionID">495</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performMiniaturize:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1011231497"/> + </object> + <int key="connectionID">37</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">arrangeInFront:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="625202149"/> + </object> + <int key="connectionID">39</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">print:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="49223823"/> + </object> + <int key="connectionID">86</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">runPageLayout:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="294629803"/> + </object> + <int key="connectionID">87</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">clearRecentDocuments:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="759406840"/> + </object> + <int key="connectionID">127</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performClose:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="776162233"/> + </object> + <int key="connectionID">193</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleContinuousSpellChecking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="948374510"/> + </object> + <int key="connectionID">222</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">undo:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1058277027"/> + </object> + <int key="connectionID">223</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copy:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="860595796"/> + </object> + <int key="connectionID">224</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">checkSpelling:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="96193923"/> + </object> + <int key="connectionID">225</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">paste:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="29853731"/> + </object> + <int key="connectionID">226</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">stopSpeaking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="680220178"/> + </object> + <int key="connectionID">227</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cut:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="296257095"/> + </object> + <int key="connectionID">228</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">showGuessPanel:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="679648819"/> + </object> + <int key="connectionID">230</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">redo:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="790794224"/> + </object> + <int key="connectionID">231</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">selectAll:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="583158037"/> + </object> + <int key="connectionID">232</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">startSpeaking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="731782645"/> + </object> + <int key="connectionID">233</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">delete:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="437104165"/> + </object> + <int key="connectionID">235</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performZoom:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="575023229"/> + </object> + <int key="connectionID">240</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="447796847"/> + </object> + <int key="connectionID">241</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">centerSelectionInVisibleArea:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="88285865"/> + </object> + <int key="connectionID">245</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleGrammarChecking:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="967646866"/> + </object> + <int key="connectionID">347</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleSmartInsertDelete:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="605118523"/> + </object> + <int key="connectionID">355</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticQuoteSubstitution:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="197661976"/> + </object> + <int key="connectionID">356</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticLinkDetection:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="708854459"/> + </object> + <int key="connectionID">357</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">saveDocument:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1023925487"/> + </object> + <int key="connectionID">362</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">revertDocumentToSaved:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="579971712"/> + </object> + <int key="connectionID">364</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">runToolbarCustomizationPalette:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="237841660"/> + </object> + <int key="connectionID">365</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleToolbarShown:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="102151532"/> + </object> + <int key="connectionID">366</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hide:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="755159360"/> + </object> + <int key="connectionID">367</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">hideOtherApplications:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="342932134"/> + </object> + <int key="connectionID">368</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unhideAllApplications:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="908899353"/> + </object> + <int key="connectionID">370</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">newDocument:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="705341025"/> + </object> + <int key="connectionID">373</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">openDocument:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="722745758"/> + </object> + <int key="connectionID">374</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">raiseBaseline:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="941806246"/> + </object> + <int key="connectionID">426</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">lowerBaseline:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1045724900"/> + </object> + <int key="connectionID">427</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyFont:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="596732606"/> + </object> + <int key="connectionID">428</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">subscript:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1037576581"/> + </object> + <int key="connectionID">429</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">superscript:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="644725453"/> + </object> + <int key="connectionID">430</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">tightenKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="677519740"/> + </object> + <int key="connectionID">431</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">underline:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="330926929"/> + </object> + <int key="connectionID">432</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontColorPanel:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1012600125"/> + </object> + <int key="connectionID">433</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useAllLigatures:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="663508465"/> + </object> + <int key="connectionID">434</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">loosenKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="238351151"/> + </object> + <int key="connectionID">435</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteFont:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="393423671"/> + </object> + <int key="connectionID">436</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">unscript:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="257962622"/> + </object> + <int key="connectionID">437</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useStandardKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="252969304"/> + </object> + <int key="connectionID">438</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">useStandardLigatures:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="706297211"/> + </object> + <int key="connectionID">439</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">turnOffLigatures:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="568384683"/> + </object> + <int key="connectionID">440</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">turnOffKerning:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="766922938"/> + </object> + <int key="connectionID">441</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticSpellingCorrection:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="795346622"/> + </object> + <int key="connectionID">456</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">orderFrontSubstitutionsPanel:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="65139061"/> + </object> + <int key="connectionID">458</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticDashSubstitution:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="672708820"/> + </object> + <int key="connectionID">461</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAutomaticTextReplacement:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="537092702"/> + </object> + <int key="connectionID">463</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">uppercaseWord:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="1060694897"/> + </object> + <int key="connectionID">464</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">capitalizeWord:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="56570060"/> + </object> + <int key="connectionID">467</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">lowercaseWord:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="879586729"/> + </object> + <int key="connectionID">468</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteAsPlainText:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="82994268"/> + </object> + <int key="connectionID">486</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="326711663"/> + </object> + <int key="connectionID">487</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="270902937"/> + </object> + <int key="connectionID">488</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="159080638"/> + </object> + <int key="connectionID">489</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">showHelp:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="105068016"/> + </object> + <int key="connectionID">493</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignCenter:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="630155264"/> + </object> + <int key="connectionID">518</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">pasteRuler:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="883618387"/> + </object> + <int key="connectionID">519</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleRuler:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="644046920"/> + </object> + <int key="connectionID">520</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignRight:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="512868991"/> + </object> + <int key="connectionID">521</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">copyRuler:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="231811626"/> + </object> + <int key="connectionID">522</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignJustified:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="945678886"/> + </object> + <int key="connectionID">523</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">alignLeft:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="875092757"/> + </object> + <int key="connectionID">524</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionNatural:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="551969625"/> + </object> + <int key="connectionID">525</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionLeftToRight:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="249532473"/> + </object> + <int key="connectionID">526</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeBaseWritingDirectionRightToLeft:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="607364498"/> + </object> + <int key="connectionID">527</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionNatural:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="380031999"/> + </object> + <int key="connectionID">528</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionLeftToRight:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="825984362"/> + </object> + <int key="connectionID">529</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">makeTextWritingDirectionRightToLeft:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="560145579"/> + </object> + <int key="connectionID">530</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">performFindPanelAction:</string> + <reference key="source" ref="1014"/> + <reference key="destination" ref="738670835"/> + </object> + <int key="connectionID">535</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="972006081"/> + </object> + <int key="connectionID">532</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">remember:</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="688522420"/> + </object> + <int key="connectionID">1176</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">send:</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="93467784"/> + </object> + <int key="connectionID">1177</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">cancel:</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="46276252"/> + </object> + <int key="connectionID">1178</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">crashText</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="1018085422"/> + </object> + <int key="connectionID">1179</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">rememberCheck</string> + <reference key="source" ref="976324537"/> + <reference key="destination" ref="688522420"/> + </object> + <int key="connectionID">1187</int> + </object> + </array> + <object class="IBMutableOrderedSet" key="objectRecords"> + <array key="orderedObjects"> + <object class="IBObjectRecord"> + <int key="objectID">0</int> + <array key="object" id="0"/> + <reference key="children" ref="1048"/> + <nil key="parent"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-2</int> + <reference key="object" ref="1021"/> + <reference key="parent" ref="0"/> + <string key="objectName">File's Owner</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-1</int> + <reference key="object" ref="1014"/> + <reference key="parent" ref="0"/> + <string key="objectName">First Responder</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">-3</int> + <reference key="object" ref="1050"/> + <reference key="parent" ref="0"/> + <string key="objectName">Application</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">29</int> + <reference key="object" ref="649796088"/> + <array class="NSMutableArray" key="children"> + <reference ref="713487014"/> + <reference ref="694149608"/> + <reference ref="952259628"/> + <reference ref="379814623"/> + <reference ref="586577488"/> + <reference ref="302598603"/> + <reference ref="448692316"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">19</int> + <reference key="object" ref="713487014"/> + <array class="NSMutableArray" key="children"> + <reference ref="835318025"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">56</int> + <reference key="object" ref="694149608"/> + <array class="NSMutableArray" key="children"> + <reference ref="110575045"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">217</int> + <reference key="object" ref="952259628"/> + <array class="NSMutableArray" key="children"> + <reference ref="789758025"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">83</int> + <reference key="object" ref="379814623"/> + <array class="NSMutableArray" key="children"> + <reference ref="720053764"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">81</int> + <reference key="object" ref="720053764"/> + <array class="NSMutableArray" key="children"> + <reference ref="1023925487"/> + <reference ref="49223823"/> + <reference ref="722745758"/> + <reference ref="705341025"/> + <reference ref="1025936716"/> + <reference ref="294629803"/> + <reference ref="776162233"/> + <reference ref="425164168"/> + <reference ref="579971712"/> + <reference ref="1010469920"/> + </array> + <reference key="parent" ref="379814623"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">75</int> + <reference key="object" ref="1023925487"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">78</int> + <reference key="object" ref="49223823"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">72</int> + <reference key="object" ref="722745758"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">82</int> + <reference key="object" ref="705341025"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">124</int> + <reference key="object" ref="1025936716"/> + <array class="NSMutableArray" key="children"> + <reference ref="1065607017"/> + </array> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">77</int> + <reference key="object" ref="294629803"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">73</int> + <reference key="object" ref="776162233"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">79</int> + <reference key="object" ref="425164168"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">112</int> + <reference key="object" ref="579971712"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">74</int> + <reference key="object" ref="1010469920"/> + <reference key="parent" ref="720053764"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">125</int> + <reference key="object" ref="1065607017"/> + <array class="NSMutableArray" key="children"> + <reference ref="759406840"/> + </array> + <reference key="parent" ref="1025936716"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">126</int> + <reference key="object" ref="759406840"/> + <reference key="parent" ref="1065607017"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">205</int> + <reference key="object" ref="789758025"/> + <array class="NSMutableArray" key="children"> + <reference ref="437104165"/> + <reference ref="583158037"/> + <reference ref="1058277027"/> + <reference ref="212016141"/> + <reference ref="296257095"/> + <reference ref="29853731"/> + <reference ref="860595796"/> + <reference ref="1040322652"/> + <reference ref="790794224"/> + <reference ref="892235320"/> + <reference ref="972420730"/> + <reference ref="676164635"/> + <reference ref="507821607"/> + <reference ref="288088188"/> + <reference ref="82994268"/> + </array> + <reference key="parent" ref="952259628"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">202</int> + <reference key="object" ref="437104165"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">198</int> + <reference key="object" ref="583158037"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">207</int> + <reference key="object" ref="1058277027"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">214</int> + <reference key="object" ref="212016141"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">199</int> + <reference key="object" ref="296257095"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">203</int> + <reference key="object" ref="29853731"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">197</int> + <reference key="object" ref="860595796"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">206</int> + <reference key="object" ref="1040322652"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">215</int> + <reference key="object" ref="790794224"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">218</int> + <reference key="object" ref="892235320"/> + <array class="NSMutableArray" key="children"> + <reference ref="963351320"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">216</int> + <reference key="object" ref="972420730"/> + <array class="NSMutableArray" key="children"> + <reference ref="769623530"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">200</int> + <reference key="object" ref="769623530"/> + <array class="NSMutableArray" key="children"> + <reference ref="948374510"/> + <reference ref="96193923"/> + <reference ref="679648819"/> + <reference ref="967646866"/> + <reference ref="859480356"/> + <reference ref="795346622"/> + </array> + <reference key="parent" ref="972420730"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">219</int> + <reference key="object" ref="948374510"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">201</int> + <reference key="object" ref="96193923"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">204</int> + <reference key="object" ref="679648819"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">220</int> + <reference key="object" ref="963351320"/> + <array class="NSMutableArray" key="children"> + <reference ref="270902937"/> + <reference ref="88285865"/> + <reference ref="159080638"/> + <reference ref="326711663"/> + <reference ref="447796847"/> + <reference ref="738670835"/> + </array> + <reference key="parent" ref="892235320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">213</int> + <reference key="object" ref="270902937"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">210</int> + <reference key="object" ref="88285865"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">221</int> + <reference key="object" ref="159080638"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">208</int> + <reference key="object" ref="326711663"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">209</int> + <reference key="object" ref="447796847"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">57</int> + <reference key="object" ref="110575045"/> + <array class="NSMutableArray" key="children"> + <reference ref="238522557"/> + <reference ref="755159360"/> + <reference ref="908899353"/> + <reference ref="632727374"/> + <reference ref="646227648"/> + <reference ref="609285721"/> + <reference ref="481834944"/> + <reference ref="304266470"/> + <reference ref="1046388886"/> + <reference ref="1056857174"/> + <reference ref="342932134"/> + </array> + <reference key="parent" ref="694149608"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">58</int> + <reference key="object" ref="238522557"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">134</int> + <reference key="object" ref="755159360"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">150</int> + <reference key="object" ref="908899353"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">136</int> + <reference key="object" ref="632727374"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">144</int> + <reference key="object" ref="646227648"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">129</int> + <reference key="object" ref="609285721"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">143</int> + <reference key="object" ref="481834944"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">236</int> + <reference key="object" ref="304266470"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">131</int> + <reference key="object" ref="1046388886"/> + <array class="NSMutableArray" key="children"> + <reference ref="752062318"/> + </array> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">149</int> + <reference key="object" ref="1056857174"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">145</int> + <reference key="object" ref="342932134"/> + <reference key="parent" ref="110575045"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">130</int> + <reference key="object" ref="752062318"/> + <reference key="parent" ref="1046388886"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">24</int> + <reference key="object" ref="835318025"/> + <array class="NSMutableArray" key="children"> + <reference ref="299356726"/> + <reference ref="625202149"/> + <reference ref="575023229"/> + <reference ref="1011231497"/> + </array> + <reference key="parent" ref="713487014"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">92</int> + <reference key="object" ref="299356726"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">5</int> + <reference key="object" ref="625202149"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">239</int> + <reference key="object" ref="575023229"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">23</int> + <reference key="object" ref="1011231497"/> + <reference key="parent" ref="835318025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">295</int> + <reference key="object" ref="586577488"/> + <array class="NSMutableArray" key="children"> + <reference ref="466310130"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">296</int> + <reference key="object" ref="466310130"/> + <array class="NSMutableArray" key="children"> + <reference ref="102151532"/> + <reference ref="237841660"/> + </array> + <reference key="parent" ref="586577488"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">297</int> + <reference key="object" ref="102151532"/> + <reference key="parent" ref="466310130"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">298</int> + <reference key="object" ref="237841660"/> + <reference key="parent" ref="466310130"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">211</int> + <reference key="object" ref="676164635"/> + <array class="NSMutableArray" key="children"> + <reference ref="785027613"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">212</int> + <reference key="object" ref="785027613"/> + <array class="NSMutableArray" key="children"> + <reference ref="680220178"/> + <reference ref="731782645"/> + </array> + <reference key="parent" ref="676164635"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">195</int> + <reference key="object" ref="680220178"/> + <reference key="parent" ref="785027613"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">196</int> + <reference key="object" ref="731782645"/> + <reference key="parent" ref="785027613"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">346</int> + <reference key="object" ref="967646866"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">348</int> + <reference key="object" ref="507821607"/> + <array class="NSMutableArray" key="children"> + <reference ref="698887838"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">349</int> + <reference key="object" ref="698887838"/> + <array class="NSMutableArray" key="children"> + <reference ref="605118523"/> + <reference ref="197661976"/> + <reference ref="708854459"/> + <reference ref="65139061"/> + <reference ref="19036812"/> + <reference ref="672708820"/> + <reference ref="537092702"/> + </array> + <reference key="parent" ref="507821607"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">350</int> + <reference key="object" ref="605118523"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">351</int> + <reference key="object" ref="197661976"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">354</int> + <reference key="object" ref="708854459"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">371</int> + <reference key="object" ref="972006081"/> + <array class="NSMutableArray" key="children"> + <reference ref="439893737"/> + </array> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">372</int> + <reference key="object" ref="439893737"/> + <array class="NSMutableArray" key="children"> + <reference ref="242877095"/> + <reference ref="1018085422"/> + <reference ref="688522420"/> + <object class="IBNSLayoutConstraint" id="109434655"> + <reference key="firstItem" ref="242877095"/> + <int key="firstAttribute">3</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">3</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <reference ref="46276252"/> + <reference ref="93467784"/> + <object class="IBNSLayoutConstraint" id="166525974"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="242877095"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="229833409"> + <reference key="firstItem" ref="242877095"/> + <int key="firstAttribute">5</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">5</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="992363278"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="1018085422"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="646866003"> + <reference key="firstItem" ref="1018085422"/> + <int key="firstAttribute">5</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">5</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="98217052"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">4</int> + <int key="relation">0</int> + <reference key="secondItem" ref="1018085422"/> + <int key="secondAttribute">4</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">64</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="578918264"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="46276252"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="591594339"> + <reference key="firstItem" ref="688522420"/> + <int key="firstAttribute">5</int> + <int key="relation">0</int> + <reference key="secondItem" ref="439893737"/> + <int key="secondAttribute">5</int> + <float key="multiplier">1</float> + <object class="IBNSLayoutSymbolicConstant" key="constant"> + <double key="value">20</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">8</int> + <float key="scoringTypeFloat">29</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="432526715"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">4</int> + <int key="relation">0</int> + <reference key="secondItem" ref="688522420"/> + <int key="secondAttribute">4</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">21</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="891430181"> + <reference key="firstItem" ref="439893737"/> + <int key="firstAttribute">6</int> + <int key="relation">0</int> + <reference key="secondItem" ref="93467784"/> + <int key="secondAttribute">6</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">132</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">3</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="833183002"> + <reference key="firstItem" ref="93467784"/> + <int key="firstAttribute">11</int> + <int key="relation">0</int> + <reference key="secondItem" ref="46276252"/> + <int key="secondAttribute">11</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <reference key="containingView" ref="439893737"/> + </object> + <object class="IBNSLayoutConstraint" id="670714078"> + <reference key="firstItem" ref="93467784"/> + <int key="firstAttribute">10</int> + <int key="relation">0</int> + <reference key="secondItem" ref="688522420"/> + <int key="secondAttribute">10</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">0.0</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">6</int> + <float key="scoringTypeFloat">24</float> + <int key="contentType">2</int> + <reference key="containingView" ref="439893737"/> + </object> + </array> + <reference key="parent" ref="972006081"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">375</int> + <reference key="object" ref="302598603"/> + <array class="NSMutableArray" key="children"> + <reference ref="941447902"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">376</int> + <reference key="object" ref="941447902"/> + <array class="NSMutableArray" key="children"> + <reference ref="792887677"/> + <reference ref="215659978"/> + </array> + <reference key="parent" ref="302598603"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">377</int> + <reference key="object" ref="792887677"/> + <array class="NSMutableArray" key="children"> + <reference ref="786677654"/> + </array> + <reference key="parent" ref="941447902"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">388</int> + <reference key="object" ref="786677654"/> + <array class="NSMutableArray" key="children"> + <reference ref="159677712"/> + <reference ref="305399458"/> + <reference ref="814362025"/> + <reference ref="330926929"/> + <reference ref="533507878"/> + <reference ref="158063935"/> + <reference ref="885547335"/> + <reference ref="901062459"/> + <reference ref="767671776"/> + <reference ref="691570813"/> + <reference ref="769124883"/> + <reference ref="739652853"/> + <reference ref="1012600125"/> + <reference ref="214559597"/> + <reference ref="596732606"/> + <reference ref="393423671"/> + </array> + <reference key="parent" ref="792887677"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">389</int> + <reference key="object" ref="159677712"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">390</int> + <reference key="object" ref="305399458"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">391</int> + <reference key="object" ref="814362025"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">392</int> + <reference key="object" ref="330926929"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">393</int> + <reference key="object" ref="533507878"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">394</int> + <reference key="object" ref="158063935"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">395</int> + <reference key="object" ref="885547335"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">396</int> + <reference key="object" ref="901062459"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">397</int> + <reference key="object" ref="767671776"/> + <array class="NSMutableArray" key="children"> + <reference ref="175441468"/> + </array> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">398</int> + <reference key="object" ref="691570813"/> + <array class="NSMutableArray" key="children"> + <reference ref="1058217995"/> + </array> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">399</int> + <reference key="object" ref="769124883"/> + <array class="NSMutableArray" key="children"> + <reference ref="18263474"/> + </array> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">400</int> + <reference key="object" ref="739652853"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">401</int> + <reference key="object" ref="1012600125"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">402</int> + <reference key="object" ref="214559597"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">403</int> + <reference key="object" ref="596732606"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">404</int> + <reference key="object" ref="393423671"/> + <reference key="parent" ref="786677654"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">405</int> + <reference key="object" ref="18263474"/> + <array class="NSMutableArray" key="children"> + <reference ref="257962622"/> + <reference ref="644725453"/> + <reference ref="1037576581"/> + <reference ref="941806246"/> + <reference ref="1045724900"/> + </array> + <reference key="parent" ref="769124883"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">406</int> + <reference key="object" ref="257962622"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">407</int> + <reference key="object" ref="644725453"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">408</int> + <reference key="object" ref="1037576581"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">409</int> + <reference key="object" ref="941806246"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">410</int> + <reference key="object" ref="1045724900"/> + <reference key="parent" ref="18263474"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">411</int> + <reference key="object" ref="1058217995"/> + <array class="NSMutableArray" key="children"> + <reference ref="706297211"/> + <reference ref="568384683"/> + <reference ref="663508465"/> + </array> + <reference key="parent" ref="691570813"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">412</int> + <reference key="object" ref="706297211"/> + <reference key="parent" ref="1058217995"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">413</int> + <reference key="object" ref="568384683"/> + <reference key="parent" ref="1058217995"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">414</int> + <reference key="object" ref="663508465"/> + <reference key="parent" ref="1058217995"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">415</int> + <reference key="object" ref="175441468"/> + <array class="NSMutableArray" key="children"> + <reference ref="252969304"/> + <reference ref="766922938"/> + <reference ref="677519740"/> + <reference ref="238351151"/> + </array> + <reference key="parent" ref="767671776"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">416</int> + <reference key="object" ref="252969304"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">417</int> + <reference key="object" ref="766922938"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">418</int> + <reference key="object" ref="677519740"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">419</int> + <reference key="object" ref="238351151"/> + <reference key="parent" ref="175441468"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">450</int> + <reference key="object" ref="288088188"/> + <array class="NSMutableArray" key="children"> + <reference ref="579392910"/> + </array> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">451</int> + <reference key="object" ref="579392910"/> + <array class="NSMutableArray" key="children"> + <reference ref="1060694897"/> + <reference ref="879586729"/> + <reference ref="56570060"/> + </array> + <reference key="parent" ref="288088188"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">452</int> + <reference key="object" ref="1060694897"/> + <reference key="parent" ref="579392910"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">453</int> + <reference key="object" ref="859480356"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">454</int> + <reference key="object" ref="795346622"/> + <reference key="parent" ref="769623530"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">457</int> + <reference key="object" ref="65139061"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">459</int> + <reference key="object" ref="19036812"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">460</int> + <reference key="object" ref="672708820"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">462</int> + <reference key="object" ref="537092702"/> + <reference key="parent" ref="698887838"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">465</int> + <reference key="object" ref="879586729"/> + <reference key="parent" ref="579392910"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">466</int> + <reference key="object" ref="56570060"/> + <reference key="parent" ref="579392910"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">485</int> + <reference key="object" ref="82994268"/> + <reference key="parent" ref="789758025"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">490</int> + <reference key="object" ref="448692316"/> + <array class="NSMutableArray" key="children"> + <reference ref="992780483"/> + </array> + <reference key="parent" ref="649796088"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">491</int> + <reference key="object" ref="992780483"/> + <array class="NSMutableArray" key="children"> + <reference ref="105068016"/> + </array> + <reference key="parent" ref="448692316"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">492</int> + <reference key="object" ref="105068016"/> + <reference key="parent" ref="992780483"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">494</int> + <reference key="object" ref="976324537"/> + <reference key="parent" ref="0"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">496</int> + <reference key="object" ref="215659978"/> + <array class="NSMutableArray" key="children"> + <reference ref="446991534"/> + </array> + <reference key="parent" ref="941447902"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">497</int> + <reference key="object" ref="446991534"/> + <array class="NSMutableArray" key="children"> + <reference ref="875092757"/> + <reference ref="630155264"/> + <reference ref="945678886"/> + <reference ref="512868991"/> + <reference ref="163117631"/> + <reference ref="31516759"/> + <reference ref="908105787"/> + <reference ref="644046920"/> + <reference ref="231811626"/> + <reference ref="883618387"/> + </array> + <reference key="parent" ref="215659978"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">498</int> + <reference key="object" ref="875092757"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">499</int> + <reference key="object" ref="630155264"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">500</int> + <reference key="object" ref="945678886"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">501</int> + <reference key="object" ref="512868991"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">502</int> + <reference key="object" ref="163117631"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">503</int> + <reference key="object" ref="31516759"/> + <array class="NSMutableArray" key="children"> + <reference ref="956096989"/> + </array> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">504</int> + <reference key="object" ref="908105787"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">505</int> + <reference key="object" ref="644046920"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">506</int> + <reference key="object" ref="231811626"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">507</int> + <reference key="object" ref="883618387"/> + <reference key="parent" ref="446991534"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">508</int> + <reference key="object" ref="956096989"/> + <array class="NSMutableArray" key="children"> + <reference ref="257099033"/> + <reference ref="551969625"/> + <reference ref="249532473"/> + <reference ref="607364498"/> + <reference ref="508151438"/> + <reference ref="981751889"/> + <reference ref="380031999"/> + <reference ref="825984362"/> + <reference ref="560145579"/> + </array> + <reference key="parent" ref="31516759"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">509</int> + <reference key="object" ref="257099033"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">510</int> + <reference key="object" ref="551969625"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">511</int> + <reference key="object" ref="249532473"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">512</int> + <reference key="object" ref="607364498"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">513</int> + <reference key="object" ref="508151438"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">514</int> + <reference key="object" ref="981751889"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">515</int> + <reference key="object" ref="380031999"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">516</int> + <reference key="object" ref="825984362"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">517</int> + <reference key="object" ref="560145579"/> + <reference key="parent" ref="956096989"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">534</int> + <reference key="object" ref="738670835"/> + <reference key="parent" ref="963351320"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">536</int> + <reference key="object" ref="242877095"/> + <array class="NSMutableArray" key="children"> + <reference ref="502956757"/> + <object class="IBNSLayoutConstraint" id="697106875"> + <reference key="firstItem" ref="242877095"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">229</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="242877095"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">537</int> + <reference key="object" ref="502956757"/> + <reference key="parent" ref="242877095"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">593</int> + <reference key="object" ref="1018085422"/> + <array class="NSMutableArray" key="children"> + <reference ref="867418359"/> + <object class="IBNSLayoutConstraint" id="276483890"> + <reference key="firstItem" ref="1018085422"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">163</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="1018085422"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">594</int> + <reference key="object" ref="867418359"/> + <reference key="parent" ref="1018085422"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">727</int> + <reference key="object" ref="688522420"/> + <array class="NSMutableArray" key="children"> + <reference ref="445379790"/> + <object class="IBNSLayoutConstraint" id="337680523"> + <reference key="firstItem" ref="688522420"/> + <int key="firstAttribute">7</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">183</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="688522420"/> + </object> + <object class="IBNSLayoutConstraint" id="73036966"> + <reference key="firstItem" ref="688522420"/> + <int key="firstAttribute">8</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">22</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="688522420"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">728</int> + <reference key="object" ref="445379790"/> + <reference key="parent" ref="688522420"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">775</int> + <reference key="object" ref="93467784"/> + <array class="NSMutableArray" key="children"> + <reference ref="623922320"/> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">776</int> + <reference key="object" ref="623922320"/> + <reference key="parent" ref="93467784"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">780</int> + <reference key="object" ref="46276252"/> + <array class="NSMutableArray" key="children"> + <reference ref="398179500"/> + <object class="IBNSLayoutConstraint" id="944606221"> + <reference key="firstItem" ref="46276252"/> + <int key="firstAttribute">7</int> + <int key="relation">0</int> + <nil key="secondItem"/> + <int key="secondAttribute">0</int> + <float key="multiplier">1</float> + <object class="IBLayoutConstant" key="constant"> + <double key="value">100</double> + </object> + <float key="priority">1000</float> + <int key="scoringType">3</int> + <float key="scoringTypeFloat">9</float> + <int key="contentType">1</int> + <reference key="containingView" ref="46276252"/> + </object> + </array> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">781</int> + <reference key="object" ref="398179500"/> + <reference key="parent" ref="46276252"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">884</int> + <reference key="object" ref="109434655"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">981</int> + <reference key="object" ref="229833409"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">982</int> + <reference key="object" ref="992363278"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1022</int> + <reference key="object" ref="98217052"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1026</int> + <reference key="object" ref="276483890"/> + <reference key="parent" ref="1018085422"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">979</int> + <reference key="object" ref="166525974"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">985</int> + <reference key="object" ref="646866003"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">977</int> + <reference key="object" ref="697106875"/> + <reference key="parent" ref="242877095"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1099</int> + <reference key="object" ref="337680523"/> + <reference key="parent" ref="688522420"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1093</int> + <reference key="object" ref="578918264"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1100</int> + <reference key="object" ref="73036966"/> + <reference key="parent" ref="688522420"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1098</int> + <reference key="object" ref="432526715"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1168</int> + <reference key="object" ref="670714078"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1167</int> + <reference key="object" ref="833183002"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1095</int> + <reference key="object" ref="591594339"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1166</int> + <reference key="object" ref="891430181"/> + <reference key="parent" ref="439893737"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">1076</int> + <reference key="object" ref="944606221"/> + <reference key="parent" ref="46276252"/> + </object> + </array> + </object> + <dictionary class="NSMutableDictionary" key="flattenedProperties"> + <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1022.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1026.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1076.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1093.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1095.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1098.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1099.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1100.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1166.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1167.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="1168.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="124.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="125.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="130.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="131.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="134.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="136.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="143.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="196.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="197.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="198.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="199.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="200.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="201.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="202.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="204.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="205.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="206.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="207.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="208.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="209.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="210.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="212.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="214.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="215.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="216.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="217.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="218.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="219.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="220.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="221.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="239.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="29.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="295.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="296.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="297.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="298.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="346.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="348.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="349.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="350.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="351.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="354.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="371.IBWindowTemplateEditedContentRect">{{380, 496}, {480, 360}}</string> + <integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/> + <array class="NSMutableArray" key="372.IBNSViewMetadataConstraints"> + <reference ref="109434655"/> + <reference ref="166525974"/> + <reference ref="229833409"/> + <reference ref="992363278"/> + <reference ref="646866003"/> + <reference ref="98217052"/> + <reference ref="578918264"/> + <reference ref="591594339"/> + <reference ref="432526715"/> + <reference ref="891430181"/> + <reference ref="833183002"/> + <reference ref="670714078"/> + </array> + <string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <reference key="372.IBUserGuides" ref="0"/> + <string key="375.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="376.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="377.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="388.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="389.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="390.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="391.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="392.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="393.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="394.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="395.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="396.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="397.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="398.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="399.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="400.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="401.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="402.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="403.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="404.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="405.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="406.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="407.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="408.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="409.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="410.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="411.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="412.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="413.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="414.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="415.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="416.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="417.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="418.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="419.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="451.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="452.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="453.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="454.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="457.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="459.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="465.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="466.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="490.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="491.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="492.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="494.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="496.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="497.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="498.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="499.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="500.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="501.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="502.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="503.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="504.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="505.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="506.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="507.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="508.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="509.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="510.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="511.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="512.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="513.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="514.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="515.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="516.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="517.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="534.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="536.IBNSViewMetadataConstraints"> + <reference ref="697106875"/> + </array> + <boolean value="NO" key="536.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="536.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="537.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="56.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="57.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="593.IBNSViewMetadataConstraints"> + <reference ref="276483890"/> + </array> + <boolean value="NO" key="593.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="593.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="594.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="72.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="727.IBNSViewMetadataConstraints"> + <reference ref="337680523"/> + <reference ref="73036966"/> + </array> + <boolean value="NO" key="727.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="727.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="728.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="73.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="74.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="75.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="77.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <boolean value="NO" key="775.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="775.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="776.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="78.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <array class="NSMutableArray" key="780.IBNSViewMetadataConstraints"> + <reference ref="944606221"/> + </array> + <boolean value="NO" key="780.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/> + <string key="780.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="781.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="79.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="884.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="977.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="979.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="981.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="982.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + <string key="985.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/> + <nil key="activeLocalization"/> + <dictionary class="NSMutableDictionary" key="localizations"/> + <nil key="sourceID"/> + <int key="maxID">1187</int> + </object> + <object class="IBClassDescriber" key="IBDocument.Classes"> + <array class="NSMutableArray" key="referencedPartialClassDescriptions"> + <object class="IBPartialClassDescription"> + <string key="className">LLCrashLoggerMacDelegate</string> + <string key="superclassName">NSObject</string> + <dictionary class="NSMutableDictionary" key="actions"> + <string key="cancel:">id</string> + <string key="remember:">id</string> + <string key="send:">id</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="actionInfosByName"> + <object class="IBActionInfo" key="cancel:"> + <string key="name">cancel:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo" key="remember:"> + <string key="name">remember:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo" key="send:"> + <string key="name">send:</string> + <string key="candidateClassName">id</string> + </object> + </dictionary> + <dictionary class="NSMutableDictionary" key="outlets"> + <string key="crashText">NSTextField</string> + <string key="rememberCheck">NSButton</string> + <string key="window">NSWindow</string> + </dictionary> + <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> + <object class="IBToOneOutletInfo" key="crashText"> + <string key="name">crashText</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo" key="rememberCheck"> + <string key="name">rememberCheck</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo" key="window"> + <string key="name">window</string> + <string key="candidateClassName">NSWindow</string> + </object> + </dictionary> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/LLCrashLoggerMacDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSLayoutConstraint</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">./Classes/NSLayoutConstraint.h</string> + </object> + </object> + </array> + </object> + <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> + <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> + <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> + <integer value="1070" key="NS.object.0"/> + </object> + <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> + <int key="IBDocument.defaultPropertyAccessControl">3</int> + <dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <string key="NSMenuCheckmark">{11, 11}</string> + <string key="NSMenuMixedState">{10, 3}</string> + <string key="NSSwitch">{15, 15}</string> + </dictionary> + <bool key="IBDocument.UseAutolayout">YES</bool> + </data> +</archive> diff --git a/indra/mac_crash_logger/Info.plist b/indra/mac_crash_logger/Info.plist index f48293e825..2ebed11c3f 100644 --- a/indra/mac_crash_logger/Info.plist +++ b/indra/mac_crash_logger/Info.plist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> @@ -10,8 +10,6 @@ <string></string> <key>CFBundleIconFile</key> <string></string> - <key>CFBundleIdentifier</key> - <string>com.secondlife.indra.crashreporter</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> @@ -22,5 +20,9 @@ <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> + <key>NSMainNibFile</key> + <string>CrashReporter</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> </dict> </plist> diff --git a/indra/mac_crash_logger/llcrashloggermac.cpp b/indra/mac_crash_logger/llcrashloggermac.cpp index 8f1c1a2dd0..c5f660ca6e 100644 --- a/indra/mac_crash_logger/llcrashloggermac.cpp +++ b/indra/mac_crash_logger/llcrashloggermac.cpp @@ -27,7 +27,6 @@ #include "llcrashloggermac.h" -#include <Carbon/Carbon.h> #include <iostream> #include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME @@ -38,102 +37,14 @@ #include "lldir.h" #include "llsdserialize.h" -#define MAX_LOADSTRING 100 -const char* const SETTINGS_FILE_HEADER = "version"; -const S32 SETTINGS_FILE_VERSION = 101; - // Windows Message Handlers -BOOL gFirstDialog = TRUE; // Are we currently handling the Send/Don't Send dialog? +BOOL gFirstDialog = TRUE; LLFILE *gDebugFile = NULL; -WindowRef gWindow = NULL; -EventHandlerRef gEventHandler = NULL; std::string gUserNotes = ""; bool gSendReport = false; bool gRememberChoice = false; -IBNibRef nib = NULL; - -OSStatus dialogHandler(EventHandlerCallRef handler, EventRef event, void *userdata) -{ - OSStatus result = eventNotHandledErr; - OSStatus err; - UInt32 evtClass = GetEventClass(event); - UInt32 evtKind = GetEventKind(event); - if((evtClass == kEventClassCommand) && (evtKind == kEventCommandProcess)) - { - HICommand cmd; - err = GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(cmd), NULL, &cmd); - - - - if(err == noErr) - { - //Get the value of the checkbox - ControlID id; - ControlRef checkBox = NULL; - id.signature = 'remb'; - id.id = 0; - err = GetControlByID(gWindow, &id, &checkBox); - - if(err == noErr) - { - if(GetControl32BitValue(checkBox) == kControlCheckBoxCheckedValue) - { - gRememberChoice = true; - } - else - { - gRememberChoice = false; - } - } - switch(cmd.commandID) - { - case kHICommandOK: - { - char buffer[65535]; /* Flawfinder: ignore */ - Size size = sizeof(buffer) - 1; - ControlRef textField = NULL; - - id.signature = 'text'; - id.id = 0; - - err = GetControlByID(gWindow, &id, &textField); - if(err == noErr) - { - // Get the user response text - err = GetControlData(textField, kControlNoPart, kControlEditTextTextTag, size, (Ptr)buffer, &size); - } - if(err == noErr) - { - // Make sure the string is terminated. - buffer[size] = 0; - gUserNotes = buffer; - - llinfos << buffer << llendl; - } - - // Send the report. - - QuitAppModalLoopForWindow(gWindow); - gSendReport = true; - result = noErr; - } - break; - - case kHICommandCancel: - QuitAppModalLoopForWindow(gWindow); - result = noErr; - break; - default: - result = eventNotHandledErr; - } - } - } - - return(result); -} - LLCrashLoggerMac::LLCrashLoggerMac(void) { @@ -146,73 +57,16 @@ LLCrashLoggerMac::~LLCrashLoggerMac(void) bool LLCrashLoggerMac::init(void) { bool ok = LLCrashLogger::init(); - if(!ok) return false; - if(mCrashBehavior != CRASH_BEHAVIOR_ASK) return true; - - // Real UI... - OSStatus err; - - err = CreateNibReference(CFSTR("CrashReporter"), &nib); - - if(err == noErr) - { - err = CreateWindowFromNib(nib, CFSTR("CrashReporter"), &gWindow); - } - - if(err == noErr) - { - // Set focus to the edit text area - ControlRef textField = NULL; - ControlID id; - - id.signature = 'text'; - id.id = 0; - - // Don't set err if any of this fails, since it's non-critical. - if(GetControlByID(gWindow, &id, &textField) == noErr) - { - SetKeyboardFocus(gWindow, textField, kControlFocusNextPart); - } - } - - if(err == noErr) - { - ShowWindow(gWindow); - } - - if(err == noErr) - { - // Set up an event handler for the window. - EventTypeSpec handlerEvents[] = - { - { kEventClassCommand, kEventCommandProcess } - }; - - InstallWindowEventHandler( - gWindow, - NewEventHandlerUPP(dialogHandler), - GetEventTypeCount (handlerEvents), - handlerEvents, - 0, - &gEventHandler); - } - return true; + return ok; } void LLCrashLoggerMac::gatherPlatformSpecificFiles() { - updateApplication("Gathering hardware information..."); } bool LLCrashLoggerMac::mainLoop() { - OSStatus err = noErr; - - if(err == noErr && mCrashBehavior == CRASH_BEHAVIOR_ASK) - { - RunAppModalLoopForWindow(gWindow); - } - else if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND) + if (mCrashBehavior == CRASH_BEHAVIOR_ALWAYS_SEND) { gSendReport = true; } @@ -227,26 +81,11 @@ bool LLCrashLoggerMac::mainLoop() { setUserText(gUserNotes); sendCrashLogs(); - } - - if(gWindow != NULL) - { - DisposeWindow(gWindow); - } - - if(nib != NULL) - { - DisposeNibReference(nib); - } - + } + return true; } -void LLCrashLoggerMac::updateApplication(const std::string& message) -{ - LLCrashLogger::updateApplication(message); -} - bool LLCrashLoggerMac::cleanup() { commonCleanup(); diff --git a/indra/mac_crash_logger/llcrashloggermac.h b/indra/mac_crash_logger/llcrashloggermac.h index 4b1d235f24..6d8f63ecac 100644 --- a/indra/mac_crash_logger/llcrashloggermac.h +++ b/indra/mac_crash_logger/llcrashloggermac.h @@ -38,7 +38,6 @@ public: ~LLCrashLoggerMac(void); virtual bool init(); virtual bool mainLoop(); - virtual void updateApplication(const std::string& message = LLStringUtil::null); virtual bool cleanup(); virtual void gatherPlatformSpecificFiles(); }; diff --git a/indra/newview/llmemoryview.h b/indra/mac_crash_logger/llcrashloggermacdelegate.h index dc4849a9c4..c998a8efe2 100644 --- a/indra/newview/llmemoryview.h +++ b/indra/mac_crash_logger/llcrashloggermacdelegate.h @@ -1,8 +1,8 @@ /** - * @file llmemoryview.h - * @brief LLMemoryView class definition + * @file llcrashloggermacdelegate.h + * @brief Mac OSX crash logger implementation * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * $LicenseInfo:firstyear=2003&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * @@ -24,39 +24,29 @@ * $/LicenseInfo$ */ -#ifndef LL_LLMEMORYVIEW_H -#define LL_LLMEMORYVIEW_H +/* +#import <Cocoa/Cocoa.h> -#include "llview.h" +@interface LLCrashLoggerMacDelegate : NSObject <NSApplicationDelegate> +{ + IBOutlet NSTextField *crashText; + IBOutlet NSButton *rememberCheck; + + NSWindow *_window; + bool mRemember; + +} + +- (void)setWindow:(NSWindow *)newWindow; +- (NSWindow *)window; + +- (IBAction)remember:(id)sender; +- (IBAction)send:(id)sender; +- (IBAction)cancel:(id)sender; + +@property (assign) IBOutlet NSWindow *window; + +@end +*/ -class LLAllocator; -class LLMemoryView : public LLView -{ -public: - struct Params : public LLInitParam::Block<Params, LLView::Params> - { - Params() - { - changeDefault(mouse_opaque, true); - changeDefault(visible, false); - } - }; - LLMemoryView(const LLMemoryView::Params&); - virtual ~LLMemoryView(); - - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); - virtual BOOL handleHover(S32 x, S32 y, MASK mask); - virtual void draw(); - - void refreshProfile(); - -private: - std::vector<LLWString> mLines; - LLAllocator* mAlloc; - BOOL mPaused ; - -}; - -#endif diff --git a/indra/mac_crash_logger/llcrashloggermacdelegate.mm b/indra/mac_crash_logger/llcrashloggermacdelegate.mm new file mode 100644 index 0000000000..b2af76a47c --- /dev/null +++ b/indra/mac_crash_logger/llcrashloggermacdelegate.mm @@ -0,0 +1,75 @@ +/** + * @file llcrashloggermacdelegate.mm + * @brief Mac OSX crash logger implementation + * + * $LicenseInfo:firstyear=2003&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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$ + */ + + +/* +#import "llcrashloggermacdelegate.h" +#include <iostream> + +extern std::string gUserNotes; +extern bool gSendReport; +extern bool gRememberChoice; + +@implementation LLCrashLoggerMacDelegate + +- (void)setWindow:(NSWindow *)window +{ + _window = window; +} + +- (NSWindow *)window +{ + return _window; +} + +- (void)dealloc +{ + [super dealloc]; +} + +std::string* NSToString( NSString *ns_str ) +{ + return ( new std::string([ns_str UTF8String]) ); +} + +- (IBAction)remember:(id)sender +{ + gRememberChoice = [rememberCheck state]; +} + +- (IBAction)send:(id)sender +{ + std::string* user_input = NSToString([crashText stringValue]); + gUserNotes = *user_input; + gSendReport = true; +} + +- (IBAction)cancel:(id)sender +{ + [ _window close]; +} +@end +*/
\ No newline at end of file diff --git a/indra/mac_crash_logger/mac_crash_logger.cpp b/indra/mac_crash_logger/mac_crash_logger.cpp index 6571b35241..6add74556f 100644 --- a/indra/mac_crash_logger/mac_crash_logger.cpp +++ b/indra/mac_crash_logger/mac_crash_logger.cpp @@ -26,11 +26,12 @@ #include "linden_common.h" #include "llcrashloggermac.h" +#include "indra_constants.h" +#include <iostream> + int main(int argc, char **argv) { - llinfos << "Starting crash reporter." << llendl; - LLCrashLoggerMac app; app.parseCommandOptions(argc, argv); @@ -39,9 +40,16 @@ int main(int argc, char **argv) llwarns << "Unable to initialize application." << llendl; return 1; } + if (app.getCrashBehavior() != CRASH_BEHAVIOR_ALWAYS_SEND) + { +// return NSApplicationMain(argc, (const char **)argv); + } app.mainLoop(); + app.cleanup(); + llinfos << "Crash reporter finished normally." << llendl; + return 0; } diff --git a/indra/mac_updater/mac_updater.h b/indra/mac_updater/mac_updater.h new file mode 100644 index 0000000000..f65b481cb6 --- /dev/null +++ b/indra/mac_updater/mac_updater.h @@ -0,0 +1,91 @@ +/** + * @file mac_updater.h + * @brief + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, 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 <iostream> +#include <pthread.h> +#include <boost/filesystem.hpp> + +#ifndef LL_MAC_UPDATER_H +#define LL_MAC_UPDATER_H +extern bool gCancelled; +extern bool gFailure; + +void *updatethreadproc(void*); +std::string* walkParents( signed int depth, std::string* childpath ); +std::string* getUserTrashFolder(); + +void setProgress(int cur, int max); +void setProgressText(const std::string& str); +void sendProgress(int cur, int max, std::string str); +void sendDone(); +void sendStopAlert(); + +bool isFSRefViewerBundle(const std::string& targetURL); +bool isDirWritable(const std::string& dir_name); +bool mkTempDir(boost::filesystem::path& temp_dir); +bool copyDir(const std::string& src_dir, const std::string& dest_dir); + +int oldmain(); + +class LLMacUpdater +{ +public: + LLMacUpdater(); + void doUpdate(); + const std::string walkParents( signed int depth, const std::string& childpath ); + bool isApplication(const std::string& app_str); + void filterFile(const char* filename); + + bool findAppBundleOnDiskImage(const boost::filesystem::path& dir_path, + boost::filesystem::path& path_found); + + bool verifyDirectory(const boost::filesystem::path* directory, bool isParent=false); + bool getViewerDir(boost::filesystem::path &app_dir); + bool downloadDMG(const std::string& dmgName, boost::filesystem::path* temp_dir); + bool doMount(const std::string& dmgName, char* deviceNode, const boost::filesystem::path& temp_dir); + bool moveApplication (const boost::filesystem::path& app_dir, + const boost::filesystem::path& temp_dir, + boost::filesystem::path& aside_dir); + bool doInstall(const boost::filesystem::path& app_dir, + const boost::filesystem::path& temp_dir, + boost::filesystem::path& mount_dir, + bool replacingTarget); + void* updatethreadproc(void*); + static void* sUpdatethreadproc(void*); + +public: + std::string *mUpdateURL; + std::string *mProductName; + std::string *mBundleID; + std::string *mDmgFile; + std::string *mMarkerPath; + std::string *mApplicationPath; + static LLMacUpdater *sInstance; + +}; +#endif + + diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 5fb84756ee..0cfb810906 100644 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -48,18 +48,37 @@ private: set_volume_func_t mSetVolumeFunc; set_mute_func_t mSetMuteFunc; + // tests if running on Vista, 7, 8 + once in CTOR + bool isWindowsVistaOrHigher(); + F32 mVolume; F32 mPan; + bool mSystemIsVistaOrHigher; }; + +bool VolumeCatcherImpl::isWindowsVistaOrHigher() +{ + OSVERSIONINFO osvi; + ZeroMemory(&osvi, sizeof(OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&osvi); + return osvi.dwMajorVersion >= 6; +} + VolumeCatcherImpl::VolumeCatcherImpl() -: mVolume(1.0f), // default volume is max - mPan(0.f) // default pan is centered +: mVolume(1.0f), // default volume is max + mPan(0.f) // default pan is centered { - HMODULE handle = ::LoadLibrary(L"winmm.dll"); - if(handle) + mSystemIsVistaOrHigher = isWindowsVistaOrHigher(); + + if ( ! mSystemIsVistaOrHigher ) { - mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); - mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute"); + HMODULE handle = ::LoadLibrary(L"winmm.dll"); + if(handle) + { + mSetVolumeFunc = (set_volume_func_t)::GetProcAddress(handle, "setPluginVolume"); + mSetMuteFunc = (set_mute_func_t)::GetProcAddress(handle, "setPluginMute"); + } } } @@ -67,18 +86,29 @@ VolumeCatcherImpl::~VolumeCatcherImpl() { } - void VolumeCatcherImpl::setVolume(F32 volume) { mVolume = volume; - if (mSetMuteFunc) + if ( mSystemIsVistaOrHigher ) { - mSetMuteFunc(volume == 0.f); + // set both left/right to same volume + // TODO: use pan value to set independently + DWORD left_channel = (DWORD)(mVolume * 65535.0f); + DWORD right_channel = (DWORD)(mVolume * 65535.0f); + DWORD hw_volume = left_channel << 16 | right_channel; + ::waveOutSetVolume(NULL, hw_volume); } - if (mSetVolumeFunc) + else { - mSetVolumeFunc(mVolume); + if (mSetMuteFunc) + { + mSetMuteFunc(volume == 0.f); + } + if (mSetVolumeFunc) + { + mSetVolumeFunc(mVolume); + } } } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index dff2c04fbc..e93d73ad0e 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -35,6 +35,7 @@ include(LLXML) include(LScript) include(Linking) include(NDOF) +include(NVAPI) include(GooglePerfTools) include(TemplateCheck) include(UI) @@ -336,7 +337,6 @@ set(viewer_SOURCE_FILES llmarketplacenotifications.cpp llmediactrl.cpp llmediadataclient.cpp - llmemoryview.cpp llmenuoptionpathfindingrebakenavmesh.cpp llmeshrepository.cpp llmimetypes.cpp @@ -913,7 +913,6 @@ set(viewer_HEADER_FILES llmarketplacenotifications.h llmediactrl.h llmediadataclient.h - llmemoryview.h llmenuoptionpathfindingrebakenavmesh.h llmeshrepository.h llmimetypes.h @@ -1819,6 +1818,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLCOREHTTP_LIBRARIES} ${LLCOMMON_LIBRARIES} ${NDOF_LIBRARY} + ${NVAPI_LIBRARY} ${HUNSPELL_LIBRARY} ${viewer_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} @@ -1867,7 +1867,6 @@ if (LINUX) set(COPY_INPUT_DEPENDENCIES ${VIEWER_BINARY_NAME} linux-crash-logger - linux-updater SLPlugin media_plugin_webkit media_plugin_gstreamer010 diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 6120f22ba4..0b346286c8 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -271,7 +271,8 @@ ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral - +ATTACH_NECK Passed to llAttachToAvatar to attach task to neck +ATTACH_AVATAR_CENTER Passed to llAttachToAvatar to attach task to avatar center LAND_LEVEL Passed to llModifyLand to level terrain LAND_RAISE Passed to llModifyLand to raise terrain LAND_LOWER Passed to llModifyLand to lower terrain diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 64122bbb6c..92a241857e 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -48,6 +48,6 @@ --> </array> </map> - </array> + </array> </map> </llsd> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7deb1284b9..b302f5c9b9 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5168,7 +5168,7 @@ <key>Comment</key> <string>Center the focal point of the minimap.</string> <key>Persist</key> - <integer>0</integer> + <integer>1</integer> <key>Type</key> <string>Boolean</string> <key>Value</key> @@ -8128,6 +8128,18 @@ <integer>0</integer> </map> + <key>RenderDepthOfFieldInEditMode</key> + <map> + <key>Comment</key> + <string>Whether to use depth of field effect when in edit mode</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>CameraDoFResScale</key> <map> <key>Comment</key> @@ -14070,6 +14082,18 @@ <real>1.0</real> </array> </map> + + <key>HideUIControls</key> + <map> + <key>Comment</key> + <string>Hide all menu items and buttons</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>SimulateFBOFailure</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/objects/previewF.glsl b/indra/newview/app_settings/shaders/class1/objects/previewF.glsl new file mode 100644 index 0000000000..284da3d0ac --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/objects/previewF.glsl @@ -0,0 +1,41 @@ +/** + * @file previewF.glsl + * + * $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$ + */ + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2D diffuseMap; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; + +void main() +{ + vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color; + frag_color = color; +} diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl index 5dcfa87066..7f3f84398b 100644 --- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl @@ -32,12 +32,51 @@ ATTRIBUTE vec3 position; ATTRIBUTE vec3 normal; ATTRIBUTE vec2 texcoord0; +uniform vec4 color; + VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +uniform vec4 light_position[8]; +uniform vec3 light_direction[8]; +uniform vec3 light_attenuation[8]; +uniform vec3 light_diffuse[8]; + +//=================================================================================================== +//declare these here explicitly to separate them from atmospheric lighting elsewhere to work around +//drivers that are picky about functions being declared but not defined even if they aren't called +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + + +float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight) +{ + //get light vector + vec3 lv = lp.xyz-v; + + //get distance + float d = length(lv); + + //normalize light vector + lv *= 1.0/d; + + //distance attenuation + float da = clamp(1.0/(la * d), 0.0, 1.0); + + // spotlight coefficient. + float spot = max(dot(-ln, lv), is_pointlight); + da *= spot*spot; // GL_SPOT_EXPONENT=2 + + //angular attenuation + da *= calcDirectionalLight(n, lv); + + return da; +} +//==================================================================================================== -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); -void calcAtmospherics(vec3 inPositionEye); void main() { @@ -45,13 +84,15 @@ void main() vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0)); gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - + vec3 norm = normalize(normal_matrix * normal); - calcAtmospherics(pos.xyz); - - vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.)); - vertex_color = color; + vec4 col = vec4(0,0,0,1); - + // Collect normal lights (need to be divided by two, as we later multiply by 2) + col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); + col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); + col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + + vertex_color = col*color; } diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index e877e15053..4030324ecb 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -97,6 +97,9 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 @@ -126,13 +129,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -153,11 +159,74 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) +// +list Mid +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) // list High RenderAnisotropic 1 1 @@ -180,9 +249,43 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 WLSkyDetail 1 48 RenderFSAASamples 1 2 + // // Ultra graphics (REALLY PURTY!) // @@ -227,57 +330,36 @@ RenderDeferredSSAO 1 0 // list Class0 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 // // Class 1 Hardware // list Class1 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // // Class 2 Hardware // list Class2 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // -// Class 3 Hardware (deferred enabled) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 0 // -// Class 4 Hardware (deferred + SSAO) +// Class 4 Hardware // list Class4 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 // -// Class 5 Hardware (deferred + SSAO + shadows) +// Class 5 Hardware // list Class5 RenderVBOEnable 1 1 -RenderShadowDetail 1 2 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 - // // VRAM > 512MB diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 5699bd9c8a..6d5284c602 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -94,6 +94,9 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 @@ -122,13 +125,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -137,9 +143,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 -RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 @@ -149,11 +155,74 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) +// +list Mid +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) // list High RenderAnisotropic 1 1 @@ -164,9 +233,39 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 @@ -176,6 +275,9 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 WLSkyDetail 1 48 RenderFSAASamples 1 2 @@ -223,56 +325,37 @@ RenderDeferredSSAO 1 0 // list Class0 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 // // Class 1 Hardware // list Class1 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // // Class 2 Hardware // list Class2 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // -// Class 3 Hardware (deferred enabled) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 0 // -// Class 4 Hardware (deferred + SSAO) +// Class 4 Hardware // list Class4 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 // -// Class 5 Hardware (deferred + SSAO + shadows) +// Class 5 Hardware // list Class5 RenderVBOEnable 1 1 -RenderShadowDetail 1 2 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 + // // VRAM > 512MB // diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 3a91f19c58..1c0d45c11b 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 34 +version 35 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -96,6 +96,9 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 @@ -124,13 +127,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -139,9 +145,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 -RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 @@ -151,11 +157,74 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) +// +list Mid +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) // list High RenderAnisotropic 1 1 @@ -166,9 +235,39 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 @@ -178,9 +277,13 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 WLSkyDetail 1 48 RenderFSAASamples 1 2 + // // Ultra graphics (REALLY PURTY!) // @@ -216,65 +319,41 @@ RenderFSAASamples 1 2 // list Unknown RenderVBOEnable 1 0 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 // // Class 0 Hardware (just old) // list Class0 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 // // Class 1 Hardware // list Class1 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // // Class 2 Hardware // list Class2 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // -// Class 3 Hardware (deferred enabled) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 0 - // -// Class 4 Hardware (deferred + SSAO) +// Class 4 Hardware // list Class4 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 // -// Class 5 Hardware (deferred + SSAO + shadows) +// Class 5 Hardware // list Class5 RenderVBOEnable 1 1 -RenderShadowDetail 1 2 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 // // No Pixel Shaders available diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index ad16e2533b..68e09d010e 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -96,6 +96,9 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 @@ -124,13 +127,16 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// Mid Graphics Settings +// Medium Low Graphics Settings // -list Mid +list LowMid RenderAnisotropic 1 0 RenderAvatarCloth 1 0 RenderAvatarLODFactor 1 0.5 @@ -139,9 +145,9 @@ RenderAvatarVP 1 1 RenderFarClip 1 96 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 8 -RenderLocalLights 1 1 RenderMaxPartCount 1 2048 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 1.0 @@ -151,11 +157,74 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 WLSkyDetail 1 48 RenderFSAASamples 1 0 // -// High Graphics Settings (purty) +// Medium Graphics Settings (standard) +// +list Mid +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 0 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// Medium High Graphics Settings (deferred enabled) +// +list MidHigh +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 +RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 0 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Graphics Settings (deferred + SSAO) // list High RenderAnisotropic 1 1 @@ -166,9 +235,39 @@ RenderAvatarVP 1 1 RenderFarClip 1 128 RenderFlexTimeFactor 1 1.0 RenderGlowResolutionPow 1 9 +RenderMaxPartCount 1 4096 +RenderObjectBump 1 1 RenderLocalLights 1 1 +RenderReflectionDetail 1 0 +RenderTerrainDetail 1 1 +RenderTerrainLODFactor 1 2.0 +RenderTransparentWater 1 1 +RenderTreeLODFactor 1 0.5 +RenderUseImpostors 1 1 +RenderVolumeLODFactor 1 1.125 +VertexShaderEnable 1 1 +WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 0 +WLSkyDetail 1 48 +RenderFSAASamples 1 2 + +// +// High Ultra Graphics Settings (deferred + SSAO + shadows) +// +list HighUltra +RenderAnisotropic 1 1 +RenderAvatarCloth 1 0 +RenderAvatarLODFactor 1 1.0 +RenderAvatarPhysicsLODFactor 1 1.0 +RenderAvatarVP 1 1 +RenderFarClip 1 128 +RenderFlexTimeFactor 1 1.0 +RenderGlowResolutionPow 1 9 RenderMaxPartCount 1 4096 RenderObjectBump 1 1 +RenderLocalLights 1 1 RenderReflectionDetail 1 0 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 @@ -178,6 +277,9 @@ RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 +RenderDeferred 1 1 +RenderDeferredSSAO 1 1 +RenderShadowDetail 1 2 WLSkyDetail 1 48 RenderFSAASamples 1 2 @@ -216,65 +318,42 @@ RenderFSAASamples 1 2 // list Unknown RenderVBOEnable 1 0 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 // // Class 0 Hardware (just old) // list Class0 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 // // Class 1 Hardware // list Class1 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // // Class 2 Hardware // list Class2 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 0 -RenderDeferredSSAO 1 0 - // -// Class 3 Hardware (deferred enabled) +// Class 3 Hardware // list Class3 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 0 // // Class 4 Hardware (deferred + SSAO) // list Class4 RenderVBOEnable 1 1 -RenderShadowDetail 1 0 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 // -// Class 5 Hardware (deferred + SSAO + shadows) +// Class 5 Hardware // list Class5 RenderVBOEnable 1 1 -RenderShadowDetail 1 2 -RenderDeferred 1 1 -RenderDeferredSSAO 1 1 // // VRAM > 512MB diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 751b73e1eb..9025c7af8b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -35,6 +35,7 @@ #include "llfloaterreg.h" #include "llhudmanager.h" #include "lljoystickbutton.h" +#include "llmoveview.h" #include "llselectmgr.h" #include "llsmoothstep.h" #include "lltoolmgr.h" @@ -2113,6 +2114,11 @@ void LLAgentCamera::changeCameraToDefault() { changeCameraToThirdPerson(); } + if (gSavedSettings.getBOOL("HideUIControls")) + { + gViewerWindow->setUIVisibility(false); + LLPanelStandStopFlying::getInstance()->setVisible(false); + } } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 30f82926f1..7331b93810 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -731,10 +731,6 @@ bool LLAppViewer::init() mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::initClass(); -#endif - // Initialize the non-LLCurl libcurl library. Should be called // before consumers (LLTextureFetch). mAppCoreHttp.init(); @@ -808,9 +804,6 @@ bool LLAppViewer::init() ////////////////////////////////////////////////////////////////////////////// // *FIX: The following code isn't grouped into functions yet. - // Statistics / debug timer initialization - init_statistics(); - // // Various introspection concerning the libs we're using - particularly // the libs involved in getting to a full login screen. @@ -1037,11 +1030,20 @@ bool LLAppViewer::init() } #if LL_WINDOWS - if (gGLManager.mIsIntel && - LLFeatureManager::getInstance()->getGPUClass() > 0 && - gGLManager.mGLVersion <= 3.f) + if (gGLManager.mGLVersion < LLFeatureManager::getInstance()->getExpectedGLVersion()) { - LLNotificationsUtil::add("IntelOldDriver"); + if (gGLManager.mIsIntel) + { + LLNotificationsUtil::add("IntelOldDriver"); + } + else if (gGLManager.mIsNVIDIA) + { + LLNotificationsUtil::add("NVIDIAOldDriver"); + } + else if (gGLManager.mIsATI) + { + LLNotificationsUtil::add("AMDOldDriver"); + } } #endif @@ -1196,9 +1198,10 @@ static LLFastTimer::DeclareTimer FTM_SERVICE_CALLBACK("Callback"); static LLFastTimer::DeclareTimer FTM_AGENT_AUTOPILOT("Autopilot"); static LLFastTimer::DeclareTimer FTM_AGENT_UPDATE("Update"); +LLFastTimer::DeclareTimer FTM_FRAME("Frame", true); + bool LLAppViewer::mainLoop() { - LLMemType mt1(LLMemType::MTYPE_MAIN); mMainloopTimeout = new LLWatchdogTimeout(); //------------------------------------------- @@ -1234,7 +1237,8 @@ bool LLAppViewer::mainLoop() // Handle messages while (!LLApp::isExiting()) { - LLFastTimer::nextFrame(); // Should be outside of any timer instances + LLFastTimer _(FTM_FRAME); + LLFastTimer::nextFrame(); //clear call stack records llclearcallstacks; @@ -1298,7 +1302,6 @@ bool LLAppViewer::mainLoop() && (gHeadlessClient || !gViewerWindow->getShowProgress()) && !gFocusMgr.focusLocked()) { - LLMemType mjk(LLMemType::MTYPE_JOY_KEY); joystick->scanJoystick(); gKeyboard->scanKeyboard(); } @@ -1312,7 +1315,6 @@ bool LLAppViewer::mainLoop() if (gAres != NULL && gAres->isInitialized()) { - LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP); pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(FTM_PUMP); { @@ -1362,7 +1364,6 @@ bool LLAppViewer::mainLoop() // Sleep and run background threads { - LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); // yield some time to the os based on command line option @@ -1939,10 +1940,6 @@ bool LLAppViewer::cleanup() LLMetricPerformanceTesterBasic::cleanClass() ; -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::cleanupClass(); -#endif - llinfos << "Cleaning up Media and Textures" << llendflush; //Note: @@ -3222,8 +3219,6 @@ void LLAppViewer::writeSystemInfo() LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL; LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL; - LL_INFOS("SystemInfo") << "Timers: " << LLFastTimer::sClockType << LL_ENDL; - writeDebugInfo(); // Save out debug_info.log early, in case of crash. } @@ -4207,7 +4202,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager"); /////////////////////////////////////////////////////// void LLAppViewer::idle() { - LLMemType mt_idle(LLMemType::MTYPE_IDLE); pingMainloopTimeout("Main:Idle"); // Update frame timers @@ -4320,7 +4314,6 @@ void LLAppViewer::idle() // of SEND_STATS_PERIOD so that the initial stats report will // be sent immediately. static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); - reset_statistics(); // Update session stats every large chunk of time // *FIX: (???) SAMANTHA @@ -4341,11 +4334,6 @@ void LLAppViewer::idle() llinfos << "Dead object updates: " << gObjectList.mNumDeadObjectUpdates << llendl; gObjectList.mNumDeadObjectUpdates = 0; } - if (gObjectList.mNumUnknownKills) - { - llinfos << "Kills on unknown objects: " << gObjectList.mNumUnknownKills << llendl; - gObjectList.mNumUnknownKills = 0; - } if (gObjectList.mNumUnknownUpdates) { llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl; @@ -4380,7 +4368,7 @@ void LLAppViewer::idle() idle_afk_check(); // Update statistics for this frame - update_statistics(gFrameCount); + update_statistics(); } //////////////////////////////////////// @@ -4806,7 +4794,6 @@ static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit" void LLAppViewer::idleNetwork() { - LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK); pingMainloopTimeout("idleNetwork"); gObjectList.mNumNewObjects = 0; diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 7a474f9122..7563d672e3 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -42,6 +42,9 @@ class LLTextureFetch; class LLWatchdogTimeout; class LLUpdaterService; +extern LLFastTimer::DeclareTimer FTM_FRAME; + + class LLAppViewer : public LLApp { public: diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index e8d8efdc0a..8695652168 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -31,7 +31,6 @@ #include "llcommandlineparser.h" #include "lldiriterator.h" -#include "llmemtype.h" #include "llurldispatcher.h" // SLURL from other app instance #include "llviewernetwork.h" #include "llviewercontrol.h" @@ -71,8 +70,6 @@ static void exceptionTerminateHandler() int main( int argc, char **argv ) { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - #if LL_SOLARIS && defined(__sparc) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index c2916717bd..4d340cafa9 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -33,8 +33,6 @@ #include "llappviewermacosx.h" #include "llcommandlineparser.h" -#include "llmemtype.h" - #include "llviewernetwork.h" #include "llviewercontrol.h" #include "llmd5.h" @@ -67,8 +65,6 @@ namespace int main( int argc, char **argv ) { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - #if LL_SOLARIS && defined(__sparc) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 11790d562f..8326be433e 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -32,7 +32,6 @@ #include "llappviewerwin32.h" -#include "llmemtype.h" #include "llwindowwin32.h" // *FIX: for setting gIconResource. #include "llgl.h" @@ -47,6 +46,11 @@ #include "llviewercontrol.h" #include "lldxhardware.h" +#include "nvapi/nvapi.h" +#include "nvapi/NvApiDriverSettings.h" + +#include <stdlib.h> + #include "llweb.h" #include "llsecondlifeurls.h" @@ -61,6 +65,7 @@ #include "llwindebug.h" #endif + // *FIX:Mani - This hack is to fix a linker issue with libndofdev.lib // The lib was compiled under VS2005 - in VS2003 we need to remap assert #ifdef LL_DEBUG @@ -76,6 +81,20 @@ extern "C" { const std::string LLAppViewerWin32::sWindowClass = "Second Life"; +/* + This function is used to print to the command line a text message + describing the nvapi error and quits +*/ +void nvapi_error(NvAPI_Status status) +{ + NvAPI_ShortString szDesc = {0}; + NvAPI_GetErrorMessage(status, szDesc); + llwarns << szDesc << llendl; + + //should always trigger when asserts are enabled + llassert(status == NVAPI_OK); +} + // Create app mutex creates a unique global windows object. // If the object can be created it returns true, otherwise // it returns false. The false result can be used to determine @@ -97,6 +116,79 @@ bool create_app_mutex() return result; } +void ll_nvapi_init(NvDRSSessionHandle hSession) +{ + // (2) load all the system settings into the session + NvAPI_Status status = NvAPI_DRS_LoadSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + 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()); + status = NvAPI_DRS_SetCurrentGlobalProfile(hSession, profile_name); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + // (3) Obtain the current profile. + NvDRSProfileHandle hProfile = 0; + status = NvAPI_DRS_GetCurrentGlobalProfile(hSession, &hProfile); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + // load settings for querying + status = NvAPI_DRS_LoadSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + //get the preferred power management mode for Second Life + NVDRS_SETTING drsSetting = {0}; + drsSetting.version = NVDRS_SETTING_VER; + status = NvAPI_DRS_GetSetting(hSession, hProfile, PREFERRED_PSTATE_ID, &drsSetting); + if (status == NVAPI_SETTING_NOT_FOUND) + { //only override if the user hasn't specifically set this setting + // (4) Specify that we want the VSYNC disabled setting + // first we fill the NVDRS_SETTING struct, then we call the function + drsSetting.version = NVDRS_SETTING_VER; + drsSetting.settingId = PREFERRED_PSTATE_ID; + drsSetting.settingType = NVDRS_DWORD_TYPE; + drsSetting.u32CurrentValue = PREFERRED_PSTATE_PREFER_MAX; + status = NvAPI_DRS_SetSetting(hSession, hProfile, &drsSetting); + if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + } + else if (status != NVAPI_OK) + { + nvapi_error(status); + return; + } + + + + // (5) Now we apply (or save) our changes to the system + status = NvAPI_DRS_SaveSettings(hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + } +} + //#define DEBUGGING_SEH_FILTER 1 #if DEBUGGING_SEH_FILTER # define WINMAIN DebuggingWinMain @@ -117,8 +209,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, #endif // _DEBUG #endif // INCLUDE_VLD - LLMemType mt1(LLMemType::MTYPE_STARTUP); - const S32 MAX_HEAPS = 255; DWORD heap_enable_lfh_error[MAX_HEAPS]; S32 num_heaps = 0; @@ -168,6 +258,27 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, return -1; } + NvAPI_Status status; + + // Initialize NVAPI + status = NvAPI_Initialize(); + NvDRSSessionHandle hSession = 0; + + if (status == NVAPI_OK) + { + // Create the session handle to access driver settings + status = NvAPI_DRS_CreateSession(&hSession); + if (status != NVAPI_OK) + { + nvapi_error(status); + } + else + { + //override driver setting as needed + ll_nvapi_init(hSession); + } + } + // Have to wait until after logging is initialized to display LFH info if (num_heaps > 0) { @@ -235,6 +346,15 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LLAppViewer::sUpdaterInfo = NULL ; } + + + // (NVAPI) (6) We clean up. This is analogous to doing a free() + if (hSession) + { + NvAPI_DRS_DestroySession(hSession); + hSession = 0; + } + return 0; } diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index 0f1ce2bcd0..d71cf290d6 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -536,6 +536,46 @@ LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::addList(const LLSD& return result; } +LLAutoReplaceSettings::AddListResult LLAutoReplaceSettings::replaceList(const LLSD& newList) +{ + AddListResult result = AddListInvalidList; + if ( listIsValid( newList ) ) + { + std::string listName = newList[AUTOREPLACE_LIST_NAME].asString(); + bool listFound = false; + S32 search_index; + LLSD targetList; + // The following is working around the fact that LLSD arrays containing maps also seem to have undefined entries... see LLSD-30 + for ( search_index = 0, targetList = mLists[0]; + !listFound && search_index < mLists.size(); + search_index += 1, targetList = mLists[search_index] + ) + { + if ( targetList.isMap() ) + { + if ( listNameMatches( targetList, listName) ) + { + LL_DEBUGS("AutoReplace")<<"list to replace found at "<<search_index<<LL_ENDL; + mLists.erase(search_index); + mLists.insert(search_index, newList); + listFound = true; + result = AddListOk; + } + } + } + + if ( ! listFound ) + { + LL_WARNS("AutoReplace") << "attempt to replace unconfigured list" << LL_ENDL; + } + } + else + { + LL_WARNS("AutoReplace") << "attempt to add invalid list" << LL_ENDL; + } + return result; +} + bool LLAutoReplaceSettings::removeReplacementList(std::string listName) { bool found = false; diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h index 30b1fd2c65..f720cc4eda 100644 --- a/indra/newview/llautoreplace.h +++ b/indra/newview/llautoreplace.h @@ -67,6 +67,9 @@ class LLAutoReplaceSettings /// Inserts a new list at the end of the priority order AddListResult addList(const LLSD& newList); + /// Inserts a list in place of an existing list of the same name + AddListResult replaceList(const LLSD& newList); + /// Removes the named list, @returns false if not found bool removeReplacementList(std::string listName); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 84e73e96fa..3e1fa1e49b 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -110,7 +110,9 @@ public: mFrom(), mSessionID(), mMinUserNameWidth(0), - mUserNameFont(NULL) + mUserNameFont(NULL), + mUserNameTextBox(NULL), + mTimeBoxTextBox(NULL) {} static LLChatHistoryHeader* createInstance(const std::string& file_name) @@ -187,6 +189,9 @@ public: setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this)); setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this)); + mUserNameTextBox = getChild<LLTextBox>("user_name"); + mTimeBoxTextBox = getChild<LLTextBox>("time_box"); + return LLPanel::postBuild(); } @@ -377,8 +382,8 @@ public: /*virtual*/ void draw() { - LLTextBox* user_name = getChild<LLTextBox>("user_name"); - LLTextBox* time_box = getChild<LLTextBox>("time_box"); + LLTextBox* user_name = mUserNameTextBox; //getChild<LLTextBox>("user_name"); + LLTextBox* time_box = mTimeBoxTextBox; //getChild<LLTextBox>("time_box"); LLRect user_name_rect = user_name->getRect(); S32 user_name_width = user_name_rect.getWidth(); @@ -568,6 +573,8 @@ protected: S32 mMinUserNameWidth; const LLFontGL* mUserNameFont; + LLTextBox* mUserNameTextBox; + LLTextBox* mTimeBoxTextBox; }; LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL; diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 29b1d23d7d..aeecf054b8 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -30,7 +30,6 @@ // library includes #include "llfasttimerview.h" -#include "llmemoryview.h" #include "llconsole.h" #include "lltextureview.h" #include "llresmgr.h" @@ -38,7 +37,6 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llappviewer.h" -#include "llmemoryview.h" #include "llsceneview.h" #include "llviewertexture.h" #include "llfloaterreg.h" @@ -103,13 +101,6 @@ void LLDebugView::init() r.setLeftTopAndSize(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f), (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f)); - LLMemoryView::Params mp; - mp.name("memory"); - mp.rect(r); - mp.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT); - mp.visible(false); - mMemoryView = LLUICtrlFactory::create<LLMemoryView>(mp); - addChild(mMemoryView); r.set(150, rect.getHeight() - 50, 820, 100); LLTextureView::Params tvp; diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 4894d63e13..d041baea90 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -254,11 +254,17 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep) return count; } +static LLFastTimer::DeclareTimer FTM_ALLOCATE_FACE("Allocate Face", true); + LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - LLFace *face = new LLFace(this, mVObjp); + LLFace *face; + { + LLFastTimer t(FTM_ALLOCATE_FACE); + face = new LLFace(this, mVObjp); + } + if (!face) llerrs << "Allocating new Face: " << mFaces.size() << llendl; if (face) @@ -280,10 +286,12 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep) LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep) { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - LLFace *face; - face = new LLFace(this, mVObjp); + + { + LLFastTimer t(FTM_ALLOCATE_FACE); + face = new LLFace(this, mVObjp); + } face->setTEOffset(mFaces.size()); face->setTexture(texturep); @@ -516,6 +524,7 @@ F32 LLDrawable::updateXform(BOOL undamped) dist_squared = dist_vec_squared(new_pos, target_pos); LLQuaternion new_rot = nlerp(lerp_amt, old_rot, target_rot); + // FIXME: This can be negative! It is be possible for some rots to 'cancel out' pos or size changes. dist_squared += (1.f - dot(new_rot, target_rot)) * 10.f; LLVector3 new_scale = lerp(old_scale, target_scale, lerp_amt); @@ -539,6 +548,15 @@ F32 LLDrawable::updateXform(BOOL undamped) } } } + else + { + // The following fixes MAINT-1742 but breaks vehicles similar to MAINT-2275 + // dist_squared = dist_vec_squared(old_pos, target_pos); + + // The following fixes MAINT-2247 but causes MAINT-2275 + //dist_squared += (1.f - dot(old_rot, target_rot)) * 10.f; + //dist_squared += dist_vec_squared(old_scale, target_scale); + } LLVector3 vec = mCurrentScale-target_scale; @@ -764,8 +782,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) void LLDrawable::updateTexture() { - LLMemType mt(LLMemType::MTYPE_DRAWABLE); - if (isDead()) { llwarns << "Dead drawable updating texture!" << llendl; diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index b1e32bdb5b..4608d16fec 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -38,7 +38,6 @@ #include "llvector4a.h" #include "llquaternion.h" #include "xform.h" -#include "llmemtype.h" #include "lldarray.h" #include "llviewerobject.h" #include "llrect.h" @@ -87,7 +86,6 @@ public: } LLDrawable() { init(); } - MEM_TYPE_NEW(LLMemType::MTYPE_DRAWABLE); void markDead(); // Mark this drawable as dead BOOL isDead() const { return isState(DEAD); } diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 730ad1a364..38268b102b 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -134,6 +134,16 @@ void LLDrawPoolAvatar::prerender() { sBufferUsage = GL_STREAM_DRAW_ARB; } + + if (!mDrawFace.empty()) + { + const LLFace *facep = mDrawFace[0]; + if (facep && facep->getDrawable()) + { + LLVOAvatar* avatarp = (LLVOAvatar *)facep->getDrawable()->getVObj().get(); + updateRiggedVertexBuffers(avatarp); + } + } } LLMatrix4& LLDrawPoolAvatar::getModelView() @@ -1250,6 +1260,65 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) } } +void LLDrawPoolAvatar::getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face) +{ + face->setGeomIndex(0); + face->setIndicesIndex(0); + + //rigged faces do not batch textures + face->setTextureIndex(255); + + if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) + { //make a new buffer + if (sShaderLevel > 0) + { + buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB); + } + else + { + buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB); + } + buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true); + } + else + { //resize existing buffer + buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices); + } + + face->setSize(vol_face.mNumVertices, vol_face.mNumIndices); + face->setVertexBuffer(buffer); + + U16 offset = 0; + + LLMatrix4 mat_vert = skin->mBindShapeMatrix; + glh::matrix4f m((F32*) mat_vert.mMatrix); + m = m.inverse().transpose(); + + F32 mat3[] = + { m.m[0], m.m[1], m.m[2], + m.m[4], m.m[5], m.m[6], + m.m[8], m.m[9], m.m[10] }; + + LLMatrix3 mat_normal(mat3); + + //let getGeometryVolume know if alpha should override shiny + U32 type = gPipeline.getPoolTypeFromTE(face->getTextureEntry(), face->getTexture()); + + if (type == LLDrawPool::POOL_ALPHA) + { + face->setPoolType(LLDrawPool::POOL_ALPHA); + } + else + { + face->setPoolType(LLDrawPool::POOL_AVATAR); + } + + //llinfos << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << llendl; + face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true); + + buffer->flush(); +} + void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* face, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face) { LLVector4a* weight = vol_face.mWeights; @@ -1269,57 +1338,27 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* buffer->getNumIndices() != vol_face.mNumIndices || (drawable && drawable->isState(LLDrawable::REBUILD_ALL))) { - face->setGeomIndex(0); - face->setIndicesIndex(0); - - if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable()) - { //make a new buffer - if (sShaderLevel > 0) + if (drawable && drawable->isState(LLDrawable::REBUILD_ALL)) + { //rebuild EVERY face in the drawable, not just this one, to avoid missing drawable wide rebuild issues + for (S32 i = 0; i < drawable->getNumFaces(); ++i) { - buffer = new LLVertexBuffer(data_mask, GL_DYNAMIC_DRAW_ARB); - } - else - { - buffer = new LLVertexBuffer(data_mask, GL_STREAM_DRAW_ARB); + LLFace* facep = drawable->getFace(i); + U32 face_data_mask = facep->getRiggedVertexBufferDataMask(); + if (face_data_mask) + { + LLPointer<LLVertexBuffer> cur_buffer = facep->getVertexBuffer(); + const LLVolumeFace& cur_vol_face = volume->getVolumeFace(i); + getRiggedGeometry(facep, cur_buffer, face_data_mask, skin, volume, cur_vol_face); + } } - buffer->allocateBuffer(vol_face.mNumVertices, vol_face.mNumIndices, true); - } - else - { //resize existing buffer - buffer->resizeBuffer(vol_face.mNumVertices, vol_face.mNumIndices); - } - - face->setSize(vol_face.mNumVertices, vol_face.mNumIndices); - face->setVertexBuffer(buffer); + drawable->clearState(LLDrawable::REBUILD_ALL); - U16 offset = 0; - - LLMatrix4 mat_vert = skin->mBindShapeMatrix; - glh::matrix4f m((F32*) mat_vert.mMatrix); - m = m.inverse().transpose(); - - F32 mat3[] = - { m.m[0], m.m[1], m.m[2], - m.m[4], m.m[5], m.m[6], - m.m[8], m.m[9], m.m[10] }; - - LLMatrix3 mat_normal(mat3); - - //let getGeometryVolume know if alpha should override shiny - U32 type = gPipeline.getPoolTypeFromTE(face->getTextureEntry(), face->getTexture()); - - if (type == LLDrawPool::POOL_ALPHA) - { - face->setPoolType(LLDrawPool::POOL_ALPHA); + buffer = face->getVertexBuffer(); } else - { - face->setPoolType(LLDrawPool::POOL_AVATAR); + { //just rebuild this face + getRiggedGeometry(face, buffer, data_mask, skin, volume, vol_face); } - - face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true); - - buffer->flush(); } if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime()) @@ -1404,11 +1443,6 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* } } } - - if (drawable && (face->getTEOffset() == drawable->getNumFaces()-1)) - { - drawable->clearState(LLDrawable::REBUILD_ALL); - } } void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) @@ -1533,7 +1567,6 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) void LLDrawPoolAvatar::renderDeferredRiggedSimple(LLVOAvatar* avatar) { - updateRiggedVertexBuffers(avatar); renderRigged(avatar, RIGGED_DEFERRED_SIMPLE); } @@ -1597,7 +1630,6 @@ void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar) void LLDrawPoolAvatar::renderRiggedSimple(LLVOAvatar* avatar) { - updateRiggedVertexBuffers(avatar); renderRigged(avatar, RIGGED_SIMPLE); } @@ -1630,6 +1662,7 @@ void LLDrawPoolAvatar::renderRiggedAlpha(LLVOAvatar* avatar) LLRender::BF_ONE_MINUS_SOURCE_ALPHA); renderRigged(avatar, RIGGED_ALPHA); + gGL.setColorMask(true, false); } } @@ -1646,6 +1679,7 @@ void LLDrawPoolAvatar::renderRiggedFullbrightAlpha(LLVOAvatar* avatar) LLRender::BF_ONE_MINUS_SOURCE_ALPHA); renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA); + gGL.setColorMask(true, false); } } diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 69e3068858..5551d8f6d8 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -129,6 +129,7 @@ public: void endDeferredRiggedSimple(); void endDeferredRiggedBump(); + void getRiggedGeometry(LLFace* face, LLPointer<LLVertexBuffer>& buffer, U32 data_mask, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face); void updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* facep, const LLMeshSkinInfo* skin, diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index a264eae302..1b0b11298c 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -1192,7 +1192,7 @@ static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max"); static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance"); static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale"); static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal"); -static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create"); +static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Bump Source Create"); // static void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code ) diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h index c0976d1d43..216cf003e1 100644 --- a/indra/newview/lldriverparam.h +++ b/indra/newview/lldriverparam.h @@ -75,6 +75,7 @@ protected: //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLDriverParam : public LLViewerVisualParam { friend class LLPhysicsMotion; // physics motion needs to access driven params directly. @@ -126,13 +127,13 @@ protected: void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake); - LLVector4a mDefaultVec; // temp holder + LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder typedef std::vector<LLDrivenEntry> entry_list_t; entry_list_t mDriven; LLViewerVisualParam* mCurrentDistortionParam; // Backlink only; don't make this an LLPointer. LLVOAvatar* mAvatarp; LLWearable* mWearablep; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLDRIVERPARAM_H diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 605cb81c10..28e4b32793 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -263,8 +263,6 @@ void LLFace::setPool(LLFacePool* pool) void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (!new_pool) { llerrs << "Setting pool to null!" << llendl; @@ -442,8 +440,6 @@ U16 LLFace::getGeometryAvatar( LLStrider<F32> &vertex_weights, LLStrider<LLVector4> &clothing_weights) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (mVertexBuffer.notNull()) { mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount); @@ -459,8 +455,6 @@ U16 LLFace::getGeometryAvatar( U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals, LLStrider<LLVector2> &tex_coords, LLStrider<U16> &indicesp) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - if (mVertexBuffer.notNull()) { mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount); @@ -770,8 +764,6 @@ bool less_than_max_mag(const LLVector4a& vec) BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume) { - LLMemType mt1(LLMemType::MTYPE_DRAWABLE); - //get bounding box if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED)) { diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 9664aa7dbe..4dfb93f1bc 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -95,7 +95,6 @@ LLFastTimerView::LLFastTimerView(const LLSD& key) mHoverBarIndex = -1; FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount(); mPrintStats = -1; - mAverageCyclesPerTimer = 0; } void LLFastTimerView::onPause() @@ -161,7 +160,7 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask) { - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -258,7 +257,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it, ++i) { @@ -379,12 +378,6 @@ void LLFastTimerView::draw() S32 xleft = margin; S32 ytop = margin; - mAverageCyclesPerTimer = LLFastTimer::sTimerCalls == 0 - ? 0 - : llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f)); - LLFastTimer::sTimerCycles = 0; - LLFastTimer::sTimerCalls = 0; - // Draw some help { @@ -392,10 +385,6 @@ void LLFastTimerView::draw() y = height - ytop; texth = (S32)LLFontGL::getFontMonospace()->getLineHeight(); -#if TIME_FAST_TIMERS - tdesc = llformat("Cycles per timer call: %d", mAverageCyclesPerTimer); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); -#else char modedesc[][32] = { "2 x Average ", "Max ", @@ -419,7 +408,6 @@ void LLFastTimerView::draw() LLFontGL::getFontMonospace()->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"), 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); -#endif y -= (texth + 2); } @@ -431,11 +419,11 @@ void LLFastTimerView::draw() y -= (texth + 2); - sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey; + sTimerColors[&getFrameTimer()] = LLColor4::grey; F32 hue = 0.f; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != timer_tree_iterator_t(); ++it) { @@ -460,7 +448,7 @@ void LLFastTimerView::draw() S32 cur_line = 0; ft_display_idx.clear(); std::map<LLFastTimer::NamedTimer*, S32> display_line; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for (timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != timer_tree_iterator_t(); ++it) { @@ -526,6 +514,7 @@ void LLFastTimerView::draw() while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); + if (next_parent->getParent() == next_parent) break; next_parent = next_parent->getParent(); } @@ -570,7 +559,7 @@ void LLFastTimerView::draw() U64 totalticks; if (!LLFastTimer::sPauseHistory) { - U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex); + U64 ticks = getFrameTimer().getHistoricalCount(mScrollIndex); if (LLFastTimer::getCurFrameIndex() >= 10) { @@ -610,7 +599,7 @@ void LLFastTimerView::draw() totalticks = 0; for (S32 j=0; j<histmax; j++) { - U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(j); + U64 ticks = getFrameTimer().getHistoricalCount(j); if (ticks > totalticks) totalticks = ticks; @@ -716,7 +705,7 @@ void LLFastTimerView::draw() LLFastTimer::NamedTimer* prev_id = NULL; S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it, ++i) { @@ -793,6 +782,7 @@ void LLFastTimerView::draw() while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); + if (next_parent->getParent() == next_parent) break; next_parent = next_parent->getParent(); } @@ -879,7 +869,7 @@ void LLFastTimerView::draw() } U64 cur_max = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -980,7 +970,7 @@ void LLFastTimerView::draw() { std::string legend_stat; bool first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -1002,7 +992,7 @@ void LLFastTimerView::draw() std::string timer_stat; first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(getFrameTimer()); it != end_timer_tree(); ++it) { @@ -1563,3 +1553,9 @@ void LLFastTimerView::onClickCloseBtn() setVisible(false); } +LLFastTimer::NamedTimer& LLFastTimerView::getFrameTimer() +{ + return FTM_FRAME.getNamedTimer(); +} + + diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index a349e7ad4c..5766cfa0b0 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -46,6 +46,7 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); + LLFastTimer::NamedTimer& getFrameTimer(); public: @@ -90,7 +91,6 @@ private: S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; S32 mPrintStats; - S32 mAverageCyclesPerTimer; LLRect mGraphRect; }; diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 24a27c5146..a4cadcd5dc 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -479,6 +479,7 @@ void LLFeatureManager::parseGPUTable(std::string filename) mGPUString = label; mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10); mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10); + sscanf(expected_gl_version.c_str(), "%f", &mExpectedGLVersion); } } #if LL_EXPORT_GPU_TABLE @@ -499,6 +500,10 @@ void LLFeatureManager::parseGPUTable(std::string filename) { LL_WARNS("RenderInit") << "GPU '" << rawRenderer << "' not recognized" << LL_ENDL; } + +#if LL_DARWIN // never go over "Mid" settings by default on OS X + mGPUClass = llmin(mGPUClass, GPU_CLASS_2); +#endif } // responder saves table into file @@ -708,34 +713,27 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures) { //same as low, but with "Basic Shaders" enabled maskFeatures("Low"); } - maskFeatures("Class0"); break; case 1: - maskFeatures("Mid"); - maskFeatures("Class1"); + maskFeatures("LowMid"); break; case 2: - maskFeatures("High"); - maskFeatures("Class2"); + maskFeatures("Mid"); break; case 3: - maskFeatures("High"); - maskFeatures("Class3"); + maskFeatures("MidHigh"); break; case 4: maskFeatures("High"); - maskFeatures("Class4"); break; case 5: - maskFeatures("High"); - maskFeatures("Class5"); + maskFeatures("HighUltra"); break; case 6: maskFeatures("Ultra"); break; default: maskFeatures("Low"); - maskFeatures("Class0"); break; } diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index 6f9d2e49c6..ad72c16743 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -103,7 +103,8 @@ public: mTableVersion(0), mSafe(FALSE), mGPUClass(GPU_CLASS_UNKNOWN), - mGPUSupported(FALSE) + mExpectedGLVersion(0.f), + mGPUSupported(FALSE) { } ~LLFeatureManager() {cleanupFeatureTables();} @@ -118,6 +119,7 @@ public: EGPUClass getGPUClass() { return mGPUClass; } std::string& getGPUString() { return mGPUString; } BOOL isGPUSupported() { return mGPUSupported; } + F32 getExpectedGLVersion() { return mExpectedGLVersion; } void cleanupFeatureTables(); @@ -157,6 +159,7 @@ protected: S32 mTableVersion; BOOL mSafe; // Reinitialize everything to the "safe" mask EGPUClass mGPUClass; + F32 mExpectedGLVersion; //expected GL version according to gpu table std::string mGPUString; BOOL mGPUSupported; }; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 28d195d5e9..77a0cdffce 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -48,7 +48,7 @@ std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList; std::vector<S32> LLVolumeImplFlexible::sUpdateDelay; static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild"); -static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update"); +static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Flexible Update"); // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp @@ -66,7 +66,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD mSimulateRes = 0; mFrameNum = 0; mCollisionSphereRadius = 0.f; - mRenderRes = 1; + mRenderRes = -1; if(mVO->mDrawable.notNull()) { @@ -350,23 +350,24 @@ void LLVolumeImplFlexible::doIdleUpdate() { bool visible = drawablep->isVisible(); - if ((mSimulateRes == 0) && visible) + if (mRenderRes == -1) { updateRenderRes(); gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE); + sUpdateDelay[mInstanceIndex] = 0; } else { F32 pixel_area = mVO->getPixelArea(); - U32 update_period = (U32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f)))+1; + U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1); // MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames update_period = llclamp(update_period, 0U, 32U); if (visible) { if (!drawablep->isState(LLDrawable::IN_REBUILD_Q1) && - mVO->getPixelArea() > 256.f) + pixel_area > 256.f) { U32 id; @@ -650,6 +651,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length; // Create points + llassert(mRenderRes > -1) S32 num_render_sections = 1<<mRenderRes; if (path->getPathLength() != num_render_sections+1) { diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 7d1bcba978..6e56e929df 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -478,14 +478,25 @@ bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification, bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notification, const LLSD& response) { LLSD newList = notification["payload"]["list"]; - + std::string listName = LLAutoReplaceSettings::getListName(newList); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch ( option ) { case 0: // Replace current list - LL_INFOS("AutoReplace")<<"option 'replace current list' selected"<<LL_ENDL; - + if ( LLAutoReplaceSettings::AddListOk == mSettings.replaceList(newList) ) + { + LL_INFOS("AutoReplace") << "replaced list '"<<listName<<"'"<<LL_ENDL; + mSelectedListName = listName; + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); + } + else + { + LL_WARNS("AutoReplace")<<"failed to replace list '"<<listName<<"'"<<LL_ENDL; + } break; case 1: @@ -503,14 +514,27 @@ bool LLFloaterAutoReplaceSettings::callbackListNameConflict(const LLSD& notifica void LLFloaterAutoReplaceSettings::onDeleteList() { - std::string listName= mListNames->getFirstSelected()->getColumn(0)->getValue().asString(); - mSettings.removeReplacementList(listName); // remove from the copy of settings - mReplacementsList->deleteSelectedItems(); // remove from the scrolling list - - mSelectedListName.clear(); - updateListNames(); - updateListNamesControls(); - updateReplacementsList(); + std::string listName = mListNames->getSelectedValue().asString(); + if ( ! listName.empty() ) + { + if ( mSettings.removeReplacementList(listName) ) + { + LL_INFOS("AutoReplace")<<"deleted list '"<<listName<<"'"<<LL_ENDL; + mReplacementsList->deleteSelectedItems(); // remove from the scrolling list + mSelectedListName.clear(); + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); + } + else + { + LL_WARNS("AutoReplace")<<"failed to delete list '"<<listName<<"'"<<LL_ENDL; + } + } + else + { + LL_DEBUGS("AutoReplace")<<"no list selected for delete"<<LL_ENDL; + } } void LLFloaterAutoReplaceSettings::onExportList() diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 90f40628a8..39b6e465f3 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -336,8 +336,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // This slices the object into what we're concerned about on the viewer. // The simulator will take the permissions and transfer ownership. LLPointer<LLViewerInventoryItem> task_item = diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index bca4b5e447..fffd724b22 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -80,6 +80,7 @@ BOOL LLFloaterBuyContents::postBuild() LLFloaterBuyContents::~LLFloaterBuyContents() { + removeVOInventoryListener(); } @@ -147,23 +148,26 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, return; } - if (!inv) + LLScrollListCtrl* item_list = getChild<LLScrollListCtrl>("item_list"); + if (!item_list) { - llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged" - << llendl; removeVOInventoryListener(); return; } - LLCtrlListInterface *item_list = childGetListInterface("item_list"); - if (!item_list) + item_list->deleteAllItems(); + + if (!inv) { - removeVOInventoryListener(); + llwarns << "No inventory in LLFloaterBuyContents::inventoryChanged" + << llendl; + return; } // default to turning off the buy button. - getChildView("buy_btn")->setEnabled(FALSE); + LLView* buy_btn = getChildView("buy_btn"); + buy_btn->setEnabled(FALSE); LLUUID owner_id; BOOL is_group_owned; @@ -204,7 +208,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, // There will be at least one item shown in the display, so go // ahead and enable the buy button. - getChildView("buy_btn")->setEnabled(TRUE); + buy_btn->setEnabled(TRUE); // Create the line in the list LLSD row; @@ -255,8 +259,6 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, getChildView("wear_check")->setEnabled(TRUE); getChild<LLUICtrl>("wear_check")->setValue(LLSD(false) ); } - - removeVOInventoryListener(); } diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 21b58d3e3d..c85d048c5a 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -330,6 +330,10 @@ void LLFloaterCamera::onClose(bool app_quitting) //We don't care of camera mode if app is quitting if(app_quitting) return; + // It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so + // to avoid seeing an empty floater when reopening the control. + if (mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA) + mCurrMode = CAMERA_CTRL_MODE_PAN; // When mCurrMode is in CAMERA_CTRL_MODE_PAN // switchMode won't modify mPrevMode, so force it here. // It is needed to correctly return to previous mode on open, see EXT-2727. diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 05d73c2416..d6ebe44daa 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -172,9 +172,9 @@ void LLFloaterColorPicker::createUI () // void LLFloaterColorPicker::showUI () { + openFloater(getKey()); setVisible ( TRUE ); setFocus ( TRUE ); - openFloater(getKey()); // HACK: if system color picker is required - close the SL one we made and use default system dialog if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) ) diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 6b2492d927..2575f6f817 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -901,11 +901,13 @@ BOOL LLImagePreviewSculpted::render() { gObjectPreviewProgram.bind(); } + gPipeline.enableLightsPreview(); + gGL.pushMatrix(); const F32 SCALE = 1.25f; gGL.scalef(SCALE, SCALE, SCALE); const F32 BRIGHTNESS = 0.9f; - gGL.color3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); + gGL.diffuseColor3f(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS); mVertexBuffer->setBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0); mVertexBuffer->draw(LLRender::TRIANGLES, num_indices, 0); diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index c37798c330..d0c22d25f2 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -33,6 +33,7 @@ #include "llerror.h" #include "llrect.h" #include "llstring.h" +#include "llstat.h" // project includes #include "lluictrlfactory.h" @@ -83,7 +84,8 @@ BOOL LLFloaterJoystick::postBuild() for (U32 i = 0; i < 6; i++) { - mAxisStats[i] = new LLStat(4); + std::string stat_name(llformat("Joystick axis %d", i)); + mAxisStats[i] = new LLStat(stat_name, 4); std::string axisname = llformat("axis%d", i); mAxisStatsBar[i] = getChild<LLStatBar>(axisname); if (mAxisStatsBar[i]) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 55f3d548ec..5f58577a7c 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -783,8 +783,9 @@ void LLPanelLandGeneral::refresh() mBtnReleaseLand->setEnabled( can_release ); } - BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; + BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; mBtnBuyPass->setEnabled(use_pass); + } } @@ -2115,7 +2116,7 @@ void LLPanelLandOptions::refreshSearch() bool can_change = LLViewerParcelMgr::isParcelModifiableByAgent( - parcel, GP_LAND_CHANGE_IDENTITY) + parcel, GP_LAND_FIND_PLACES) && region && !(region->getRegionFlags() & REGION_FLAGS_BLOCK_PARCEL_SEARCH); diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index a65e9e911a..473e2938be 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -122,16 +122,13 @@ BOOL LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask) LLVector3d pos_global = mMap->viewPosToGlobal(x, y); - // If we're not tracking a beacon already, double-click will set one - if (!LLTracker::isTracking(NULL)) + LLTracker::stopTracking(NULL); + LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); + if (world_map) { - LLFloaterWorldMap* world_map = LLFloaterWorldMap::getInstance(); - if (world_map) - { - world_map->trackLocation(pos_global); - } + world_map->trackLocation(pos_global); } - + if (gSavedSettings.getBOOL("DoubleClickTeleport")) { // If DoubleClickTeleport is on, double clicking the minimap will teleport there @@ -249,3 +246,8 @@ void LLFloaterMap::handleZoom(const LLSD& userdata) mMap->setScale(scale); } } + +LLFloaterMap* LLFloaterMap::getInstance() +{ + return LLFloaterReg::getTypedInstance<LLFloaterMap>("mini_map"); +} diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 8a1b965e62..ff2fb20535 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -39,6 +39,7 @@ class LLFloaterMap : public LLFloater { public: LLFloaterMap(const LLSD& key); + static LLFloaterMap* getInstance(); virtual ~LLFloaterMap(); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a071f338ba..ea839e6f5a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -737,6 +737,20 @@ void LLFloaterModelPreview::onAutoFillCommit(LLUICtrl* ctrl, void* userdata) void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit) { mModelPreview->onLODParamCommit(lod, enforce_tri_limit); + + //refresh LoDs that reference this one + for (S32 i = lod - 1; i >= 0; --i) + { + LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[i]); + if (lod_source_combo->getCurrentIndex() == LLModelPreview::USE_LOD_ABOVE) + { + onLoDSourceCommit(i); + } + else + { + break; + } + } } @@ -3870,15 +3884,30 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 triangle_count = 0; - for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter) + U32 instanced_triangle_count = 0; + + //get the triangle count for the whole scene + for (LLModelLoader::scene::iterator iter = mBaseScene.begin(), endIter = mBaseScene.end(); iter != endIter; ++iter) { - LLModel* mdl = *iter; - for (S32 i = 0; i < mdl->getNumVolumeFaces(); ++i) + for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) { - triangle_count += mdl->getVolumeFace(i).mNumIndices/3; + LLModel* mdl = instance->mModel; + if (mdl) + { + instanced_triangle_count += mdl->getNumTriangles(); + } } } + //get the triangle count for the non-instanced set of models + for (U32 i = 0; i < mBaseModel.size(); ++i) + { + triangle_count += mBaseModel[i]->getNumTriangles(); + } + + //get ratio of uninstanced triangles to instanced triangles + F32 triangle_ratio = (F32) triangle_count / (F32) instanced_triangle_count; + U32 base_triangle_count = triangle_count; U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; @@ -3912,6 +3941,8 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim if (which_lod > -1 && which_lod < NUM_LOD) { limit = mFMP->childGetValue("lod_triangle_limit_" + lod_name[which_lod]).asInteger(); + //convert from "scene wide" to "non-instanced" triangle limit + limit = (S32) ( (F32) limit*triangle_ratio ); } } else @@ -4017,7 +4048,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 actual_verts = 0; U32 submeshes = 0; - mRequestedTriangleCount[lod] = triangle_count; + mRequestedTriangleCount[lod] = (S32) ( (F32) triangle_count / triangle_ratio ); mRequestedErrorThreshold[lod] = lod_error_threshold; glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode); @@ -4199,28 +4230,36 @@ void LLModelPreview::updateStatusMessages() //initialize total for this lod to 0 total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0; - for (U32 i = 0; i < mModel[lod].size(); ++i) - { //for each model in the lod - S32 cur_tris = 0; - S32 cur_verts = 0; - S32 cur_submeshes = mModel[lod][i]->getNumVolumeFaces(); - - for (S32 j = 0; j < cur_submeshes; ++j) - { //for each submesh (face), add triangles and vertices to current total - const LLVolumeFace& face = mModel[lod][i]->getVolumeFace(j); - cur_tris += face.mNumIndices/3; - cur_verts += face.mNumVertices; - } + for (LLModelLoader::scene::iterator iter = mScene[lod].begin(), endIter = mScene[lod].end(); iter != endIter; ++iter) + { + for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) + { + LLModel* model = instance->mModel; + if (model) + { + //for each model in the lod + S32 cur_tris = 0; + S32 cur_verts = 0; + S32 cur_submeshes = model->getNumVolumeFaces(); + + for (S32 j = 0; j < cur_submeshes; ++j) + { //for each submesh (face), add triangles and vertices to current total + const LLVolumeFace& face = model->getVolumeFace(j); + cur_tris += face.mNumIndices/3; + cur_verts += face.mNumVertices; + } - //add this model to the lod total - total_tris[lod] += cur_tris; - total_verts[lod] += cur_verts; - total_submeshes[lod] += cur_submeshes; + //add this model to the lod total + total_tris[lod] += cur_tris; + total_verts[lod] += cur_verts; + total_submeshes[lod] += cur_submeshes; - //store this model's counts to asset data - tris[lod].push_back(cur_tris); - verts[lod].push_back(cur_verts); - submeshes[lod].push_back(cur_submeshes); + //store this model's counts to asset data + tris[lod].push_back(cur_tris); + verts[lod].push_back(cur_verts); + submeshes[lod].push_back(cur_submeshes); + } + } } } @@ -4397,34 +4436,38 @@ void LLModelPreview::updateStatusMessages() } //add up physics triangles etc - S32 start = 0; - S32 end = mModel[LLModel::LOD_PHYSICS].size(); - S32 phys_tris = 0; S32 phys_hulls = 0; S32 phys_points = 0; - for (S32 i = start; i < end; ++i) - { //add up hulls and points and triangles for selected mesh(es) - LLModel* model = mModel[LLModel::LOD_PHYSICS][i]; - S32 cur_submeshes = model->getNumVolumeFaces(); - - LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull; - - if (!decomp.empty()) + //get the triangle count for the whole scene + for (LLModelLoader::scene::iterator iter = mScene[LLModel::LOD_PHYSICS].begin(), endIter = mScene[LLModel::LOD_PHYSICS].end(); iter != endIter; ++iter) + { + for (LLModelLoader::model_instance_list::iterator instance = iter->second.begin(), end_instance = iter->second.end(); instance != end_instance; ++instance) { - phys_hulls += decomp.size(); - for (U32 i = 0; i < decomp.size(); ++i) + LLModel* model = instance->mModel; + if (model) { - phys_points += decomp[i].size(); - } - } - else - { //choose physics shape OR decomposition, can't use both - for (S32 j = 0; j < cur_submeshes; ++j) - { //for each submesh (face), add triangles and vertices to current total - const LLVolumeFace& face = model->getVolumeFace(j); - phys_tris += face.mNumIndices/3; + S32 cur_submeshes = model->getNumVolumeFaces(); + + LLModel::convex_hull_decomposition& decomp = model->mPhysics.mHull; + + if (!decomp.empty()) + { + phys_hulls += decomp.size(); + for (U32 i = 0; i < decomp.size(); ++i) + { + phys_points += decomp[i].size(); + } + } + else + { //choose physics shape OR decomposition, can't use both + for (S32 j = 0; j < cur_submeshes; ++j) + { //for each submesh (face), add triangles and vertices to current total + const LLVolumeFace& face = model->getVolumeFace(j); + phys_tris += face.mNumIndices/3; + } + } } } } @@ -4588,7 +4631,7 @@ void LLModelPreview::updateLodControls(S32 lod) if (!lod_combo) return; S32 lod_mode = lod_combo->getCurrentIndex(); - if (lod_mode == 0) // LoD from file + if (lod_mode == LOD_FROM_FILE) // LoD from file { fmp->mLODMode[lod] = 0; for (U32 i = 0; i < num_file_controls; ++i) @@ -4601,7 +4644,7 @@ void LLModelPreview::updateLodControls(S32 lod) mFMP->childHide(lod_controls[i] + lod_name[lod]); } } - else if (lod_mode == 2) // use LoD above + else if (lod_mode == USE_LOD_ABOVE) // use LoD above { fmp->mLODMode[lod] = 2; for (U32 i = 0; i < num_file_controls; ++i) @@ -5073,6 +5116,11 @@ BOOL LLModelPreview::render() refresh(); } + if (use_shaders) + { + gObjectPreviewProgram.bind(); + } + gGL.loadIdentity(); gPipeline.enableLightsPreview(); @@ -5098,11 +5146,6 @@ BOOL LLModelPreview::render() const U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; - if (use_shaders) - { - gObjectPreviewProgram.bind(); - } - LLGLEnable normalize(GL_NORMALIZE); if (!mBaseModel.empty() && mVertexBuffer[5].empty()) @@ -5291,7 +5334,7 @@ BOOL LLModelPreview::render() hull_colors.push_back(LLColor4U(rand()%128+127, rand()%128+127, rand()%128+127, 128)); } - glColor4ubv(hull_colors[i].mV); + gGL.diffuseColor4ubv(hull_colors[i].mV); LLVertexBuffer::drawArrays(LLRender::TRIANGLES, physics.mMesh[i].mPositions, physics.mMesh[i].mNormals); if (explode > 0.f) @@ -5762,6 +5805,12 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod) { mModelPreview->updateLodControls(lod); refresh(); + + LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[lod]); + if (lod_source_combo->getCurrentIndex() == LLModelPreview::GENERATE) + { //rebuild LoD to update triangle counts + onLODParamCommit(lod, true); + } } void LLFloaterModelPreview::resetDisplayOptions() diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index ab319c30d5..e588418f7b 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -311,6 +311,15 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex typedef boost::signals2::signal<void (bool)> model_updated_signal_t; public: + + typedef enum + { + LOD_FROM_FILE = 0, + GENERATE, + USE_LOD_ABOVE, + } eLoDMode; + +public: LLModelPreview(S32 width, S32 height, LLFloater* fmp); virtual ~LLModelPreview(); diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp index 9157389187..9a23d99802 100644 --- a/indra/newview/llfloatertexturefetchdebugger.cpp +++ b/indra/newview/llfloatertexturefetchdebugger.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2012, 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 diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 48484786f6..1eb7f4469a 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1055,6 +1055,17 @@ void commit_grid_mode(LLUICtrl *ctrl) LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex()); } +// static +void LLFloaterTools::setGridMode(S32 mode) +{ + LLFloaterTools* tools_floater = LLFloaterReg::getTypedInstance<LLFloaterTools>("build"); + if (!tools_floater || !tools_floater->mComboGridMode) + { + return; + } + + tools_floater->mComboGridMode->setCurrentByIndex(mode); +} void LLFloaterTools::onClickGridOptions() { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 7a19d093a4..ecb0092a6f 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -107,6 +107,8 @@ public: bool selectedMediaEditable(); void updateLandImpacts(); + static void setGridMode(S32 mode); + private: void refresh(); void refreshMedia(); diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 151cd2a1cd..e85d849c9a 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -219,7 +219,8 @@ void LLFloaterURLEntry::onBtnOK( void* userdata ) } // Discover the MIME type only for "http" scheme. - if(scheme == "http" || scheme == "https") + if(!media_url.empty() && + (scheme == "http" || scheme == "https")) { LLHTTPClient::getHeaderOnly( media_url, new LLMediaTypeResponder(self->getHandle())); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 14a228df1c..949de312be 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3214,6 +3214,7 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags) const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); + const LLUUID favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (lost_and_found_id == mUUID) { @@ -3227,7 +3228,10 @@ void LLFolderBridge::buildContextMenuBaseOptions(U32 flags) mDisabledItems.push_back(std::string("New Clothes")); mDisabledItems.push_back(std::string("New Body Parts")); } - + if (favorites == mUUID) + { + mDisabledItems.push_back(std::string("New Folder")); + } if(trash_id == mUUID) { // This is the trash. @@ -4667,6 +4671,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { disabled_items.push_back(std::string("Share")); } + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Open")); + } addOpenRightClickMenuOption(items); items.push_back(std::string("Properties")); @@ -5633,7 +5641,8 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Wearable Edit")); - if ((flags & FIRST_SELECTED_ITEM) == 0) + bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID()); + if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable) { disabled_items.push_back(std::string("Wearable Edit")); } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index e98d3f88a6..68732024de 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -959,7 +959,6 @@ void LLSaveFolderState::setApply(BOOL apply) void LLSaveFolderState::doFolder(LLFolderViewFolder* folder) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_DO_FOLDER); LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener(); if(!bridge) return; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 05c81957c6..f7567baa2b 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -44,6 +44,7 @@ #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" #include "llsidepanelinventory.h" +#include "lltrans.h" #include "llviewerattachmenu.h" #include "llviewerfoldertype.h" #include "llvoavatarself.h" @@ -191,8 +192,6 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD); - mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves buildFolderView(params); @@ -975,7 +974,6 @@ bool LLInventoryPanel::beginIMSession() std::set<LLUUID> selected_items = mFolderRoot->getSelectionList(); std::string name; - static int session_num = 1; LLDynamicArray<LLUUID> members; EInstantMessage type = IM_SESSION_CONFERENCE_START; @@ -1055,7 +1053,7 @@ bool LLInventoryPanel::beginIMSession() if (name.empty()) { - name = llformat("Session %d", session_num++); + name = LLTrans::getString("conference-title"); } LLUUID session_id = gIMMgr->addSession(name, type, members[0], members); diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 6e0f360cbc..9ec5d7c20c 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -72,7 +72,6 @@ void LLManip::rebuild(LLViewerObject* vobj) LLDrawable* drawablep = vobj->mDrawable; if (drawablep && drawablep->getVOVolume()) { - gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE); drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED drawablep->updateMove(); @@ -82,6 +81,14 @@ void LLManip::rebuild(LLViewerObject* vobj) group->dirtyGeom(); gPipeline.markRebuild(group, TRUE); } + + LLViewerObject::const_child_list_t& child_list = vobj->getChildren(); + for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(), endIter = child_list.end(); + iter != endIter; ++iter) + { + LLViewerObject* child = *iter; + rebuild(child); + } } } diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp deleted file mode 100644 index c0a323d6cb..0000000000 --- a/indra/newview/llmemoryview.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/** - * @file llmemoryview.cpp - * @brief LLMemoryView class implementation - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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 "llmemoryview.h" - -#include "llappviewer.h" -#include "llallocator_heap_profile.h" -#include "llgl.h" // LLGLSUIDefault -#include "llviewerwindow.h" -#include "llviewercontrol.h" - -#include <sstream> -#include <boost/algorithm/string/split.hpp> - -#include "llmemory.h" - -LLMemoryView::LLMemoryView(const LLMemoryView::Params& p) -: LLView(p), - mPaused(FALSE), - //mDelay(120), - mAlloc(NULL) -{ -} - -LLMemoryView::~LLMemoryView() -{ -} - -BOOL LLMemoryView::handleMouseDown(S32 x, S32 y, MASK mask) -{ - if (mask & MASK_SHIFT) - { - } - else if (mask & MASK_CONTROL) - { - } - else - { - mPaused = !mPaused; - } - return TRUE; -} - -BOOL LLMemoryView::handleMouseUp(S32 x, S32 y, MASK mask) -{ - return TRUE; -} - - -BOOL LLMemoryView::handleHover(S32 x, S32 y, MASK mask) -{ - return FALSE; -} - -void LLMemoryView::refreshProfile() -{ - /* - LLAllocator & alloc = LLAppViewer::instance()->getAllocator(); - if(alloc.isProfiling()) { - std::string profile_text = alloc.getRawProfile(); - - boost::algorithm::split(mLines, profile_text, boost::bind(std::equal_to<llwchar>(), '\n', _1)); - } else { - mLines.clear(); - } - */ - if (mAlloc == NULL) { - mAlloc = &LLAppViewer::instance()->getAllocator(); - } - - mLines.clear(); - - if(mAlloc->isProfiling()) - { - const LLAllocatorHeapProfile &prof = mAlloc->getProfile(); - for(size_t i = 0; i < prof.mLines.size(); ++i) - { - std::stringstream ss; - ss << "Unfreed Mem: " << (prof.mLines[i].mLiveSize >> 20) << " M Trace: "; - for(size_t k = 0; k < prof.mLines[i].mTrace.size(); ++k) - { - ss << LLMemType::getNameFromID(prof.mLines[i].mTrace[k]) << " "; - } - mLines.push_back(utf8string_to_wstring(ss.str())); - } - } -} - -void LLMemoryView::draw() -{ - const S32 UPDATE_INTERVAL = 60; - const S32 MARGIN_AMT = 10; - static S32 curUpdate = UPDATE_INTERVAL; - static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black); - - // setup update interval - if (curUpdate >= UPDATE_INTERVAL) - { - refreshProfile(); - curUpdate = 0; - } - curUpdate++; - - // setup window properly - S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f); - S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f); - setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height)); - - // setup window color - F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f); - LLColor4 color = s_console_color; - color.mV[VALPHA] *= console_opacity; - - LLGLSUIDefault gls_ui; - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gl_rect_2d(0, height, width, 0, color); - - LLFontGL * font = LLFontGL::getFontSansSerifSmall(); - - // draw remaining lines - F32 y_pos = 0.f; - F32 y_off = 0.f; - - F32 line_height = font->getLineHeight(); - S32 target_width = width - 2 * MARGIN_AMT; - - // cut off lines on bottom - U32 max_lines = U32((height - 2 * line_height) / line_height); - y_pos = height - MARGIN_AMT - line_height; - y_off = 0.f; - -#if !MEM_TRACK_MEM - std::vector<LLWString>::const_iterator end = mLines.end(); - if(mLines.size() > max_lines) { - end = mLines.begin() + max_lines; - } - for (std::vector<LLWString>::const_iterator i = mLines.begin(); i != end; ++i) - { - font->render(*i, 0, MARGIN_AMT, y_pos - y_off, - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW, - S32_MAX, - target_width - ); - y_off += line_height; - } - -#else - LLMemTracker::getInstance()->preDraw(mPaused) ; - - { - F32 x_pos = MARGIN_AMT ; - U32 lines = 0 ; - const char* str = LLMemTracker::getInstance()->getNextLine() ; - while(str != NULL) - { - lines++ ; - font->renderUTF8(str, 0, x_pos, y_pos - y_off, - LLColor4::white, - LLFontGL::LEFT, - LLFontGL::BASELINE, - LLFontGL::NORMAL, - LLFontGL::DROP_SHADOW, - S32_MAX, - target_width, - NULL, FALSE); - - str = LLMemTracker::getInstance()->getNextLine() ; - y_off += line_height; - - if(lines >= max_lines) - { - lines = 0 ; - x_pos += 512.f ; - if(x_pos + 512.f > target_width) - { - break ; - } - - y_pos = height - MARGIN_AMT - line_height; - y_off = 0.f; - } - } - } - - LLMemTracker::getInstance()->postDraw() ; -#endif - -#if MEM_TRACK_TYPE - - S32 left, top, right, bottom; - S32 x, y; - - S32 margin = 10; - S32 texth = LLFontGL::getFontMonospace()->getLineHeight(); - - S32 xleft = margin; - S32 ytop = height - margin; - S32 labelwidth = 0; - S32 maxmaxbytes = 1; - - // Make sure all timers are accounted for - // Set 'MT_OTHER' to unaccounted ticks last frame - { - S32 display_memtypes[LLMemType::MTYPE_NUM_TYPES]; - for (S32 i=0; i < LLMemType::MTYPE_NUM_TYPES; i++) - { - display_memtypes[i] = 0; - } - for (S32 i=0; i < MTV_DISPLAY_NUM; i++) - { - S32 tidx = mtv_display_table[i].memtype; - display_memtypes[tidx]++; - } - LLMemType::sMemCount[LLMemType::MTYPE_OTHER] = 0; - LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] = 0; - for (S32 tidx = 0; tidx < LLMemType::MTYPE_NUM_TYPES; tidx++) - { - if (display_memtypes[tidx] == 0) - { - LLMemType::sMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMemCount[tidx]; - LLMemType::sMaxMemCount[LLMemType::MTYPE_OTHER] += LLMemType::sMaxMemCount[tidx]; - } - } - } - - // Labels - { - y = ytop; - S32 peak = 0; - for (S32 i=0; i<MTV_DISPLAY_NUM; i++) - { - x = xleft; - - int tidx = mtv_display_table[i].memtype; - S32 bytes = LLMemType::sMemCount[tidx]; - S32 maxbytes = LLMemType::sMaxMemCount[tidx]; - maxmaxbytes = llmax(maxbytes, maxmaxbytes); - peak += maxbytes; - S32 mbytes = bytes >> 20; - - tdesc = llformat("%s [%4d MB] in %06d NEWS",mtv_display_table[i].desc,mbytes, LLMemType::sNewCount[tidx]); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - - y -= (texth + 2); - - S32 textw = LLFontGL::getFontMonospace()->getWidth(tdesc); - if (textw > labelwidth) - labelwidth = textw; - } - - S32 num_avatars = 0; - S32 num_motions = 0; - S32 num_loading_motions = 0; - S32 num_loaded_motions = 0; - S32 num_active_motions = 0; - S32 num_deprecated_motions = 0; - for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - num_avatars++; - (*iter)->getMotionController().incMotionCounts(num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); - } - - x = xleft; - tdesc = llformat("Total Bytes: %d MB Overhead: %d KB Avs %d Motions:%d Loading:%d Loaded:%d Active:%d Dep:%d", - LLMemType::sTotalMem >> 20, LLMemType::sOverheadMem >> 10, - num_avatars, num_motions, num_loading_motions, num_loaded_motions, num_active_motions, num_deprecated_motions); - LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); - } - - // Bars - y = ytop; - labelwidth += 8; - S32 barw = width - labelwidth - xleft - margin; - for (S32 i=0; i<MTV_DISPLAY_NUM; i++) - { - x = xleft + labelwidth; - - int tidx = mtv_display_table[i].memtype; - S32 bytes = LLMemType::sMemCount[tidx]; - F32 frac = (F32)bytes / (F32)maxmaxbytes; - S32 w = (S32)(frac * (F32)barw); - left = x; right = x + w; - top = y; bottom = y - texth; - gl_rect_2d(left, top, right, bottom, *mtv_display_table[i].color); - - S32 maxbytes = LLMemType::sMaxMemCount[tidx]; - F32 frac2 = (F32)maxbytes / (F32)maxmaxbytes; - S32 w2 = (S32)(frac2 * (F32)barw); - left = x + w + 1; right = x + w2; - top = y; bottom = y - texth; - LLColor4 tcolor = *mtv_display_table[i].color; - tcolor.setAlpha(.5f); - gl_rect_2d(left, top, right, bottom, tcolor); - - y -= (texth + 2); - } - - dumpData(); - -#endif - - LLView::draw(); -} diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp index dd5f1ea689..a567d1217a 100644 --- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp @@ -54,23 +54,21 @@ LLMenuOptionPathfindingRebakeNavmesh::LLMenuOptionPathfindingRebakeNavmesh() LLMenuOptionPathfindingRebakeNavmesh::~LLMenuOptionPathfindingRebakeNavmesh() { - if (mRebakeNavMeshMode == kRebakeNavMesh_RequestSent) - { - LL_WARNS("navmeshRebaking") << "During destruction of the LLMenuOptionPathfindingRebakeNavmesh " - << "singleton, the mode indicates that a request has been sent for which a response has yet " - << "to be received. This could contribute to a crash on exit." << LL_ENDL; - } - - llassert(!mIsInitialized); if (mIsInitialized) { + if (mRebakeNavMeshMode == kRebakeNavMesh_RequestSent) + { + LL_WARNS("navmeshRebaking") << "During destruction of the LLMenuOptionPathfindingRebakeNavmesh " + << "singleton, the mode indicates that a request has been sent for which a response has yet " + << "to be received. This could contribute to a crash on exit." << LL_ENDL; + } + quit(); } } void LLMenuOptionPathfindingRebakeNavmesh::initialize() { - llassert(!mIsInitialized); if (!mIsInitialized) { mIsInitialized = true; @@ -94,8 +92,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::initialize() void LLMenuOptionPathfindingRebakeNavmesh::quit() { - llassert(mIsInitialized); - if (mIsInitialized) + if (mIsInitialized) // Quitting from the login screen leaves this uninitialized { if (mNavMeshSlot.connected()) { @@ -175,51 +172,60 @@ void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegio void LLMenuOptionPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus) { llassert(mIsInitialized); - if (getMode() == kRebakeNavMesh_RequestSent) + if (mIsInitialized) { - setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default); - } + if (getMode() == kRebakeNavMesh_RequestSent) + { + setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default); + } - if (!pResponseStatus) - { - LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh"); + if (!pResponseStatus) + { + LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh"); + } } } void LLMenuOptionPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus) { llassert(mIsInitialized); - ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default; - if (pNavMeshStatus.isValid()) + if (mIsInitialized) { - switch (pNavMeshStatus.getStatus()) + ERebakeNavMeshMode rebakeNavMeshMode = kRebakeNavMesh_Default; + if (pNavMeshStatus.isValid()) { - case LLPathfindingNavMeshStatus::kPending : - case LLPathfindingNavMeshStatus::kRepending : - rebakeNavMeshMode = kRebakeNavMesh_Available; - break; - case LLPathfindingNavMeshStatus::kBuilding : - rebakeNavMeshMode = kRebakeNavMesh_InProgress; - break; - case LLPathfindingNavMeshStatus::kComplete : - rebakeNavMeshMode = kRebakeNavMesh_NotAvailable; - break; - default : - rebakeNavMeshMode = kRebakeNavMesh_Default; - llassert(0); - break; + switch (pNavMeshStatus.getStatus()) + { + case LLPathfindingNavMeshStatus::kPending : + case LLPathfindingNavMeshStatus::kRepending : + rebakeNavMeshMode = kRebakeNavMesh_Available; + break; + case LLPathfindingNavMeshStatus::kBuilding : + rebakeNavMeshMode = kRebakeNavMesh_InProgress; + break; + case LLPathfindingNavMeshStatus::kComplete : + rebakeNavMeshMode = kRebakeNavMesh_NotAvailable; + break; + default : + rebakeNavMeshMode = kRebakeNavMesh_Default; + llassert(0); + break; + } } - } - setMode(rebakeNavMeshMode); + setMode(rebakeNavMeshMode); + } } void LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed() { llassert(mIsInitialized); - createNavMeshStatusListenerForCurrentRegion(); - mCanRebakeRegion = FALSE; - LLPathfindingManager::getInstance()->requestGetAgentState(); + if (mIsInitialized) + { + createNavMeshStatusListenerForCurrentRegion(); + mCanRebakeRegion = FALSE; + LLPathfindingManager::getInstance()->requestGetAgentState(); + } } void LLMenuOptionPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrentRegion() @@ -236,3 +242,4 @@ void LLMenuOptionPathfindingRebakeNavmesh::createNavMeshStatusListenerForCurrent LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true); } } + diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 92ac435f08..e81c863608 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -204,16 +204,28 @@ class LLMeshHeaderResponder : public LLCurl::Responder { public: LLVolumeParams mMeshParams; - + bool mProcessed; + LLMeshHeaderResponder(const LLVolumeParams& mesh_params) : mMeshParams(mesh_params) { - LLMeshRepoThread::sActiveHeaderRequests++; + LLMeshRepoThread::incActiveHeaderRequests(); + mProcessed = false; } ~LLMeshHeaderResponder() { - LLMeshRepoThread::sActiveHeaderRequests--; + if (!mProcessed && !LLApp::isQuitting()) + { //something went wrong, retry + llwarns << "Timeout or service unavailable, retrying." << llendl; + LLMeshRepository::sHTTPRetryCount++; + LLMeshRepoThread::HeaderRequest req(mMeshParams); + LLMutexLock lock(gMeshRepo.mThread->mMutex); + gMeshRepo.mThread->mHeaderReqQ.push(req); + + } + + LLMeshRepoThread::decActiveHeaderRequests(); } virtual void completedRaw(U32 status, const std::string& reason, @@ -229,16 +241,24 @@ public: S32 mLOD; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshLODResponder(const LLVolumeParams& mesh_params, S32 lod, U32 offset, U32 requested_bytes) : mMeshParams(mesh_params), mLOD(lod), mOffset(offset), mRequestedBytes(requested_bytes) { - LLMeshRepoThread::sActiveLODRequests++; + LLMeshRepoThread::incActiveLODRequests(); + mProcessed = false; } ~LLMeshLODResponder() { - LLMeshRepoThread::sActiveLODRequests--; + if (!mProcessed && !LLApp::isQuitting()) + { + llwarns << "Killed without being processed, retrying." << llendl; + LLMeshRepository::sHTTPRetryCount++; + gMeshRepo.mThread->lockAndLoadMeshLOD(mMeshParams, mLOD); + } + LLMeshRepoThread::decActiveLODRequests(); } virtual void completedRaw(U32 status, const std::string& reason, @@ -253,10 +273,17 @@ public: LLUUID mMeshID; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshSkinInfoResponder(const LLUUID& id, U32 offset, U32 size) : mMeshID(id), mRequestedBytes(size), mOffset(offset) { + mProcessed = false; + } + + ~LLMeshSkinInfoResponder() + { + llassert(mProcessed); } virtual void completedRaw(U32 status, const std::string& reason, @@ -271,10 +298,17 @@ public: LLUUID mMeshID; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshDecompositionResponder(const LLUUID& id, U32 offset, U32 size) : mMeshID(id), mRequestedBytes(size), mOffset(offset) { + mProcessed = false; + } + + ~LLMeshDecompositionResponder() + { + llassert(mProcessed); } virtual void completedRaw(U32 status, const std::string& reason, @@ -289,10 +323,17 @@ public: LLUUID mMeshID; U32 mRequestedBytes; U32 mOffset; + bool mProcessed; LLMeshPhysicsShapeResponder(const LLUUID& id, U32 offset, U32 size) : mMeshID(id), mRequestedBytes(size), mOffset(offset) { + mProcessed = false; + } + + ~LLMeshPhysicsShapeResponder() + { + llassert(mProcessed); } virtual void completedRaw(U32 status, const std::string& reason, @@ -375,6 +416,14 @@ public: } } + ~LLWholeModelFeeResponder() + { + if (mThread) + { + mThread->stopRequest(); + } + } + virtual void completed(U32 status, const std::string& reason, const LLSD& content) @@ -638,16 +687,24 @@ void LLMeshRepoThread::loadMeshPhysicsShape(const LLUUID& mesh_id) mPhysicsShapeRequests.insert(mesh_id); } +void LLMeshRepoThread::lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) +{ + if (!LLAppViewer::isQuitting()) + { + loadMeshLOD(mesh_params, lod); + } +} + -void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) -{ //protected by mSignal, no locking needed here +void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) +{ //could be called from any thread + LLMutexLock lock(mMutex); mesh_header_map::iterator iter = mMeshHeader.find(mesh_params.getSculptID()); if (iter != mMeshHeader.end()) { //if we have the header, request LOD byte range LODRequest req(mesh_params, lod); { - LLMutexLock lock(mMutex); mLODReqQ.push(req); LLMeshRepository::sLODProcessing++; } @@ -665,7 +722,6 @@ void LLMeshRepoThread::loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod) } else { //if no header request is pending, fetch header - LLMutexLock lock(mMutex); mHeaderReqQ.push(req); mPendingLOD[mesh_params].push_back(lod); } @@ -945,6 +1001,34 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) return ret; } +//static +void LLMeshRepoThread::incActiveLODRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + ++LLMeshRepoThread::sActiveLODRequests; +} + +//static +void LLMeshRepoThread::decActiveLODRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + --LLMeshRepoThread::sActiveLODRequests; +} + +//static +void LLMeshRepoThread::incActiveHeaderRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + ++LLMeshRepoThread::sActiveHeaderRequests; +} + +//static +void LLMeshRepoThread::decActiveHeaderRequests() +{ + LLMutexLock lock(gMeshRepo.mThread->mMutex); + --LLMeshRepoThread::sActiveHeaderRequests; +} + //return false if failed to get header bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count) { @@ -1821,6 +1905,8 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + // thread could have already be destroyed during logout if( !gMeshRepo.mThread ) { @@ -1838,11 +1924,13 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -1881,6 +1969,8 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + // thread could have already be destroyed during logout if( !gMeshRepo.mThread ) { @@ -1898,11 +1988,13 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -1941,6 +2033,8 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + if( !gMeshRepo.mThread ) { return; @@ -1957,11 +2051,13 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -2000,6 +2096,8 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + // thread could have already be destroyed during logout if( !gMeshRepo.mThread ) { @@ -2017,11 +2115,13 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re { if (status == 499 || status == 503) { //timeout or service unavailable, try again + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } else { + llassert(status == 499 || status == 503); //intentionally trigger a breakpoint llwarns << "Unhandled status " << status << llendl; } return; @@ -2060,6 +2160,8 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer) { + mProcessed = true; + // thread could have already be destroyed during logout if( !gMeshRepo.mThread ) { @@ -2078,8 +2180,12 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, // TODO*: Add maximum retry logic, exponential backoff // and (somewhat more optional than the others) retries // again after some set period of time + + llassert(status == 503 || status == 499); + if (status == 503 || status == 499) { //retry + llwarns << "Timeout or service unavailable, retrying." << llendl; LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); LLMutexLock lock(gMeshRepo.mThread->mMutex); @@ -2087,6 +2193,10 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, return; } + else + { + llwarns << "Unhandled status." << llendl; + } } S32 data_size = buffer->countAfter(channels.in(), NULL); @@ -2101,7 +2211,11 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, LLMeshRepository::sBytesReceived += llmin(data_size, 4096); - if (!gMeshRepo.mThread->headerReceived(mMeshParams, data, data_size)) + bool success = gMeshRepo.mThread->headerReceived(mMeshParams, data, data_size); + + llassert(success); + + if (!success) { llwarns << "Unable to parse mesh header: " diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 6e301c26a2..8eaf691d6f 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -322,7 +322,9 @@ public: virtual void run(); + void lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod); void loadMeshLOD(const LLVolumeParams& mesh_params, S32 lod); + bool fetchMeshHeader(const LLVolumeParams& mesh_params, U32& count); bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, U32& count); bool headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size); @@ -351,6 +353,10 @@ public: // (should hold onto mesh_id and try again later if header info does not exist) bool fetchMeshPhysicsShape(const LLUUID& mesh_id); + static void incActiveLODRequests(); + static void decActiveLODRequests(); + static void incActiveHeaderRequests(); + static void decActiveHeaderRequests(); }; diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 93f7146fc8..eb6591eb39 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -698,19 +698,28 @@ void LLPanelStandStopFlying::updatePosition() S32 y_pos = 0; S32 bottom_tb_center = 0; - if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom")) + if (LLToolBar* toolbar_bottom = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_BOTTOM)) { y_pos = toolbar_bottom->getRect().getHeight(); bottom_tb_center = toolbar_bottom->getRect().getCenterX(); } S32 left_tb_width = 0; - if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left")) + if (LLToolBar* toolbar_left = gToolBarView->getToolbar(LLToolBarView::TOOLBAR_LEFT)) { left_tb_width = toolbar_left->getRect().getWidth(); } - if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container")) + if (!mStateManagementButtons.get()) + { + LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("state_management_buttons_container"); + if (panel_ssf_container) + { + mStateManagementButtons = panel_ssf_container->getHandle(); + } + } + + if(LLPanel* panel_ssf_container = mStateManagementButtons.get()) { panel_ssf_container->setOrigin(0, y_pos); } diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 744dd866d4..c525d9dfdb 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -172,6 +172,8 @@ private: */ LLHandle<LLPanel> mOriginalParent; + LLHandle<LLPanel> mStateManagementButtons; + /** * True if the panel is currently attached to the movement controls floater. * diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index b0fbad33b0..1f1f89349a 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -409,9 +409,9 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, } -void LLNameListCtrl::updateColumns() +void LLNameListCtrl::updateColumns(bool force_update) { - LLScrollListCtrl::updateColumns(); + LLScrollListCtrl::updateColumns(force_update); if (!mNameColumn.empty()) { diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 3ac0565761..09c3d49fe7 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -142,7 +142,7 @@ public: void sortByName(BOOL ascending); - /*virtual*/ void updateColumns(); + /*virtual*/ void updateColumns(bool force_update); /*virtual*/ void mouseOverHighlightNthItem( S32 index ); private: diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index f8f0f7d243..c00dc4bc89 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -203,7 +203,12 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask ) sendChat(CHAT_TYPE_SHOUT); handled = TRUE; } - + else if (KEY_RETURN == key && mask == MASK_SHIFT) + { + // whisper + sendChat(CHAT_TYPE_WHISPER); + handled = TRUE; + } return handled; } @@ -390,12 +395,6 @@ void LLNearbyChatBar::sendChat( EChatType type ) gAgent.stopTyping(); - // If the user wants to stop chatting on hitting return, lose focus - // and go out of chat mode. - if (gSavedSettings.getBOOL("CloseChatOnReturn")) - { - stopChat(); - } } void LLNearbyChatBar::showNearbyChatPanel(bool show) @@ -446,7 +445,12 @@ void LLNearbyChatBar::onChatBoxCommit() { sendChat(CHAT_TYPE_NORMAL); } - + // If the user wants to stop chatting on hitting return, lose focus + // and go out of chat mode. + if (gSavedSettings.getBOOL("CloseChatOnReturn")) + { + stopChat(); + } gAgent.stopTyping(); } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 16c51138a9..34cb27d5ce 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -353,7 +353,8 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi if (from_id.isNull()) { - llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; + // Normal behavior for system generated messages, don't spam. + // llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; return; } diff --git a/indra/newview/llnotificationstorage.cpp b/indra/newview/llnotificationstorage.cpp index fb1adc7ddf..4cad96fdc7 100644 --- a/indra/newview/llnotificationstorage.cpp +++ b/indra/newview/llnotificationstorage.cpp @@ -84,6 +84,11 @@ bool LLPersistentNotificationStorage::onPersistentChannelChanged(const LLSD& pay return false; } +// Storing or loading too many persistent notifications will severely hurt +// viewer load times, possibly to the point of failing to log in. Example case +// from MAINT-994 is 821 notifications. +static const S32 MAX_PERSISTENT_NOTIFICATIONS = 250; + void LLPersistentNotificationStorage::saveNotifications() { // TODO - think about save optimization. @@ -114,6 +119,13 @@ void LLPersistentNotificationStorage::saveNotifications() } data.append(notification->asLLSD()); + + if (data.size() >= MAX_PERSISTENT_NOTIFICATIONS) + { + llwarns << "Too many persistent notifications." + << " Saved " << MAX_PERSISTENT_NOTIFICATIONS << " of " << history_channel->size() << " persistent notifications." << llendl; + break; + } } LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); @@ -124,9 +136,6 @@ void LLPersistentNotificationStorage::loadNotifications() { LLResponderRegistry::registerResponders(); - LLNotifications::instance().getChannel("Persistent")-> - connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1)); - llifstream notify_file(mFileName.c_str()); if (!notify_file.is_open()) { @@ -158,29 +167,48 @@ void LLPersistentNotificationStorage::loadNotifications() findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); LLNotifications& instance = LLNotifications::instance(); - + S32 processed_notifications = 0; for (LLSD::array_const_iterator notification_it = data.beginArray(); notification_it != data.endArray(); ++notification_it) { LLSD notification_params = *notification_it; - LLNotificationPtr notification(new LLNotification(notification_params)); - LLNotificationResponderPtr responder(LLResponderRegistry:: - createResponder(notification_params["name"], notification_params["responder"])); - notification->setResponseFunctor(responder); + if (instance.templateExists(notification_params["name"].asString())) + { + LLNotificationPtr notification(new LLNotification(notification_params)); - instance.add(notification); + LLNotificationResponderPtr responder(LLResponderRegistry:: + createResponder(notification_params["name"], notification_params["responder"])); + notification->setResponseFunctor(responder); - // hide script floaters so they don't confuse the user and don't overlap startup toast - LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false); + instance.add(notification); - if(notification_channel) + // hide script floaters so they don't confuse the user and don't overlap startup toast + LLScriptFloaterManager::getInstance()->setFloaterVisible(notification->getID(), false); + + if(notification_channel) + { + // hide saved toasts so they don't confuse the user + notification_channel->hideToast(notification->getID()); + } + } + else + { + llwarns << "Failed to find template for persistent notification " << notification_params["name"].asString() << llendl; + } + + ++processed_notifications; + if (processed_notifications >= MAX_PERSISTENT_NOTIFICATIONS) { - // hide saved toasts so they don't confuse the user - notification_channel->hideToast(notification->getID()); + llwarns << "Too many persistent notifications." + << " Processed " << MAX_PERSISTENT_NOTIFICATIONS << " of " << data.size() << " persistent notifications." << llendl; + break; } } + + LLNotifications::instance().getChannel("Persistent")-> + connectChanged(boost::bind(&LLPersistentNotificationStorage::onPersistentChannelChanged, this, _1)); } ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index ef5ef2ddc8..c15b6bd0d3 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -117,6 +117,8 @@ public: registrar.add("Gear.Rename", boost::bind(&LLOutfitListGearMenu::onRename, this)); registrar.add("Gear.Delete", boost::bind(&LLOutfitsList::removeSelected, mOutfitList)); registrar.add("Gear.Create", boost::bind(&LLOutfitListGearMenu::onCreate, this, _2)); + registrar.add("Gear.Collapse", boost::bind(&LLOutfitsList::collapse_all_folders, mOutfitList)); + registrar.add("Gear.Expand", boost::bind(&LLOutfitsList::expand_all_folders, mOutfitList)); registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenu::onAdd, this)); @@ -743,6 +745,34 @@ void LLOutfitsList::getSelectedItemsUUIDs(uuid_vec_t& selected_uuids) const } } +void LLOutfitsList::collapse_all_folders() +{ + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if(tab && tab->isExpanded()) + { + tab->changeOpenClose(true); + } + } +} + +void LLOutfitsList::expand_all_folders() +{ + for (outfits_map_t::iterator iter = mOutfitsMap.begin(); + iter != mOutfitsMap.end(); + ++iter) + { + LLAccordionCtrlTab* tab = iter->second; + if(tab && !tab->isExpanded()) + { + tab->changeOpenClose(false); + } + } +} + boost::signals2::connection LLOutfitsList::setSelectionChangeCallback(selection_change_callback_t cb) { return mSelectionChangeSignal.connect(cb); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index a0598737f1..2e3fb3f488 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -108,6 +108,16 @@ public: */ bool hasItemSelected(); + /** + Collapses all outfit accordions. + */ + void collapse_all_folders(); + /** + Expands all outfit accordions. + */ + void expand_all_folders(); + + private: void onOutfitsRemovalConfirmation(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index d42056ef9d..6b9edcb07c 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1186,7 +1186,7 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show, BOOL dis void LLPanelEditWearable::showDefaultSubpart() { - changeCamera(3); + changeCamera(0); } void LLPanelEditWearable::onTabExpandedCollapsed(const LLSD& param, U8 index) diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 68a3b6d1cd..d6fccb9705 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -418,12 +418,13 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_ bool LLLandmarksPanel::isLandmarkSelected() const { LLFolderViewItem* current_item = getCurSelectedItem(); - if(current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) - { - return true; - } + return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK; +} - return false; +bool LLLandmarksPanel::isFolderSelected() const +{ + LLFolderViewItem* current_item = getCurSelectedItem(); + return current_item && current_item->getListener()->getInventoryType() == LLInventoryType::IT_CATEGORY; } bool LLLandmarksPanel::isReceivedFolderSelected() const @@ -720,7 +721,7 @@ void LLLandmarksPanel::initListCommandsHandlers() void LLLandmarksPanel::updateListCommands() { bool add_folder_enabled = isActionEnabled("category"); - bool trash_enabled = isActionEnabled("delete"); + bool trash_enabled = isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected()); // keep Options & Add Landmark buttons always enabled mListCommands->getChildView(ADD_FOLDER_BUTTON_NAME)->setEnabled(add_folder_enabled); diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index b2f4e92473..4e787317ba 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -84,6 +84,7 @@ protected: * @return true - if current selected panel is not null and selected item is a landmark */ bool isLandmarkSelected() const; + bool isFolderSelected() const; bool isReceivedFolderSelected() const; void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb); LLFolderViewItem* getCurSelectedItem() const; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9f3273da2d..fabb8daa6e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -105,7 +105,6 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mMenuAdd(NULL), mNeedUploadCost(true) { - LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT); // Menu Callbacks (non contex menus) mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2)); mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this)); @@ -604,7 +603,6 @@ void LLPanelMainInventory::setFilterTextFromFilter() void LLPanelMainInventory::toggleFindOptions() { - LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE); LLFloater *floater = getFinder(); if (!floater) { @@ -726,7 +724,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() void LLFloaterInventoryFinder::draw() { - LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW); U64 filter = 0xffffffffffffffffULL; BOOL filtered_by_all_types = TRUE; @@ -1177,6 +1174,8 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (command_name == "share") { + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) return FALSE; LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); return parent ? parent->canShare() : FALSE; } diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 35e2e96bab..36234b9536 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -186,8 +186,11 @@ private: // Populate the menu with items like "New Skin", "New Pants", etc. static void populateCreateWearableSubmenus(LLMenuGL* menu) { - LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); - LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE); + // MAINT-2276...these menus are created as dummies because they are not available + // when this function is called. This prevents their parent from popping up later. + // + //LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); + //LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE); for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i) { @@ -200,8 +203,11 @@ private: p.on_click.function_name = "Wearable.Create"; p.on_click.parameter = LLSD(type_name); - LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? - menu_clothes : menu_bp; + //LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp; + // This is a work-around for MAINT-2276 wherein the parent toggleable menu does not appear + // It puts everything under one menu, but that menu appears, which is better than not. + // + LLView* parent = menu; LLUICtrlFactory::create<LLMenuItemCallGL>(p, parent); } } diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 51ab7649a4..e641370d2e 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -425,7 +425,7 @@ void LLPanelPermissions::refresh() } } - getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); + getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); getChildView("Name:")->setEnabled(TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 6d321d4716..6c2a01fc82 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -366,6 +366,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) if (key.size() != 0) { + isLandmarkEditModeOn = false; std::string key_type = key["type"].asString(); if (key_type == LANDMARK_TAB_INFO_TYPE) { @@ -392,7 +393,6 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPlaceInfoType = key_type; mPosGlobal.setZero(); mItem = NULL; - isLandmarkEditModeOn = false; togglePlaceInfoPanel(TRUE); if (mPlaceInfoType == AGENT_INFO_TYPE) diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index c63d89fc98..0756faf5c0 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -972,6 +972,11 @@ void LLTeleportHistoryPanel::onCollapseAllFolders() mItemContainers.get(n)->setDisplayChildren(false); } mHistoryAccordion->arrange(); + + if (mLastSelectedFlatlList) + { + mLastSelectedFlatlList->resetSelection(); + } } void LLTeleportHistoryPanel::onClearTeleportHistory() diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 280cc11179..1830086da2 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -64,9 +64,6 @@ private: LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0) { - LLUICtrl::CommitCallbackRegistry::currentRegistrar() - .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2)); - buildFromFile( "panel_topinfo_bar.xml"); } @@ -132,6 +129,11 @@ void LLPanelTopInfoBar::handleLoginComplete() BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask) { + if(!LLUICtrl::CommitCallbackRegistry::getValue("TopInfoBar.Action")) + { + LLUICtrl::CommitCallbackRegistry::currentRegistrar() + .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2)); + } show_topinfobar_context_menu(this, x, y); return TRUE; } diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp index 9902d047e4..5f5258bbce 100644 --- a/indra/newview/llpolymesh.cpp +++ b/indra/newview/llpolymesh.cpp @@ -750,8 +750,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index) //----------------------------------------------------------------------------- LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh) { - LLMemType mt(LLMemType::MTYPE_AVATAR_MESH); - llassert(shared_data); mSharedData = shared_data; diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h index 850171d169..28da230541 100644 --- a/indra/newview/llpolymesh.h +++ b/indra/newview/llpolymesh.h @@ -400,6 +400,8 @@ protected: // LLPolySkeletalDeformation // A set of joint scale data for deforming the avatar mesh //----------------------------------------------------------------------------- + +LL_ALIGN_PREFIX(16) class LLPolySkeletalDistortion : public LLViewerVisualParam { public: @@ -436,13 +438,14 @@ public: /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;}; protected: + LL_ALIGN_16(LLVector4a mDefaultVec); + typedef std::map<LLJoint*, LLVector3> joint_vec_map_t; joint_vec_map_t mJointScales; joint_vec_map_t mJointOffsets; - LLVector4a mDefaultVec; // Backlink only; don't make this an LLPointer. LLVOAvatar *mAvatar; -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLPOLYMESH_H diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp index bd96608641..495fdc348c 100644 --- a/indra/newview/llpolymorph.cpp +++ b/indra/newview/llpolymorph.cpp @@ -73,9 +73,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) : { const S32 numVertices = mNumIndices; - mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a))); - mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a))); - mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a))); + U32 size = sizeof(LLVector4a)*numVertices; + + mCoords = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) ); + mNormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) ); + mBinormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) ); mTexCoords = new LLVector2[numVertices]; mVertexIndices = new U32[numVertices]; @@ -121,9 +123,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh) //------------------------------------------------------------------------- // allocate vertices //------------------------------------------------------------------------- - mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a))); - mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a))); - mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a))); + + U32 size = sizeof(LLVector4a)*numVertices; + + mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(size)); + mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size)); + mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size)); + mTexCoords = new LLVector2[numVertices]; // Actually, we are allocating more space than we need for the skiplist mVertexIndices = new U32[numVertices]; diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h index 678599d7e1..24940c52e0 100644 --- a/indra/newview/llpolymorph.h +++ b/indra/newview/llpolymorph.h @@ -41,6 +41,7 @@ class LLWearable; //----------------------------------------------------------------------------- // LLPolyMorphData() //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLPolyMorphData { public: @@ -75,12 +76,13 @@ public: F32 mTotalDistortion; // vertex distortion summed over entire morph F32 mMaxDistortion; // maximum single vertex distortion in a given morph - LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph + LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph LLPolyMeshSharedData* mMesh; private: void freeData(); -}; +} LL_ALIGN_POSTFIX(16); + //----------------------------------------------------------------------------- // LLPolyVertexMask() diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index c3c37141ed..343316d30a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -211,7 +211,6 @@ LLSelectMgr::LLSelectMgr() mGridMode = GRID_MODE_WORLD; gSavedSettings.setS32("GridMode", (S32)GRID_MODE_WORLD); - mGridValid = FALSE; mSelectedObjects = new LLObjectSelection(); mHoverObjects = new LLObjectSelection(); @@ -1170,7 +1169,6 @@ void LLSelectMgr::setGridMode(EGridMode mode) mGridMode = mode; gSavedSettings.setS32("GridMode", mode); updateSelectionCenter(); - mGridValid = FALSE; } void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &scale) @@ -1271,7 +1269,6 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & origin = mGridOrigin; rotation = mGridRotation; scale = mGridScale; - mGridValid = TRUE; } //----------------------------------------------------------------------------- @@ -2941,116 +2938,148 @@ BOOL LLSelectMgr::selectGetRootsCopy() return TRUE; } -//----------------------------------------------------------------------------- -// selectGetCreator() -// Creator information only applies to root objects. -//----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) +struct LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) + LLSelectGetFirstTest() : mIdentical(true), mFirst(true) { } + virtual ~LLSelectGetFirstTest() { } + + // returns false to break out of the iteration. + bool checkMatchingNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) + if (!node || !node->mValid) { - return FALSE; + return false; } - if (first) + if (mFirst) { - first_id = node->mPermissions->getCreator(); - first = FALSE; + mFirstValue = getValueFromNode(node); + mFirst = false; } else { - if ( !(first_id == node->mPermissions->getCreator() ) ) + if ( mFirstValue != getValueFromNode(node) ) + { + mIdentical = false; + // stop testing once we know not all selected are identical. + return false; + } + } + // continue testing. + return true; + } + + bool mIdentical; + LLUUID mFirstValue; + +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) = 0; + +private: + bool mFirst; +}; + +void LLSelectMgr::getFirst(LLSelectGetFirstTest* test) +{ + if (gSavedSettings.getBOOL("EditLinkedParts")) + { + for (LLObjectSelection::valid_iterator iter = getSelection()->valid_begin(); + iter != getSelection()->valid_end(); ++iter ) + { + if (!test->checkMatchingNode(*iter)) + { + break; + } + } + } + else + { + for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); + iter != getSelection()->root_object_end(); ++iter ) + { + if (!test->checkMatchingNode(*iter)) { - identical = FALSE; break; } } } - if (first_id.isNull()) +} + +//----------------------------------------------------------------------------- +// selectGetCreator() +// Creator information only applies to roots unless editing linked parts. +//----------------------------------------------------------------------------- +struct LLSelectGetFirstCreator : public LLSelectGetFirstTest +{ +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) + { + return node->mPermissions->getCreator(); + } +}; + +BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) +{ + LLSelectGetFirstCreator test; + getFirst(&test); + + if (test.mFirstValue.isNull()) { name = LLTrans::getString("AvatarNameNobody"); return FALSE; } - result_id = first_id; + result_id = test.mFirstValue; - if (identical) + if (test.mIdentical) { - name = LLSLURL("agent", first_id, "inspect").getSLURLString(); + name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString(); } else { name = LLTrans::getString("AvatarNameMultiple"); } - return identical; + return test.mIdentical; } - //----------------------------------------------------------------------------- // selectGetOwner() -// Owner information only applies to roots. +// Owner information only applies to roots unless editing linked parts. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) +struct LLSelectGetFirstOwner : public LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - BOOL first_group_owned = FALSE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - - if (first) - { - node->mPermissions->getOwnership(first_id, first_group_owned); - first = FALSE; - } - else - { - LLUUID owner_id; - BOOL is_group_owned = FALSE; - if (!(node->mPermissions->getOwnership(owner_id, is_group_owned)) - || owner_id != first_id || is_group_owned != first_group_owned) - { - identical = FALSE; - break; - } - } + // Don't use 'getOwnership' since we return a reference, not a copy. + // Will return LLUUID::null if unowned (which is not allowed and should never happen.) + return node->mPermissions->isGroupOwned() ? node->mPermissions->getGroup() : node->mPermissions->getOwner(); } - if (first_id.isNull()) +}; + +BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) +{ + LLSelectGetFirstOwner test; + getFirst(&test); + + if (test.mFirstValue.isNull()) { return FALSE; } - result_id = first_id; + result_id = test.mFirstValue; - if (identical) + if (test.mIdentical) { - BOOL public_owner = (first_id.isNull() && !first_group_owned); - if (first_group_owned) - { - name = LLSLURL("group", first_id, "inspect").getSLURLString(); - } - else if(!public_owner) + bool group_owned = selectIsGroupOwned(); + if (group_owned) { - name = LLSLURL("agent", first_id, "inspect").getSLURLString(); + name = LLSLURL("group", test.mFirstValue, "inspect").getSLURLString(); } else { - name = LLTrans::getString("AvatarNameNobody"); + name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString(); } } else @@ -3058,131 +3087,92 @@ BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) name = LLTrans::getString("AvatarNameMultiple"); } - return identical; + return test.mIdentical; } - //----------------------------------------------------------------------------- // selectGetLastOwner() -// Owner information only applies to roots. +// Owner information only applies to roots unless editing linked parts. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) +struct LLSelectGetFirstLastOwner : public LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - - if (first) - { - first_id = node->mPermissions->getLastOwner(); - first = FALSE; - } - else - { - if ( !(first_id == node->mPermissions->getLastOwner() ) ) - { - identical = FALSE; - break; - } - } + return node->mPermissions->getLastOwner(); } - if (first_id.isNull()) +}; + +BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) +{ + LLSelectGetFirstLastOwner test; + getFirst(&test); + + if (test.mFirstValue.isNull()) { return FALSE; } - result_id = first_id; + result_id = test.mFirstValue; - if (identical) + if (test.mIdentical) { - BOOL public_owner = (first_id.isNull()); - if(!public_owner) - { - name = LLSLURL("agent", first_id, "inspect").getSLURLString(); - } - else - { - name.assign("Public or Group"); - } + name = LLSLURL("agent", test.mFirstValue, "inspect").getSLURLString(); } else { name.assign( "" ); } - return identical; + return test.mIdentical; } - //----------------------------------------------------------------------------- // selectGetGroup() -// Group information only applies to roots. +// Group information only applies to roots unless editing linked parts. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) +struct LLSelectGetFirstGroup : public LLSelectGetFirstTest { - BOOL identical = TRUE; - BOOL first = TRUE; - LLUUID first_id; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) - { - return FALSE; - } - - if (first) - { - first_id = node->mPermissions->getGroup(); - first = FALSE; - } - else - { - if ( !(first_id == node->mPermissions->getGroup() ) ) - { - identical = FALSE; - break; - } - } + return node->mPermissions->getGroup(); } +}; - result_id = first_id; +BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) +{ + LLSelectGetFirstGroup test; + getFirst(&test); - return identical; + result_id = test.mFirstValue; + return test.mIdentical; } //----------------------------------------------------------------------------- // selectIsGroupOwned() -// Only operates on root nodes. -// Returns TRUE if all have valid data and they are all group owned. +// Only operates on root nodes unless editing linked parts. +// Returns TRUE if the first selected is group owned. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectIsGroupOwned() +struct LLSelectGetFirstGroupOwner : public LLSelectGetFirstTest { - BOOL found_one = FALSE; - for (LLObjectSelection::root_object_iterator iter = getSelection()->root_object_begin(); - iter != getSelection()->root_object_end(); iter++ ) +protected: + virtual const LLUUID& getValueFromNode(LLSelectNode* node) { - LLSelectNode* node = *iter; - if (!node->mValid) + if (node->mPermissions->isGroupOwned()) { - return FALSE; + return node->mPermissions->getGroup(); } - found_one = TRUE; - if (!node->mPermissions->isGroupOwned()) - { - return FALSE; - } - } - return found_one ? TRUE : FALSE; + return LLUUID::null; + } +}; + +BOOL LLSelectMgr::selectIsGroupOwned() +{ + LLSelectGetFirstGroupOwner test; + getFirst(&test); + + return test.mFirstValue.notNull() ? TRUE : FALSE; } //----------------------------------------------------------------------------- @@ -4987,7 +4977,11 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data } func(id); LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func); - if (node) + if (!node) + { + llwarns << "Couldn't find object " << id << " selected." << llendl; + } + else { if (node->mInventorySerial != inv_serial) { @@ -5058,13 +5052,6 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data dialog_refresh_all(); - // silly hack to allow 'save into inventory' - if(gPopupMenuView->getVisible()) - { - gPopupMenuView->setItemEnabled(SAVE_INTO_INVENTORY, - enable_save_into_inventory(NULL)); - } - // hack for left-click buy object LLToolPie::selectionPropertiesReceived(); } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index ecbb20df1b..cc78e35869 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -343,6 +343,9 @@ typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle; extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance(); #endif +// For use with getFirstTest() +struct LLSelectGetFirstTest; + class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr> { public: @@ -745,6 +748,9 @@ private: static void packGodlikeHead(void* user_data); static bool confirmDelete(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle); + // Get the first ID that matches test and whether or not all ids are identical in selected objects. + void getFirst(LLSelectGetFirstTest* test); + public: // Observer/callback support for when object selection changes or // properties are received/updated @@ -763,8 +769,6 @@ private: LLVector3 mGridOrigin; LLVector3 mGridScale; EGridMode mGridMode; - BOOL mGridValid; - BOOL mTEMode; // render te LLVector3d mSelectionCenterGlobal; diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 853656905c..d909a218e3 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -456,10 +456,10 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) void LLSidepanelAppearance::editWearable(LLWearable *wearable, LLView *data, BOOL disable_camera_switch) { LLFloaterSidePanelContainer::showPanel("appearance", LLSD()); - LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(data); if (panel) { + panel->showOutfitsInventoryPanel(); panel->showWearableEditPanel(wearable, disable_camera_switch); } } diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index c351b1a128..5532bdc71a 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -101,6 +101,8 @@ BOOL LLSidepanelTaskInfo::postBuild() mDetailsBtn = getChild<LLButton>("details_btn"); mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this)); + mDeedBtn = getChild<LLButton>("button deed"); + mLabelGroupName = getChild<LLNameBox>("Group Name Proxy"); childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this); @@ -263,7 +265,7 @@ void LLSidepanelTaskInfo::disableAll() void LLSidepanelTaskInfo::refresh() { - LLButton* btn_deed_to_group = getChild<LLButton>("button deed"); + LLButton* btn_deed_to_group = mDeedBtn; if (btn_deed_to_group) { std::string deedText; diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index 124229af06..05edcda5ed 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -113,6 +113,7 @@ private: LLButton* mPayBtn; LLButton* mBuyBtn; LLButton* mDetailsBtn; + LLButton* mDeedBtn; protected: LLViewerObject* getObject(); diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 2083afdcf5..af740fe73d 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -55,7 +55,7 @@ #include "llviewershadermgr.h" static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); -static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound Partition"); const F32 SG_OCCLUSION_FUDGE = 0.25f; #define SG_DISCARD_TOLERANCE 0.01f @@ -376,7 +376,6 @@ LLSpatialGroup::~LLSpatialGroup() } } - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); clearDrawMap(); clearAtlasList() ; } @@ -615,8 +614,6 @@ void LLSpatialGroup::validateDrawMap() BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - drawablep->updateSpatialExtents(); OctreeNode* parent = mOctreeNode->getOctParent(); @@ -638,7 +635,6 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_octree) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (!from_octree) { mOctreeNode->insert(drawablep); @@ -664,7 +660,6 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep, BOOL add_all, BOOL from_oc void LLSpatialGroup::rebuildGeom() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (!isDead()) { mSpatialPartition->rebuildGeom(this); @@ -876,7 +871,6 @@ LLSpatialGroup* LLSpatialGroup::getParent() BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); unbound(); if (mOctreeNode && !from_octree) { @@ -913,7 +907,6 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) void LLSpatialGroup::shift(const LLVector4a &offset) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLVector4a t = mOctreeNode->getCenter(); t.add(offset); mOctreeNode->setCenter(t); @@ -968,8 +961,6 @@ void LLSpatialGroup::setState(U32 state) void LLSpatialGroup::setState(U32 state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - llassert(state <= LLSpatialGroup::STATE_MASK); if (mode > STATE_MODE_SINGLE) @@ -1026,8 +1017,6 @@ void LLSpatialGroup::clearState(U32 state, S32 mode) { llassert(state <= LLSpatialGroup::STATE_MASK); - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1084,8 +1073,6 @@ public: void LLSpatialGroup::setOcclusionState(U32 state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1150,8 +1137,6 @@ public: void LLSpatialGroup::clearOcclusionState(U32 state, S32 mode) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (mode > STATE_MODE_SINGLE) { if (mode == STATE_MODE_DIFF) @@ -1203,7 +1188,6 @@ LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) : ll_assert_aligned(this,16); sNodeCount++; - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); mViewAngle.splat(0.f); mLastUpdateViewAngle.splat(-1.f); @@ -1389,7 +1373,6 @@ BOOL LLSpatialGroup::changeLOD() void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); addObject(drawablep, FALSE, TRUE); unbound(); setState(OBJECT_DIRTY); @@ -1397,14 +1380,12 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLDrawable* drawablep void LLSpatialGroup::handleRemoval(const TreeNode* node, LLDrawable* drawable) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); removeObject(drawable, TRUE); setState(OBJECT_DIRTY); } void LLSpatialGroup::handleDestruction(const TreeNode* node) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); setState(DEAD); for (element_iter i = getDataBegin(); i != getDataEnd(); ++i) @@ -1446,7 +1427,6 @@ void LLSpatialGroup::handleStateChange(const TreeNode* node) void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (child->getListenerCount() == 0) { new LLSpatialGroup(child, mSpatialPartition); @@ -1792,7 +1772,6 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera) LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 buffer_usage) : mRenderByGroup(render_by_group), mBridge(NULL) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); mOcclusionEnabled = TRUE; mDrawableType = 0; mPartitionType = LLViewerRegion::PARTITION_NONE; @@ -1816,8 +1795,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 LLSpatialPartition::~LLSpatialPartition() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - delete mOctree; mOctree = NULL; } @@ -1825,8 +1802,6 @@ LLSpatialPartition::~LLSpatialPartition() LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - drawablep->updateSpatialExtents(); //keep drawable from being garbage collected @@ -1848,8 +1823,6 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - if (!curp->removeObject(drawablep)) { OCT_ERRS << "Failed to remove drawable from octree!" << llendl; @@ -1868,8 +1841,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - // sanity check submitted by open source user bushing Spatula // who was seeing crashing here. (See VWR-424 reported by Bunny Mayne) if (!drawablep) @@ -1926,7 +1897,6 @@ public: void LLSpatialPartition::shift(const LLVector4a &offset) { //shift octree node bounding boxes by offset - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLSpatialShift shifter(offset); shifter.traverse(mOctree); } @@ -2340,7 +2310,6 @@ public: void LLSpatialPartition::restoreGL() { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); } void LLSpatialPartition::resetVertexBuffers() @@ -2383,7 +2352,6 @@ BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) S32 LLSpatialPartition::cull(LLCamera &camera, std::vector<LLDrawable *>* results, BOOL for_select) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); #if LL_OCTREE_PARANOIA_CHECK ((LLSpatialGroup*)mOctree->getListener(0))->checkStates(); #endif @@ -4441,8 +4409,6 @@ void LLSpatialPartition::renderDebug() sCurMaxTexPriority = 0.f; } - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); - LLGLDisable cullface(GL_CULL_FACE); LLGLEnable blend(GL_BLEND); gGL.setSceneBlendType(LLRender::BT_ALPHA); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3d1fd74ba6..0e3007724b 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -312,8 +312,6 @@ void update_texture_fetch() // true when all initialization done. bool idle_startup() { - LLMemType mt1(LLMemType::MTYPE_STARTUP); - const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); static LLTimer timeout; static S32 timeout_count = 0; @@ -1420,7 +1418,7 @@ bool idle_startup() display_startup(); //reset statistics - LLViewerStats::getInstance()->resetStats(); + LLViewerStats::instance().resetStats(); display_startup(); // @@ -1949,7 +1947,7 @@ bool idle_startup() llinfos << "gAgentStartLocation : " << gAgentStartLocation << llendl; LLSLURL start_slurl = LLStartUp::getStartSLURL(); LL_DEBUGS("AppInit") << "start slurl "<<start_slurl.asString()<<LL_ENDL; - + if (((start_slurl.getType() == LLSLURL::LOCATION) && (gAgentStartLocation == "url")) || ((start_slurl.getType() == LLSLURL::LAST_LOCATION) && (gAgentStartLocation == "last")) || ((start_slurl.getType() == LLSLURL::HOME_LOCATION) && (gAgentStartLocation == "home"))) @@ -2296,7 +2294,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) // break; case 2: // Teleport // Restart the login process, starting at our home locaton - LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); + LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME)); LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); break; default: diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index f64a72a616..ec11a23eb8 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -62,8 +62,6 @@ LLColor4U MAX_WATER_COLOR(0, 48, 96, 240); S32 LLSurface::sTextureSize = 256; -S32 LLSurface::sTexelsUpdated = 0; -F32 LLSurface::sTextureUpdateTime = 0.f; // ---------------- LLSurface:: Public Members --------------- @@ -647,7 +645,6 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent) BOOL LLSurface::idleUpdate(F32 max_update_time) { - LLMemType mt_ius(LLMemType::MTYPE_IDLE_UPDATE_SURFACE); if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN)) { return FALSE; diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h index 8052fb0d18..9d24bf8771 100644 --- a/indra/newview/llsurface.h +++ b/indra/newview/llsurface.h @@ -169,9 +169,6 @@ public: F32 mDetailTextureScale; // Number of times to repeat detail texture across this surface - static F32 sTextureUpdateTime; - static S32 sTexelsUpdated; - protected: void createSTexture(); void createWaterTexture(); diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h index fffe20208f..c812199796 100644 --- a/indra/newview/lltexlayerparams.h +++ b/indra/newview/lltexlayerparams.h @@ -58,6 +58,7 @@ protected: // LLTexLayerParamAlpha // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL_ALIGN_PREFIX(16) class LLTexLayerParamAlpha : public LLTexLayerParam { public: @@ -65,8 +66,6 @@ public: LLTexLayerParamAlpha( LLVOAvatar* avatar ); /*virtual*/ ~LLTexLayerParamAlpha(); - /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; - void* operator new(size_t size) { return ll_aligned_malloc_16(size); @@ -77,6 +76,8 @@ public: ll_aligned_free_16(ptr); } + /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; + // LLVisualParam Virtual functions ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex avatar_sex ) {} @@ -104,7 +105,7 @@ private: LLPointer<LLImageRaw> mStaticImageRaw; BOOL mNeedsCreateTexture; BOOL mStaticImageInvalid; - LLVector4a mAvgDistortionVec; + LL_ALIGN_16(LLVector4a mAvgDistortionVec); F32 mCachedEffectiveWeight; public: @@ -114,7 +115,7 @@ public: typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t; static param_alpha_ptr_list_t sInstances; -}; +} LL_ALIGN_POSTFIX(16); class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo { friend class LLTexLayerParamAlpha; @@ -138,6 +139,8 @@ private: // LLTexLayerParamColor // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +LL_ALIGN_PREFIX(16) class LLTexLayerParamColor : public LLTexLayerParam { public: @@ -151,7 +154,6 @@ public: LLTexLayerParamColor( LLTexLayerInterface* layer ); LLTexLayerParamColor( LLVOAvatar* avatar ); - /* virtual */ ~LLTexLayerParamColor(); void* operator new(size_t size) { @@ -163,6 +165,8 @@ public: ll_aligned_free_16(ptr); } + /* virtual */ ~LLTexLayerParamColor(); + /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; // LLVisualParam Virtual functions @@ -186,8 +190,8 @@ public: protected: virtual void onGlobalColorChanged(bool upload_bake) {} private: - LLVector4a mAvgDistortionVec; -}; + LL_ALIGN_16(LLVector4a mAvgDistortionVec); +} LL_ALIGN_POSTFIX(16); class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo { diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 305f6fca0f..102b97de30 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1912,10 +1912,10 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis h >>= i; if(w * h *c > 0) //valid { - LLPointer<LLImageRaw> newraw = new LLImageRaw(raw->getData(), raw->getWidth(), raw->getHeight(), raw->getComponents()); - newraw->scale(w, h) ; - raw = newraw; - + //make a duplicate to keep the original raw image untouched. + raw = raw->duplicate(); + raw->scale(w, h) ; + discardlevel += i ; } } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index a2854dd6d8..7de66b139f 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -50,6 +50,7 @@ #include "llviewertexture.h" #include "llviewerregion.h" #include "llviewerstats.h" +#include "llviewerstatsrecorder.h" #include "llviewerassetstats.h" #include "llworld.h" #include "llsdutil.h" @@ -2088,6 +2089,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL; if (data_size > 0) { + LLViewerStatsRecorder::instance().textureFetch(data_size); // *TODO: set the formatted image data here directly to avoid the copy // Hold on to body for later copy @@ -2162,6 +2164,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, mLoaded = TRUE; setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); + LLViewerStatsRecorder::instance().log(0.2f); return data_size ; } @@ -3204,7 +3207,11 @@ bool LLTextureFetch::receiveImageHeader(const LLHost& host, const LLUUID& id, U8 return false; } - worker->lockWorkMutex(); // +Mw + LLViewerStatsRecorder::instance().textureFetch(data_size); + LLViewerStatsRecorder::instance().log(0.1f); + + worker->lockWorkMutex(); + // Copy header data into image object worker->mImageCodec = codec; @@ -3251,8 +3258,12 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 mNetworkQueueMutex.unlock(); // -Mfnq return false; } + + LLViewerStatsRecorder::instance().textureFetch(data_size); + LLViewerStatsRecorder::instance().log(0.1f); + + worker->lockWorkMutex(); - worker->lockWorkMutex(); // +Mw res = worker->insertPacket(packet_num, data, data_size); @@ -3678,13 +3689,14 @@ public: if (status) { - LL_WARNS("Texture") << "Successfully delivered asset metrics to grid." - << LL_ENDL; + LL_DEBUGS("Texture") << "Successfully delivered asset metrics to grid." + << LL_ENDL; } else { - LL_WARNS("Texture") << "Error delivering asset metrics to grid. Reason: " - << status.toString() << LL_ENDL; + LL_WARNS("Texture") << "Error delivering asset metrics to grid. Status: " + << status.toHex() + << ", Reason: " << status.toString() << LL_ENDL; } } }; // end class AssetReportHandler @@ -3884,11 +3896,15 @@ private: LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextureCache* cache, LLImageDecodeThread* imagedecodethread) : + LLCore::HttpHandler(), mFetcher(fetcher), mTextureCache(cache), mImageDecodeThread(imagedecodethread), mHttpHeaders(NULL), - mHttpPolicyClass(fetcher->getPolicyClass()) + mHttpPolicyClass(fetcher->getPolicyClass()), + mNbCurlCompleted(0), + mTempIndex(0), + mHistoryListIndex(0) { init(); } @@ -3914,6 +3930,7 @@ void LLTextureFetchDebugger::init() mDecodingTime = -1.f; mHTTPTime = -1.f; mGLCreationTime = -1.f; + mTotalFetchingTime = 0.f; mRefetchVisCacheTime = -1.f; mRefetchVisHTTPTime = -1.f; @@ -3940,6 +3957,9 @@ void LLTextureFetchDebugger::init() mFreezeHistory = FALSE; mStopDebug = FALSE; mClearHistory = FALSE; + mRefetchNonVis = FALSE; + + mNbCurlRequests = 0; if (! mHttpHeaders) { @@ -4013,7 +4033,8 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time) S32 pending = 0; pending += LLAppViewer::getTextureCache()->update(1); pending += LLAppViewer::getImageDecodeThread()->update(1); - pending += LLAppViewer::getTextureFetch()->update(1); + // pending += LLAppViewer::getTextureFetch()->update(1); // This causes infinite recursion in some cases + pending += mNbCurlRequests; if(!pending) { break; @@ -4026,7 +4047,7 @@ bool LLTextureFetchDebugger::processStartDebug(F32 max_time) } //collect statistics - mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32() - mTotalFetchingTime; + mTotalFetchingTime = gTextureTimer.getElapsedTimeF32() - mTotalFetchingTime; std::set<LLUUID> fetched_textures; S32 size = mFetchingHistory.size(); @@ -4127,7 +4148,7 @@ void LLTextureFetchDebugger::tryToStopDebug() mFetchingHistory.clear(); mHandleToFetchIndex.clear(); init(); - mTotalFetchingTime = gDebugTimers[0].getElapsedTimeF32(); //reset + mTotalFetchingTime = gTextureTimer.getElapsedTimeF32(); //reset } } } @@ -4303,7 +4324,6 @@ void LLTextureFetchDebugger::debugHTTP() { mFetchingHistory[i].mCurlState = FetchEntry::CURL_NOT_DONE; mFetchingHistory[i].mCurlReceivedSize = 0; - mFetchingHistory[i].mHTTPFailCount = 0; mFetchingHistory[i].mFormattedImage = NULL; } mNbCurlRequests = 0; @@ -4327,8 +4347,6 @@ S32 LLTextureFetchDebugger::fillCurlQueue() S32 size = mFetchingHistory.size(); for (S32 i = 0 ; i < size ; i++) { - mNbCurlRequests++; - if (mFetchingHistory[i].mCurlState != FetchEntry::CURL_NOT_DONE) { continue; @@ -4354,15 +4372,22 @@ S32 LLTextureFetchDebugger::fillCurlQueue() mFetchingHistory[i].mHttpHandle = handle; mFetchingHistory[i].mCurlState = FetchEntry::CURL_IN_PROGRESS; mNbCurlRequests++; - // Hack - if (mNbCurlRequests == HTTP_REQUESTS_IN_QUEUE_HIGH_WATER) // emulate normal pipeline + if (mNbCurlRequests >= HTTP_REQUESTS_IN_QUEUE_HIGH_WATER) // emulate normal pipeline { break; } } else { - break; + // Failed to queue request, log it and mark it done. + LLCore::HttpStatus status(mFetcher->getHttpRequest().getStatus()); + + LL_WARNS("Texture") << "Couldn't issue HTTP request in debugger for texture " + << mFetchingHistory[i].mID + << ", status: " << status.toHex() + << " reason: " << status.toString() + << LL_ENDL; + mFetchingHistory[i].mCurlState = FetchEntry::CURL_DONE; } } //llinfos << "Fetch Debugger : Having " << mNbCurlRequests << " requests through the curl thread." << llendl; @@ -4716,14 +4741,13 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon LLCore::HttpStatus status(response->getStatus()); mNbCurlRequests--; + mNbCurlCompleted++; + fetch.mCurlState = FetchEntry::CURL_DONE; if (status) { const bool partial(par_status == status); LLCore::BufferArray * ba(response->getBody()); // *Not* holding reference to body - fetch.mCurlState = FetchEntry::CURL_DONE; - mNbCurlCompleted++; - S32 data_size = ba ? ba->size() : 0; fetch.mCurlReceivedSize += data_size; //llinfos << "Fetch Debugger : got results for " << fetch.mID << ", data_size = " << data_size << ", received = " << fetch.mCurlReceivedSize << ", requested = " << fetch.mRequestedSize << ", partial = " << partial << llendl; @@ -4755,17 +4779,6 @@ void LLTextureFetchDebugger::callbackHTTP(FetchEntry & fetch, LLCore::HttpRespon llinfos << "Fetch Debugger : CURL GET FAILED, ID = " << fetch.mID << ", status: " << status.toHex() << " reason: " << status.toString() << llendl; - fetch.mHTTPFailCount++; - if(fetch.mHTTPFailCount < 5) - { - // Fetch will have to be redone - fetch.mCurlState = FetchEntry::CURL_NOT_DONE; - } - else //skip - { - fetch.mCurlState = FetchEntry::CURL_DONE; - mNbCurlCompleted++; - } } } diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 3a99432b48..5ea3c14e1a 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -37,7 +37,9 @@ #include "lltextureinfo.h" #include "llapr.h" #include "llimageworker.h" +#include "llstat.h" #include "llcurl.h" +#include "llstat.h" #include "httprequest.h" #include "httpoptions.h" #include "httpheaders.h" @@ -449,7 +451,6 @@ private: LLPointer<LLImageRaw> mRawImage; e_curl_state mCurlState; S32 mCurlReceivedSize; - S32 mHTTPFailCount; LLCore::HttpHandle mHttpHandle; FetchEntry() : @@ -465,7 +466,6 @@ private: mFetchedSize(f_size), mDecodedSize(d_size), mNeedsAux(false), - mHTTPFailCount(0), mHttpHandle(LLCORE_HTTP_HANDLE_INVALID) {} }; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 8fef2ed6d1..3f75f8da5e 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -357,6 +357,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal if (mLineEditor) { mLineEditor->selectAll(); + mLineEditor->setFocus(TRUE); } if(mDefaultOption >= 0) { diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 81ad96f39e..a29f58b319 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -76,7 +76,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p) mShowToolbars(true), mDragToolbarButton(NULL), mDragItem(NULL), - mToolbarsLoaded(false) + mToolbarsLoaded(false), + mBottomToolbarPanel(NULL) { for (S32 i = 0; i < TOOLBAR_COUNT; i++) { @@ -100,6 +101,7 @@ BOOL LLToolBarView::postBuild() mToolbars[TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left"); mToolbars[TOOLBAR_RIGHT] = getChild<LLToolBar>("toolbar_right"); mToolbars[TOOLBAR_BOTTOM] = getChild<LLToolBar>("toolbar_bottom"); + mBottomToolbarPanel = getChild<LLView>("bottom_toolbar_panel"); for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++) { diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index 9c4194ebed..7125dd9990 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -108,7 +108,8 @@ public: static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); static void resetDragTool(LLToolBarButton* toolbarButton); LLInventoryObject* getDragItem(); - + LLView* getBottomToolbar() { return mBottomToolbarPanel; } + LLToolBar* getToolbar(EToolBarLocation toolbar) { return mToolbars[toolbar]; } bool isModified() const; protected: @@ -133,6 +134,7 @@ private: LLToolBarButton* mDragToolbarButton; LLInventoryObject* mDragItem; bool mShowToolbars; + LLView* mBottomToolbarPanel; }; extern LLToolBarView* gToolBarView; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 3cd761b73b..a0c12df834 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -125,9 +125,10 @@ BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) mPick.mKeyMask = mask; // claim not handled so UI focus stays same - - handleRightClickPick(); - + if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + { + handleRightClickPick(); + } return FALSE; } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index dec1615246..051f5f4485 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -72,6 +72,8 @@ #include "llpanellogin.h" #include "llpaneltopinfobar.h" #include "llspellcheck.h" +#include "llslurl.h" +#include "llstartup.h" #include "llupdaterservice.h" // Third party library includes @@ -496,6 +498,20 @@ bool handleForceShowGrid(const LLSD& newvalue) return true; } +bool handleLoginLocationChanged() +{ + /* + * This connects the default preference setting to the state of the login + * panel if it is displayed; if you open the preferences panel before + * logging in, and change the default login location there, the login + * panel immediately changes to match your new preference. + */ + std::string new_login_location = gSavedSettings.getString("LoginLocation"); + LL_DEBUGS("AppInit")<<new_login_location<<LL_ENDL; + LLStartUp::setStartSLURL(LLSLURL(new_login_location)); + return true; +} + bool handleSpellCheckChanged() { if (gSavedSettings.getBOOL("SpellCheck")) @@ -721,6 +737,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); + gSavedSettings.getControl("LoginLocation")->getSignal()->connect(boost::bind(&handleLoginLocationChanged)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index d58ee05fb6..ffeea2f4df 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -168,7 +168,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_CAMERA("Update Camera"); void display_update_camera() { LLFastTimer t(FTM_UPDATE_CAMERA); - LLMemType mt_uc(LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA); // TODO: cut draw distance down if customizing avatar? // TODO: cut draw distance on per-parcel basis? @@ -218,7 +217,7 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky"); static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class"); -static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump"); +static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Image Update Bump"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List"); static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete"); static LLFastTimer::DeclareTimer FTM_RESIZE_WINDOW("Resize Window"); @@ -230,7 +229,6 @@ static LLFastTimer::DeclareTimer FTM_TELEPORT_DISPLAY("Teleport Display"); // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { - LLMemType mt_render(LLMemType::MTYPE_RENDER); LLFastTimer t(FTM_RENDER); if (gWindowResized) @@ -581,7 +579,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (!gDisconnected) { - LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE); LLAppViewer::instance()->pingMainloopTimeout("Display:Update"); if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) { //don't draw hud objects in this frame @@ -603,7 +600,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // *TODO: merge these two methods { LLFastTimer t(FTM_HUD_UPDATE); - LLMemType mt_uh(LLMemType::MTYPE_DISPLAY_UPDATE_HUD); LLHUDManager::getInstance()->updateEffects(); LLHUDObject::updateAll(); stop_glerror(); @@ -611,7 +607,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLFastTimer t(FTM_DISPLAY_UPDATE_GEOM); - LLMemType mt_ug(LLMemType::MTYPE_DISPLAY_UPDATE_GEOM); const F32 max_geom_update_time = 0.005f*10.f*gFrameIntervalSeconds; // 50 ms/second update time gPipeline.createObjects(max_geom_update_time); gPipeline.processPartitionQ(); @@ -672,8 +667,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:Swap"); { - LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP); - if (gResizeScreenTexture) { gResizeScreenTexture = FALSE; @@ -732,7 +725,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) //if (!for_snapshot) { - LLMemType mt_gw(LLMemType::MTYPE_DISPLAY_GEN_REFLECTION); LLAppViewer::instance()->pingMainloopTimeout("Display:Imagery"); gPipeline.generateWaterReflection(*LLViewerCamera::getInstance()); gPipeline.generateHighlight(*LLViewerCamera::getInstance()); @@ -752,7 +744,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:UpdateImages"); { - LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE); LLFastTimer t(FTM_IMAGE_UPDATE); { @@ -796,7 +787,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLAppViewer::instance()->pingMainloopTimeout("Display:StateSort"); { LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; - LLMemType mt_ss(LLMemType::MTYPE_DISPLAY_STATE_SORT); gPipeline.stateSort(*LLViewerCamera::getInstance(), result); stop_glerror(); @@ -818,7 +808,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLPipeline::sUseOcclusion = occlusion; { - LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SKY); LLAppViewer::instance()->pingMainloopTimeout("Display:Sky"); LLFastTimer t(FTM_UPDATE_SKY); gSky.updateSky(); @@ -907,7 +896,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) && !gRestoreGL) { LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; - LLMemType mt_rg(LLMemType::MTYPE_DISPLAY_RENDER_GEOM); if (gSavedSettings.getBOOL("RenderDepthPrePass") && LLGLSLShader::sNoFixedFunction) { @@ -968,7 +956,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (to_texture) { - LLMemType mt_rf(LLMemType::MTYPE_DISPLAY_RENDER_FLUSH); if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender) { gPipeline.mDeferredScreen.flush(); @@ -1035,7 +1022,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) void render_hud_attachments() { - LLMemType mt_ra(LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS); gGL.matrixMode(LLRender::MM_PROJECTION); gGL.pushMatrix(); gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -1225,7 +1211,6 @@ static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); void render_ui(F32 zoom_factor, int subfield) { - LLMemType mt_ru(LLMemType::MTYPE_DISPLAY_RENDER_UI); LLGLState::checkStates(); glh::matrix4f saved_view = glh_get_current_modelview(); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 47059b0b8c..2df028de69 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -316,9 +316,13 @@ public: /* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content) { LL_WARNS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL; - LL_WARNS("MediaAuth") << content << LL_ENDL; + + LLSD stripped_content = content; + stripped_content.erase("set-cookie"); + LL_WARNS("MediaAuth") << stripped_content << LL_ENDL; std::string cookie = content["set-cookie"].asString(); + LL_DEBUGS("MediaAuth") << "cookie = " << cookie << LL_ENDL; LLViewerMedia::getCookieStore()->setCookiesFromHost(cookie, mHost); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5a8ef00b1f..93e4f4428a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -166,7 +166,6 @@ LLContextMenu *gMenuAttachmentSelf = NULL; LLContextMenu *gMenuAttachmentOther = NULL; LLContextMenu *gMenuLand = NULL; -const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory"); const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); LLMenuGL* gAttachSubMenu = NULL; @@ -311,7 +310,6 @@ void handle_grab_baked_texture(void*); BOOL enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); -BOOL enable_save_into_inventory(void*); BOOL enable_save_into_task_inventory(void*); BOOL enable_detach(const LLSD& = LLSD()); @@ -342,7 +340,8 @@ LLMenuParcelObserver::~LLMenuParcelObserver() void LLMenuParcelObserver::changed() { - gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL)); + LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); + gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID())); BOOL buyable = enable_buy_land(NULL); gMenuHolder->childSetEnabled("Land Buy", buyable); @@ -1317,22 +1316,6 @@ class LLAdvancedPrintAgentInfo : public view_listener_t } }; - - -//////////////////////////////// -// PRINT TEXTURE MEMORY STATS // -//////////////////////////////// - - -class LLAdvancedPrintTextureMemoryStats : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - output_statistics(NULL); - return true; - } -}; - ////////////////// // DEBUG CLICKS // ////////////////// @@ -1656,6 +1639,54 @@ class LLAdvancedForceParamsToDefault : public view_listener_t }; +////////////////////////// +// ANIMATION SPEED // +////////////////////////// + +// Utility function to set all AV time factors to the same global value +static void set_all_animation_time_factors(F32 time_factor) +{ + LLMotionController::setCurrentTimeFactor(time_factor); + for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + (*iter)->setAnimTimeFactor(time_factor); + } +} + +class LLAdvancedAnimTenFaster : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + //llinfos << "LLAdvancedAnimTenFaster" << llendl; + F32 time_factor = LLMotionController::getCurrentTimeFactor(); + time_factor = llmin(time_factor + 0.1f, 2.f); // Upper limit is 200% speed + set_all_animation_time_factors(time_factor); + return true; + } +}; + +class LLAdvancedAnimTenSlower : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + //llinfos << "LLAdvancedAnimTenSlower" << llendl; + F32 time_factor = LLMotionController::getCurrentTimeFactor(); + time_factor = llmax(time_factor - 0.1f, 0.1f); // Lower limit is at 10% of normal speed + set_all_animation_time_factors(time_factor); + return true; + } +}; + +class LLAdvancedAnimResetAll : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + set_all_animation_time_factors(1.f); + return true; + } +}; + ////////////////////////// // RELOAD VERTEX SHADER // @@ -3464,6 +3495,20 @@ bool enable_sitdown_self() return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } +class LLCheckPanelPeopleTab : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string panel_name = userdata.asString(); + + LLPanel *panel = LLFloaterSidePanelContainer::getPanel("people", panel_name); + if(panel && panel->isInVisibleChain()) + { + return true; + } + return false; + } +}; // Toggle one of "People" panel tabs in side tray. class LLTogglePanelPeopleTab : public view_listener_t { @@ -3912,25 +3957,27 @@ class LLViewToggleUI : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLNotification::Params params("ConfirmHideUI"); - params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); - LLSD substitutions; + if(gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + { + LLNotification::Params params("ConfirmHideUI"); + params.functor.function(boost::bind(&LLViewToggleUI::confirm, this, _1, _2)); + LLSD substitutions; #if LL_DARWIN - substitutions["SHORTCUT"] = "Cmd+Shift+U"; + substitutions["SHORTCUT"] = "Cmd+Shift+U"; #else - substitutions["SHORTCUT"] = "Ctrl+Shift+U"; + substitutions["SHORTCUT"] = "Ctrl+Shift+U"; #endif - params.substitutions = substitutions; - if (gViewerWindow->getUIVisibility()) - { - // hiding, so show notification - LLNotifications::instance().add(params); - } - else - { - LLNotifications::instance().forceResponse(params, 0); + params.substitutions = substitutions; + if (!gSavedSettings.getBOOL("HideUIControls")) + { + // hiding, so show notification + LLNotifications::instance().add(params); + } + else + { + LLNotifications::instance().forceResponse(params, 0); + } } - return true; } @@ -3940,7 +3987,9 @@ class LLViewToggleUI : public view_listener_t if (option == 0) // OK { - gViewerWindow->setUIVisibility(!gViewerWindow->getUIVisibility()); + gViewerWindow->setUIVisibility(gSavedSettings.getBOOL("HideUIControls")); + LLPanelStandStopFlying::getInstance()->setVisible(gSavedSettings.getBOOL("HideUIControls")); + gSavedSettings.setBOOL("HideUIControls",!gSavedSettings.getBOOL("HideUIControls")); } } }; @@ -4835,18 +4884,6 @@ BOOL sitting_on_selection() return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } -class LLToolsSaveToInventory : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - if(enable_save_into_inventory(NULL)) - { - derez_objects(DRD_SAVE_INTO_AGENT_INVENTORY, LLUUID::null); - } - return true; - } -}; - class LLToolsSaveToObjectInventory : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7139,50 +7176,6 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat, return FALSE; } -BOOL enable_save_into_inventory(void*) -{ - // *TODO: clean this up - // find the last root - LLSelectNode* last_node = NULL; - for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); - iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) - { - last_node = *iter; - } - -#ifdef HACKED_GODLIKE_VIEWER - return TRUE; -#else -# ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() - && gAgent.isGodlike()) - { - return TRUE; - } -# endif - // check all pre-req's for save into inventory. - if(last_node && last_node->mValid && !last_node->mItemID.isNull() - && (last_node->mPermissions->getOwner() == gAgent.getID()) - && (gInventory.getItem(last_node->mItemID) != NULL)) - { - LLViewerObject* obj = last_node->getObject(); - if( obj && !obj->isAttachment() ) - { - return TRUE; - } - } - return FALSE; -#endif -} - -class LLToolsEnableSaveToInventory : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = enable_save_into_inventory(NULL); - return new_value; - } -}; BOOL enable_save_into_task_inventory(void*) { @@ -7564,6 +7557,7 @@ class LLToolsUseSelectionForGrid : public view_listener_t } func; LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); LLSelectMgr::getInstance()->setGridMode(GRID_MODE_REF_OBJECT); + LLFloaterTools::setGridMode((S32)GRID_MODE_REF_OBJECT); return true; } }; @@ -8374,7 +8368,6 @@ void initialize_menus() commit.add("Tools.LookAtSelection", boost::bind(&handle_look_at_selection, _2)); commit.add("Tools.BuyOrTake", boost::bind(&handle_buy_or_take)); commit.add("Tools.TakeCopy", boost::bind(&handle_take_copy)); - view_listener_t::addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); view_listener_t::addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); view_listener_t::addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction"); @@ -8386,7 +8379,6 @@ void initialize_menus() enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object)); enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object)); - view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); @@ -8466,7 +8458,6 @@ void initialize_menus() commit.add("Advanced.DumpFocusHolder", boost::bind(&handle_dump_focus) ); view_listener_t::addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo"); view_listener_t::addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo"); - view_listener_t::addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats"); view_listener_t::addMenu(new LLAdvancedToggleDebugClicks(), "Advanced.ToggleDebugClicks"); view_listener_t::addMenu(new LLAdvancedCheckDebugClicks(), "Advanced.CheckDebugClicks"); view_listener_t::addMenu(new LLAdvancedCheckDebugViews(), "Advanced.CheckDebugViews"); @@ -8498,6 +8489,11 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedTestMale(), "Advanced.TestMale"); view_listener_t::addMenu(new LLAdvancedTestFemale(), "Advanced.TestFemale"); + // Advanced > Character > Animation Speed + view_listener_t::addMenu(new LLAdvancedAnimTenFaster(), "Advanced.AnimTenFaster"); + view_listener_t::addMenu(new LLAdvancedAnimTenSlower(), "Advanced.AnimTenSlower"); + view_listener_t::addMenu(new LLAdvancedAnimResetAll(), "Advanced.AnimResetAll"); + // Advanced > Character (toplevel) view_listener_t::addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault"); view_listener_t::addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader"); @@ -8585,6 +8581,7 @@ void initialize_menus() // we don't use boost::bind directly to delay side tray construction view_listener_t::addMenu( new LLTogglePanelPeopleTab(), "SideTray.PanelPeopleTab"); + view_listener_t::addMenu( new LLCheckPanelPeopleTab(), "SideTray.CheckPanelPeopleTab"); // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 3515aa4302..2eb458fa02 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -49,7 +49,6 @@ void show_context_menu( S32 x, S32 y, MASK mask ); void show_build_mode_context_menu(S32 x, S32 y, MASK mask); void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y); void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y); -BOOL enable_save_into_inventory(void*); void handle_reset_view(); void handle_cut(void*); void handle_copy(void*); @@ -159,8 +158,6 @@ protected: LLSafeHandle<LLObjectSelection> mObjectSelection; }; -extern const std::string SAVE_INTO_INVENTORY; - extern LLMenuBarGL* gMenuBarView; //extern LLView* gMenuBarHolder; extern LLMenuGL* gEditMenu; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index dc2ea4bd1f..be78603e2d 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -34,6 +34,7 @@ #include "llfilepicker.h" #include "llfloaterreg.h" #include "llbuycurrencyhtml.h" +#include "llfloatermap.h" #include "llfloatermodelpreview.h" #include "llfloatersnapshot.h" #include "llimage.h" @@ -475,7 +476,7 @@ class LLFileEnableCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = NULL != LLFloater::getClosableFloaterFromFocus(); + bool new_value = NULL != gFloaterView->getFrontmostClosableFloater(); return new_value; } }; @@ -484,8 +485,7 @@ class LLFileCloseWindow : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloater::closeFocusedFloater(); - + LLFloater::closeFrontmostFloater(); return true; } }; @@ -494,7 +494,7 @@ class LLFileEnableCloseAllWindows : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool open_children = gFloaterView->allChildrenClosed(); + bool open_children = gFloaterView->allChildrenClosed() && !LLFloaterSnapshot::getInstance()->isInVisibleChain(); return !open_children; } }; @@ -505,7 +505,7 @@ class LLFileCloseAllWindows : public view_listener_t { bool app_quitting = false; gFloaterView->closeAllChildren(app_quitting); - + LLFloaterSnapshot::getInstance()->closeFloater(app_quitting); return true; } }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b048332e59..6e02fafd01 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3007,11 +3007,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - LLNotification::Params params("TeleportOffered"); - params.substitutions = args; - params.payload = payload; - LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); - } + LLNotification::Params params("TeleportOffered"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); + } } } @@ -3102,10 +3102,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - // do not show a message box, because you're about to be - // teleported. - LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); - } + // do not show a message box, because you're about to be + // teleported. + LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0); + } } break; @@ -4276,7 +4276,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) msg_number += 1; if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT) { - //LL_INFOS("Messaging") << " head rot " << head_rotation << LL_ENDL; + //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL; LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", head_rot_chg " << head_rot_chg << LL_ENDL; } if (cam_rot_chg.magVec() > ROTATION_THRESHOLD) @@ -4295,7 +4295,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) { LL_INFOS("Messaging") << "msg " << msg_number << ", frame " << LLFrameTimer::getFrameCount() << ", dcf = " << control_flag_change << LL_ENDL; } - */ +*/ duplicate_count = 0; } @@ -4420,7 +4420,6 @@ extern U32 gObjectBits; void process_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4437,7 +4436,6 @@ void process_object_update(LLMessageSystem *mesgsys, void **user_data) void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4454,7 +4452,6 @@ void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); // Update the data counters if (mesgsys->getReceiveCompressedSize()) { @@ -4472,7 +4469,6 @@ void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data) void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (mesgsys->getReceiveCompressedSize()) { gObjectBits += mesgsys->getReceiveCompressedSize() * 8; @@ -4485,7 +4481,7 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Kill Objects"); void process_kill_object(LLMessageSystem *mesgsys, void **user_data) @@ -4510,7 +4506,6 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) if (id == LLUUID::null) { LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL; - gObjectList.mNumUnknownKills++; continue; } else @@ -4534,18 +4529,12 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data) // Do the kill gObjectList.killObject(objectp); } - else - { - LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL; - gObjectList.mNumUnknownKills++; - } } // We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab, // which is using the object, release the mouse capture correctly when the object dies. // See LLToolGrab::handleHoverActive() and LLToolGrab::handleHoverNonPhysical(). LLSelectMgr::getInstance()->removeObjectFromSelections(id); - } } @@ -5629,14 +5618,14 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) bool handle_prompt_for_maturity_level_change_callback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - + if (0 == option) { // set the preference to the maturity of the region we're calling U8 preferredMaturity = static_cast<U8>(notification["payload"]["_region_access"].asInteger()); gSavedSettings.setU32("PreferredMaturity", static_cast<U32>(preferredMaturity)); } - + return false; } @@ -5699,7 +5688,7 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock) gAgent.clearTeleportRequest(); maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_AdultsOnlyContent", llsdBlock); returnValue = true; - + notifySuffix = "_NotifyAdultsOnly"; } else if (gAgent.prefersPG() || gAgent.prefersMature()) @@ -5796,7 +5785,7 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock) maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_PreferencesOutOfSync", llsdBlock, llsdBlock, handle_prompt_for_maturity_level_change_callback); returnValue = true; } - } + } if ((maturityLevelNotification == NULL) || maturityLevelNotification->isIgnored()) { @@ -5962,8 +5951,8 @@ void process_alert_core(const std::string& message, BOOL modal) std::string alert_name(message.substr(ALERT_PREFIX.length())); if (!handle_special_alerts(alert_name)) { - LLNotificationsUtil::add(alert_name); - } + LLNotificationsUtil::add(alert_name); + } } else if (message.find(NOTIFY_PREFIX) == 0) { @@ -7224,8 +7213,12 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance(); if(instance) { - instance->trackURL( - sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); + llinfos << "Object named " << object_name + << " is offering TP to region " + << sim_name << " position " << pos + << llendl; + + instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); LLFloaterReg::showInstance("world_map", "center"); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index b2bd547811..b1a60197a2 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -876,7 +876,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, LLDataPacker *dp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); U32 retval = 0x0; // If region is removed from the list it is also deleted. @@ -2347,8 +2346,6 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt) BOOL LLViewerObject::setData(const U8 *datap, const U32 data_size) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - delete [] mData; if (datap) @@ -2390,8 +2387,6 @@ void LLViewerObject::doUpdateInventory( U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLViewerInventoryItem* old_item = NULL; if(TASK_INVENTORY_ITEM_KEY == key) { @@ -2475,8 +2470,6 @@ void LLViewerObject::saveScript( BOOL active, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - /* * XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the * interaction with doUpdateInventory() called below. @@ -2552,8 +2545,6 @@ void LLViewerObject::dirtyInventory() void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLInventoryCallbackInfo* info = new LLInventoryCallbackInfo; info->mListener = listener; info->mInventoryData = user_data; @@ -2651,8 +2642,6 @@ S32 LLFilenameAndTask::sCount = 0; // static void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLUUID task_id; msg->getUUIDFast(_PREHASH_InventoryData, _PREHASH_TaskID, task_id); LLViewerObject* object = gObjectList.findObject(task_id); @@ -2739,8 +2728,6 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS void LLViewerObject::loadTaskInvFile(const std::string& filename) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); llifstream ifs(filename_and_local_path); if(ifs.good()) @@ -2864,8 +2851,6 @@ void LLViewerObject::updateInventory( U8 key, bool is_new) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // This slices the object into what we're concerned about on the // viewer. The simulator will take the permissions and transfer // ownership. @@ -3874,8 +3859,6 @@ std::string LLViewerObject::getMediaURL() const void LLViewerObject::setMediaURL(const std::string& media_url) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - if (!mMedia) { mMedia = new LLViewerObjectMedia; @@ -3925,8 +3908,6 @@ BOOL LLViewerObject::setMaterial(const U8 material) void LLViewerObject::setNumTEs(const U8 num_tes) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - U32 i; if (num_tes != getNumTEs()) { diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 1fb30db8f2..97cf0a4850 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -34,7 +34,6 @@ #include "llhudicon.h" #include "llinventory.h" #include "llrefcount.h" -#include "llmemtype.h" #include "llprimitive.h" #include "lluuid.h" #include "llvoinventorylistener.h" @@ -128,7 +127,6 @@ public: typedef const child_list_t const_child_list_t; LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE); - MEM_TYPE_NEW(LLMemType::MTYPE_OBJECT); virtual void markDead(); // Mark this object as dead, and clean up its references BOOL isDead() const {return mDead;} diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 3eeab0bf3e..54f9360b60 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -106,7 +106,6 @@ LLViewerObjectList::LLViewerObjectList() mNumNewObjects = 0; mWasPaused = FALSE; mNumDeadObjectUpdates = 0; - mNumUnknownKills = 0; mNumUnknownUpdates = 0; } @@ -230,7 +229,6 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, LLDataPacker* dpp, BOOL just_created) { - LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE); LLMessageSystem* msg = gMessageSystem; // ignore returned flags @@ -283,7 +281,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, bool cached, bool compressed) { - LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE); LLFastTimer t(FTM_PROCESS_OBJECTS); LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal(); @@ -334,6 +331,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U64 region_handle; mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); + LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); if (!regionp) @@ -345,16 +343,14 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U8 compressed_dpbuffer[2048]; LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048); LLDataPacker *cached_dpp = NULL; - -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(regionp); -#endif + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); for (i = 0; i < num_objects; i++) { // timer is unused? LLTimer update_timer; BOOL justCreated = FALSE; + S32 msg_size = 0; if (cached) { @@ -362,6 +358,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U32 crc; mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, id, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_CRC, crc, i); + msg_size += sizeof(U32) * 2; // Lookup data packer and add this id to cache miss lists if necessary. U8 cache_miss_type = LLViewerRegion::CACHE_MISS_TYPE_NONE; @@ -377,9 +374,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, else { // Cache Miss. - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordCacheMissEvent(id, update_type, cache_miss_type); - #endif + recorder.cacheMissEvent(id, update_type, cache_miss_type, msg_size); continue; // no data packer, skip this object } @@ -422,6 +417,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, else if (update_type != OUT_FULL) // !compressed, !OUT_FULL ==> OUT_FULL_CACHED only? { mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + msg_size += sizeof(U32); + getUUIDFromLocal(fullid, local_id, gMessageSystem->getSenderIP(), @@ -436,6 +433,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, { mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_FullID, fullid, i); mesgsys->getU32Fast(_PREHASH_ObjectData, _PREHASH_ID, local_id, i); + msg_size += sizeof(LLUUID); + msg_size += sizeof(U32); // llinfos << "Full Update, obj " << local_id << ", global ID" << fullid << "from " << mesgsys->getSender() << llendl; } objectp = findObject(fullid); @@ -481,9 +480,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type == OUT_TERSE_IMPROVED) { // llinfos << "terse update for an unknown object (compressed):" << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } } @@ -495,22 +492,20 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_FULL) { //llinfos << "terse update for an unknown object:" << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } mesgsys->getU8Fast(_PREHASH_ObjectData, _PREHASH_PCode, pcode, i); + msg_size += sizeof(U8); + } #ifdef IGNORE_DEAD if (mDeadObjects.find(fullid) != mDeadObjects.end()) { mNumDeadObjectUpdates++; //llinfos << "update for a dead object:" << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } #endif @@ -519,9 +514,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (!objectp) { llinfos << "createObject failure for object: " << fullid << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateFailure(local_id, update_type); - #endif + recorder.objectUpdateFailure(local_id, update_type, msg_size); continue; } justCreated = TRUE; @@ -547,12 +540,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (update_type != OUT_TERSE_IMPROVED) // OUT_FULL_COMPRESSED only? { bCached = true; - #if LL_RECORD_VIEWER_STATS LLViewerRegion::eCacheUpdateResult result = objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); - LLViewerStatsRecorder::instance()->recordCacheFullUpdate(local_id, update_type, result, objectp); - #else - objectp->mRegionp->cacheFullUpdate(objectp, compressed_dp); - #endif + recorder.cacheFullUpdate(local_id, update_type, result, objectp, msg_size); } } else if (cached) // Cache hit only? @@ -568,16 +557,12 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, } processUpdateCore(objectp, user_data, i, update_type, NULL, justCreated); } - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->recordObjectUpdateEvent(local_id, update_type, objectp); - #endif + recorder.objectUpdateEvent(local_id, update_type, objectp, msg_size); objectp->setLastUpdateType(update_type); objectp->setLastUpdateCached(bCached); } -#if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->endObjectUpdateEvents(); -#endif + recorder.log(0.2f); LLVOAvatar::cullAvatarsByPixelArea(); } @@ -866,8 +851,6 @@ private: void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - // Update globals LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") ); LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") ); @@ -915,12 +898,12 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) static std::vector<LLViewerObject*> idle_list; U32 idle_count = 0; - + static LLFastTimer::DeclareTimer idle_copy("Idle Copy"); { LLFastTimer t(idle_copy); - + for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin(); active_iter != mActiveObjects.end(); active_iter++) { @@ -929,9 +912,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) { if (idle_count >= idle_list.size()) { - idle_list.push_back( objectp ); - } - else + idle_list.push_back( objectp ); + } + else { idle_list[idle_count] = objectp; } @@ -948,7 +931,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) std::vector<LLViewerObject*>::iterator idle_end = idle_list.begin()+idle_count; if (gSavedSettings.getBOOL("FreezeTime")) - { + { for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin(); iter != idle_end; iter++) @@ -1179,7 +1162,6 @@ void LLViewerObjectList::clearDebugText() void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) { llinfos << "Object " << objectp->mID << " already on dead list!" << llendl; @@ -1407,7 +1389,6 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp) void LLViewerObjectList::updateActive(LLViewerObject *objectp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); if (objectp->isDead()) { return; // We don't update dead objects! @@ -1424,10 +1405,10 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) { mActiveObjects.push_back(objectp); objectp->setListIndex(mActiveObjects.size()-1); - objectp->setOnActiveList(TRUE); - } - else - { + objectp->setOnActiveList(TRUE); + } + else + { llassert(idx < mActiveObjects.size()); llassert(mActiveObjects[idx] == objectp); @@ -1556,13 +1537,13 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { LLFastTimer t(FTM_PIPELINE_SHIFT); - gPipeline.shiftObjects(offset); + gPipeline.shiftObjects(offset); } { LLFastTimer t(FTM_REGION_SHIFT); - LLWorld::getInstance()->shiftRegions(offset); - } + LLWorld::getInstance()->shiftRegions(offset); +} } void LLViewerObjectList::repartitionObjects() @@ -1889,7 +1870,6 @@ void LLViewerObjectList::resetObjectBeacons() LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp) { - LLMemType mt(LLMemType::MTYPE_OBJECT); LLUUID fullid; fullid.generate(); @@ -1910,13 +1890,9 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi } -static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); - LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) { - LLMemType mt(LLMemType::MTYPE_OBJECT); - LLFastTimer t(FTM_CREATE_OBJECT); LLUUID fullid; if (uuid == LLUUID::null) @@ -1980,7 +1956,6 @@ S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port) { - LLMemType mt(LLMemType::MTYPE_OBJECT); #ifdef ORPHAN_SPAM llinfos << "Orphaning object " << childp->getID() << " with parent " << parent_id << llendl; #endif diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 449a4633ff..6518c25d09 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -188,7 +188,6 @@ public: S32 mNumUnknownUpdates; S32 mNumDeadObjectUpdates; - S32 mNumUnknownKills; S32 mNumDeadObjects; protected: std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index a0cf2fc803..a1c12c5cd6 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -828,7 +828,6 @@ void LLViewerParcelOverlay::updateGL() void LLViewerParcelOverlay::idleUpdate(bool force_update) { - LLMemType mt_iup(LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY); if (gGLManager.mIsDisabled) { return; diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 345023dbfa..6bd9f66b9c 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -79,7 +79,6 @@ LLViewerPart::LLViewerPart() : mVPCallback(NULL), mImagep(NULL) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartSourcep = NULL; ++LLViewerPartSim::sParticleCount2 ; @@ -87,7 +86,6 @@ LLViewerPart::LLViewerPart() : LLViewerPart::~LLViewerPart() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartSourcep = NULL; --LLViewerPartSim::sParticleCount2 ; @@ -95,7 +93,6 @@ LLViewerPart::~LLViewerPart() void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mPartID = LLViewerPart::sNextPartID; LLViewerPart::sNextPartID++; mFlags = 0x00f; @@ -120,7 +117,6 @@ void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture * LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 box_side, bool hud) : mHud(hud) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mVOPartGroupp = NULL; mUniformParticles = TRUE; @@ -177,7 +173,6 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo LLViewerPartGroup::~LLViewerPartGroup() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); cleanup(); S32 count = (S32) mParticles.size(); @@ -192,7 +187,6 @@ LLViewerPartGroup::~LLViewerPartGroup() void LLViewerPartGroup::cleanup() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (mVOPartGroupp) { if (!mVOPartGroupp->isDead()) @@ -205,7 +199,6 @@ void LLViewerPartGroup::cleanup() BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if ((pos.mV[VX] < mMinObjPos.mV[VX]) || (pos.mV[VY] < mMinObjPos.mV[VY]) || (pos.mV[VZ] < mMinObjPos.mV[VZ])) @@ -233,8 +226,6 @@ BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - if (part->mFlags & LLPartData::LL_PART_HUD && !mHud) { return FALSE; @@ -261,7 +252,6 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) void LLViewerPartGroup::updateParticles(const F32 lastdt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 dt; LLVector3 gravity(0.f, 0.f, GRAVITY); @@ -429,7 +419,6 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt) void LLViewerPartGroup::shift(const LLVector3 &offset) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mCenterAgent += offset; mMinObjPos += offset; mMaxObjPos += offset; @@ -442,8 +431,6 @@ void LLViewerPartGroup::shift(const LLVector3 &offset) void LLViewerPartGroup::removeParticlesByID(const U32 source_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - for (S32 i = 0; i < (S32)mParticles.size(); i++) { if(mParticles[i]->mPartSourcep->getID() == source_id) @@ -475,7 +462,6 @@ void LLViewerPartSim::checkParticleCount(U32 size) LLViewerPartSim::LLViewerPartSim() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); sMaxParticleCount = llmin(gSavedSettings.getS32("RenderMaxPartCount"), LL_MAX_PARTICLE_COUNT); static U32 id_seed = 0; mID = ++id_seed; @@ -484,7 +470,6 @@ LLViewerPartSim::LLViewerPartSim() void LLViewerPartSim::destroyClass() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); S32 i; S32 count; @@ -500,9 +485,9 @@ void LLViewerPartSim::destroyClass() mViewerPartSources.clear(); } +//static BOOL LLViewerPartSim::shouldAddPart() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount) { @@ -525,7 +510,6 @@ BOOL LLViewerPartSim::shouldAddPart() void LLViewerPartSim::addPart(LLViewerPart* part) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (sParticleCount < MAX_PART_COUNT) { put(part); @@ -541,7 +525,6 @@ void LLViewerPartSim::addPart(LLViewerPart* part) LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); const F32 MAX_MAG = 1000000.f*1000000.f; // 1 million LLViewerPartGroup *return_group = NULL ; if (part->mPosAgent.magVecSquared() > MAX_MAG || !part->mPosAgent.isFinite()) @@ -599,7 +582,6 @@ LLViewerPartGroup *LLViewerPartSim::put(LLViewerPart* part) LLViewerPartGroup *LLViewerPartSim::createViewerPartGroup(const LLVector3 &pos_agent, const F32 desired_size, bool hud) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); //find a box that has a center position divisible by PART_SIM_BOX_SIDE that encompasses //pos_agent LLViewerPartGroup *groupp = new LLViewerPartGroup(pos_agent, desired_size, hud); @@ -632,8 +614,6 @@ static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - static LLFrameTimer update_timer; const F32 dt = llmin(update_timer.getElapsedTimeAndResetF32(), 0.1f); @@ -800,7 +780,6 @@ void LLViewerPartSim::updatePartBurstRate() void LLViewerPartSim::addPartSource(LLPointer<LLViewerPartSource> sourcep) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!sourcep) { llwarns << "Null part source!" << llendl; @@ -817,7 +796,6 @@ void LLViewerPartSim::removeLastCreatedSource() void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (group_list_t::iterator i = mViewerPartGroups.begin(); i != mViewerPartGroups.end(); ) { group_list_t::iterator iter = i++; @@ -832,7 +810,6 @@ void LLViewerPartSim::cleanupRegion(LLViewerRegion *regionp) void LLViewerPartSim::clearParticlesByID(const U32 system_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (group_list_t::iterator g = mViewerPartGroups.begin(); g != mViewerPartGroups.end(); ++g) { (*g)->removeParticlesByID(system_id); @@ -850,7 +827,6 @@ void LLViewerPartSim::clearParticlesByID(const U32 system_id) void LLViewerPartSim::clearParticlesByOwnerID(const LLUUID& task_id) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); for (source_list_t::iterator iter = mViewerPartSources.begin(); iter != mViewerPartSources.end(); ++iter) { if ((*iter)->getOwnerUUID() == task_id) diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h index c9959c63ec..c91fcf0691 100644 --- a/indra/newview/llviewerpartsim.h +++ b/indra/newview/llviewerpartsim.h @@ -142,7 +142,7 @@ public: void cleanupRegion(LLViewerRegion *regionp); - BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) + static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) F32 maxRate() // Return maximum particle generation rate { if (sParticleCount >= MAX_PART_COUNT) diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 4af92e79ff..b311f659fb 100644 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -90,7 +90,6 @@ void LLViewerPartSource::setStart() LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) : LLViewerPartSource(LL_PART_SOURCE_SCRIPT) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); llassert(source_objp); mSourceObjectp = source_objp; mPosAgent = mSourceObjectp->getPositionAgent(); @@ -102,7 +101,6 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) void LLViewerPartSourceScript::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; mTargetObjectp = NULL; @@ -113,7 +111,6 @@ void LLViewerPartSourceScript::update(const F32 dt) if( mIsSuspended ) return; - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 old_update_time = mLastUpdateTime; mLastUpdateTime += dt; @@ -394,7 +391,6 @@ void LLViewerPartSourceScript::update(const F32 dt) // static LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { if (LLPartSysData::isNullPS(block_num)) @@ -436,7 +432,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp); @@ -470,8 +465,6 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewer /* static */ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); - LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp); new_pssp->mPartSysData = particle_parameters; @@ -487,13 +480,11 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewer void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mImagep = imagep; } void LLViewerPartSourceScript::setTargetObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mTargetObjectp = objp; } @@ -509,7 +500,6 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) : void LLViewerPartSourceSpiral::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; } @@ -517,7 +507,6 @@ void LLViewerPartSourceSpiral::setDead() void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; @@ -542,7 +531,6 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceSpiral::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!mImagep) { mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); @@ -588,7 +576,6 @@ void LLViewerPartSourceSpiral::update(const F32 dt) void LLViewerPartSourceSpiral::setSourceObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } @@ -612,7 +599,6 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam() void LLViewerPartSourceBeam::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; mTargetObjectp = NULL; @@ -626,7 +612,6 @@ void LLViewerPartSourceBeam::setColor(const LLColor4 &color) void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep; @@ -671,7 +656,6 @@ void LLViewerPartSourceBeam::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceBeam::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); const F32 RATE = 0.025f; mLastUpdateTime += dt; @@ -743,13 +727,11 @@ void LLViewerPartSourceBeam::update(const F32 dt) void LLViewerPartSourceBeam::setSourceObject(LLViewerObject* objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } void LLViewerPartSourceBeam::setTargetObject(LLViewerObject* objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mTargetObjectp = objp; } @@ -764,7 +746,6 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) : void LLViewerPartSourceChat::setDead() { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mIsDead = TRUE; mSourceObjectp = NULL; } @@ -772,7 +753,6 @@ void LLViewerPartSourceChat::setDead() void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; @@ -797,7 +777,6 @@ void LLViewerPartSourceChat::updatePart(LLViewerPart &part, const F32 dt) void LLViewerPartSourceChat::update(const F32 dt) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!mImagep) { mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c"); @@ -853,7 +832,6 @@ void LLViewerPartSourceChat::update(const F32 dt) void LLViewerPartSourceChat::setSourceObject(LLViewerObject *objp) { - LLMemType mt(LLMemType::MTYPE_PARTICLES); mSourceObjectp = objp; } diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 6c8a827ba3..0316f79973 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -59,8 +59,6 @@ #include "indra_constants.h" #include "llinitparam.h" -//#include "linden_common.h" -//#include "llpreprocessor.h" #include "llallocator.h" #include "llapp.h" #include "llcriticaldamp.h" @@ -77,10 +75,8 @@ #include "llprocessor.h" #include "llrefcount.h" #include "llsafehandle.h" -//#include "llsecondlifeurls.h" #include "llsd.h" #include "llsingleton.h" -#include "llstat.h" #include "llstl.h" #include "llstrider.h" #include "llstring.h" @@ -88,11 +84,8 @@ #include "llthread.h" #include "lltimer.h" #include "lluuidhashmap.h" -//#include "processor.h" #include "stdenums.h" #include "stdtypes.h" -//#include "string_table.h" -//#include "timer.h" #include "timing.h" #include "u64.h" diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b607afbd9d..e4234a538d 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -719,7 +719,6 @@ void LLViewerRegion::dirtyHeights() BOOL LLViewerRegion::idleUpdate(F32 max_update_time) { - LLMemType mt_ivr(LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION); // did_update returns TRUE if we did at least one significant update BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time); @@ -1342,11 +1341,8 @@ void LLViewerRegion::requestCacheMisses() mCacheDirty = TRUE ; // llinfos << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << llendl; - #if LL_RECORD_VIEWER_STATS - LLViewerStatsRecorder::instance()->beginObjectUpdateEvents(this); - LLViewerStatsRecorder::instance()->recordRequestCacheMissesEvent(full_count + crc_count); - LLViewerStatsRecorder::instance()->endObjectUpdateEvents(); - #endif + LLViewerStatsRecorder::instance().requestCacheMissesEvent(full_count + crc_count); + LLViewerStatsRecorder::instance().log(0.2f); } void LLViewerRegion::dumpCache() @@ -1546,7 +1542,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("LandResources"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); - capabilityNames.append("MeshUploadFlag"); + capabilityNames.append("MeshUploadFlag"); capabilityNames.append("NavMeshGenerationStatus"); capabilityNames.append("NewFileAgentInventory"); capabilityNames.append("ObjectMedia"); @@ -1585,7 +1581,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ViewerMetrics"); capabilityNames.append("ViewerStartAuction"); capabilityNames.append("ViewerStats"); - + // Please add new capabilities alphabetically to reduce // merge conflicts. } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 4b0e0598f6..ba9818946c 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -2025,18 +2025,19 @@ BOOL LLViewerShaderMgr::loadShadersObject() if (success) { gObjectPreviewProgram.mName = "Simple Shader"; - gObjectPreviewProgram.mFeatures.calculatesLighting = true; - gObjectPreviewProgram.mFeatures.calculatesAtmospherics = true; - gObjectPreviewProgram.mFeatures.hasGamma = true; - gObjectPreviewProgram.mFeatures.hasAtmospherics = true; - gObjectPreviewProgram.mFeatures.hasLighting = true; + gObjectPreviewProgram.mFeatures.calculatesLighting = false; + gObjectPreviewProgram.mFeatures.calculatesAtmospherics = false; + gObjectPreviewProgram.mFeatures.hasGamma = false; + gObjectPreviewProgram.mFeatures.hasAtmospherics = false; + gObjectPreviewProgram.mFeatures.hasLighting = false; gObjectPreviewProgram.mFeatures.mIndexedTextureChannels = 0; gObjectPreviewProgram.mFeatures.disableTextureIndex = true; gObjectPreviewProgram.mShaderFiles.clear(); gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewV.glsl", GL_VERTEX_SHADER_ARB)); - gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB)); + gObjectPreviewProgram.mShaderFiles.push_back(make_pair("objects/previewF.glsl", GL_FRAGMENT_SHADER_ARB)); gObjectPreviewProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT]; success = gObjectPreviewProgram.createShader(NULL, NULL); + gObjectPreviewProgram.mFeatures.hasLighting = true; } if (success) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 603634e5f3..35839ae459 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -290,19 +290,19 @@ LLViewerStats::~LLViewerStats() void LLViewerStats::resetStats() { - LLViewerStats::getInstance()->mKBitStat.reset(); - LLViewerStats::getInstance()->mLayersKBitStat.reset(); - LLViewerStats::getInstance()->mObjectKBitStat.reset(); - LLViewerStats::getInstance()->mTextureKBitStat.reset(); - LLViewerStats::getInstance()->mVFSPendingOperations.reset(); - LLViewerStats::getInstance()->mAssetKBitStat.reset(); - LLViewerStats::getInstance()->mPacketsInStat.reset(); - LLViewerStats::getInstance()->mPacketsLostStat.reset(); - LLViewerStats::getInstance()->mPacketsOutStat.reset(); - LLViewerStats::getInstance()->mFPSStat.reset(); - LLViewerStats::getInstance()->mTexturePacketsStat.reset(); - - LLViewerStats::getInstance()->mAgentPositionSnaps.reset(); + LLViewerStats& stats = LLViewerStats::instance(); + stats.mKBitStat.reset(); + stats.mLayersKBitStat.reset(); + stats.mObjectKBitStat.reset(); + stats.mTextureKBitStat.reset(); + stats.mVFSPendingOperations.reset(); + stats.mAssetKBitStat.reset(); + stats.mPacketsInStat.reset(); + stats.mPacketsLostStat.reset(); + stats.mPacketsOutStat.reset(); + stats.mFPSStat.reset(); + stats.mTexturePacketsStat.reset(); + stats.mAgentPositionSnaps.reset(); } @@ -327,55 +327,55 @@ void LLViewerStats::updateFrameStats(const F64 time_diff) { if (mPacketsLostPercentStat.getCurrent() > 5.0) { - incStat(LLViewerStats::ST_LOSS_05_SECONDS, time_diff); + incStat(ST_LOSS_05_SECONDS, time_diff); } if (mSimFPS.getCurrent() < 20.f && mSimFPS.getCurrent() > 0.f) { - incStat(LLViewerStats::ST_SIM_FPS_20_SECONDS, time_diff); + incStat(ST_SIM_FPS_20_SECONDS, time_diff); } if (mSimPhysicsFPS.getCurrent() < 20.f && mSimPhysicsFPS.getCurrent() > 0.f) { - incStat(LLViewerStats::ST_PHYS_FPS_20_SECONDS, time_diff); + incStat(ST_PHYS_FPS_20_SECONDS, time_diff); } if (time_diff >= 0.5) { - incStat(LLViewerStats::ST_FPS_2_SECONDS, time_diff); + incStat(ST_FPS_2_SECONDS, time_diff); } if (time_diff >= 0.125) { - incStat(LLViewerStats::ST_FPS_8_SECONDS, time_diff); + incStat(ST_FPS_8_SECONDS, time_diff); } if (time_diff >= 0.1) { - incStat(LLViewerStats::ST_FPS_10_SECONDS, time_diff); + incStat(ST_FPS_10_SECONDS, time_diff); } if (gFrameCount && mLastTimeDiff > 0.0) { // new "stutter" meter - setStat(LLViewerStats::ST_FPS_DROP_50_RATIO, - (getStat(LLViewerStats::ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) + + setStat(ST_FPS_DROP_50_RATIO, + (getStat(ST_FPS_DROP_50_RATIO) * (F64)(gFrameCount - 1) + (time_diff >= 2.0 * mLastTimeDiff ? 1.0 : 0.0)) / gFrameCount); // old stats that were never really used - setStat(LLViewerStats::ST_FRAMETIME_JITTER, - (getStat(LLViewerStats::ST_FRAMETIME_JITTER) * (gFrameCount - 1) + + setStat(ST_FRAMETIME_JITTER, + (getStat(ST_FRAMETIME_JITTER) * (gFrameCount - 1) + fabs(mLastTimeDiff - time_diff) / mLastTimeDiff) / gFrameCount); F32 average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount; - setStat(LLViewerStats::ST_FRAMETIME_SLEW, - (getStat(LLViewerStats::ST_FRAMETIME_SLEW) * (gFrameCount - 1) + + setStat(ST_FRAMETIME_SLEW, + (getStat(ST_FRAMETIME_SLEW) * (gFrameCount - 1) + fabs(average_frametime - time_diff) / average_frametime) / gFrameCount); F32 max_bandwidth = gViewerThrottle.getMaxBandwidth(); F32 delta_bandwidth = gViewerThrottle.getCurrentBandwidth() - max_bandwidth; - setStat(LLViewerStats::ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); + setStat(ST_DELTA_BANDWIDTH, delta_bandwidth / 1024.f); - setStat(LLViewerStats::ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); + setStat(ST_MAX_BANDWIDTH, max_bandwidth / 1024.f); } @@ -403,155 +403,8 @@ void LLViewerStats::addToMessage(LLSD &body) const << "; Count = " << mAgentPositionSnaps.getCount() << llendl; } -// static -// const std::string LLViewerStats::statTypeToText(EStatType type) -// { -// if (type >= 0 && type < ST_COUNT) -// { -// return STAT_INFO[type].mName; -// } -// else -// { -// return "Unknown statistic"; -// } -// } - // *NOTE:Mani The following methods used to exist in viewer.cpp // Moving them here, but not merging them into LLViewerStats yet. -void reset_statistics() -{ - if (LLSurface::sTextureUpdateTime) - { - LLSurface::sTexelsUpdated = 0; - LLSurface::sTextureUpdateTime = 0.f; - } -} - - -void output_statistics(void*) -{ - llinfos << "Number of orphans: " << gObjectList.getOrphanCount() << llendl; - llinfos << "Number of dead objects: " << gObjectList.mNumDeadObjects << llendl; - llinfos << "Num images: " << gTextureList.getNumImages() << llendl; - llinfos << "Texture usage: " << LLImageGL::sGlobalTextureMemoryInBytes << llendl; - llinfos << "Texture working set: " << LLImageGL::sBoundTextureMemoryInBytes << llendl; - llinfos << "Raw usage: " << LLImageRaw::sGlobalRawMemory << llendl; - llinfos << "Formatted usage: " << LLImageFormatted::sGlobalFormattedMemory << llendl; - llinfos << "Zombie Viewer Objects: " << LLViewerObject::getNumZombieObjects() << llendl; - llinfos << "Number of lights: " << gPipeline.getLightCount() << llendl; - - llinfos << "Memory Usage:" << llendl; - llinfos << "--------------------------------" << llendl; - llinfos << "Pipeline:" << llendl; - llinfos << llendl; - -#if LL_SMARTHEAP - llinfos << "--------------------------------" << llendl; - { - llinfos << "sizeof(LLVOVolume) = " << sizeof(LLVOVolume) << llendl; - - U32 total_pool_size = 0; - U32 total_used_size = 0; - MEM_POOL_INFO pool_info; - MEM_POOL_STATUS pool_status; - U32 pool_num = 0; - for(pool_status = MemPoolFirst( &pool_info, 1 ); - pool_status != MEM_POOL_END; - pool_status = MemPoolNext( &pool_info, 1 ) ) - { - llinfos << "Pool #" << pool_num << llendl; - if( MEM_POOL_OK != pool_status ) - { - llwarns << "Pool not ok" << llendl; - continue; - } - - llinfos << "Pool blockSizeFS " << pool_info.blockSizeFS - << " pageSize " << pool_info.pageSize - << llendl; - - U32 pool_count = MemPoolCount(pool_info.pool); - llinfos << "Blocks " << pool_count << llendl; - - U32 pool_size = MemPoolSize( pool_info.pool ); - if( pool_size == MEM_ERROR_RET ) - { - llinfos << "MemPoolSize() failed (" << pool_num << ")" << llendl; - } - else - { - llinfos << "MemPool Size " << pool_size / 1024 << "K" << llendl; - } - - total_pool_size += pool_size; - - if( !MemPoolLock( pool_info.pool ) ) - { - llinfos << "MemPoolLock failed (" << pool_num << ") " << llendl; - continue; - } - - U32 used_size = 0; - MEM_POOL_ENTRY entry; - entry.entry = NULL; - while( MemPoolWalk( pool_info.pool, &entry ) == MEM_POOL_OK ) - { - if( entry.isInUse ) - { - used_size += entry.size; - } - } - - MemPoolUnlock( pool_info.pool ); - - llinfos << "MemPool Used " << used_size/1024 << "K" << llendl; - total_used_size += used_size; - pool_num++; - } - - llinfos << "Total Pool Size " << total_pool_size/1024 << "K" << llendl; - llinfos << "Total Used Size " << total_used_size/1024 << "K" << llendl; - - } -#endif - - llinfos << "--------------------------------" << llendl; - llinfos << "Avatar Memory (partly overlaps with above stats):" << llendl; - LLTexLayerStaticImageList::getInstance()->dumpByteCount(); - LLVOAvatarSelf::dumpScratchTextureByteCount(); - LLTexLayerSetBuffer::dumpTotalByteCount(); - LLVOAvatarSelf::dumpTotalLocalTextureByteCount(); - LLTexLayerParamAlpha::dumpCacheByteCount(); - LLVOAvatar::dumpBakedStatus(); - - llinfos << llendl; - - llinfos << "Object counts:" << llendl; - S32 i; - S32 obj_counts[256]; -// S32 app_angles[256]; - for (i = 0; i < 256; i++) - { - obj_counts[i] = 0; - } - for (i = 0; i < gObjectList.getNumObjects(); i++) - { - LLViewerObject *objectp = gObjectList.getObject(i); - if (objectp) - { - obj_counts[objectp->getPCode()]++; - } - } - for (i = 0; i < 256; i++) - { - if (obj_counts[i]) - { - llinfos << LLPrimitive::pCodeToString(i) << ":" << obj_counts[i] << llendl; - } - } -} - - U32 gTotalLandIn = 0, gTotalLandOut = 0; U32 gTotalWaterIn = 0, gTotalWaterOut = 0; @@ -569,20 +422,15 @@ U32 gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] extern U32 gVisCompared; extern U32 gVisTested; -std::map<S32,LLFrameTimer> gDebugTimers; -std::map<S32,std::string> gDebugTimerLabel; +LLFrameTimer gTextureTimer; -void init_statistics() -{ - // Label debug timers - gDebugTimerLabel[0] = "Texture"; -} - -void update_statistics(U32 frame_count) +void update_statistics() { gTotalWorldBytes += gVLManager.getTotalBytes(); gTotalObjectBytes += gObjectBits / 8; + LLViewerStats& stats = LLViewerStats::instance(); + // make sure we have a valid time delta for this frame if (gFrameIntervalSeconds > 0.f) { @@ -599,51 +447,47 @@ void update_statistics(U32 frame_count) LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TOOLBOX_SECONDS, gFrameIntervalSeconds); } } - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); -#if 0 // 1.9.2 - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_OBJECTS, (F64)gSavedSettings.getS32("VertexShaderLevelObject")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_AVATAR, (F64)gSavedSettings.getBOOL("VertexShaderLevelAvatar")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_SHADER_ENVIRONMENT, (F64)gSavedSettings.getBOOL("VertexShaderLevelEnvironment")); -#endif - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); + stats.setStat(LLViewerStats::ST_ENABLE_VBO, (F64)gSavedSettings.getBOOL("RenderVBOEnable")); + stats.setStat(LLViewerStats::ST_LIGHTING_DETAIL, (F64)gPipeline.getLightingDetail()); + stats.setStat(LLViewerStats::ST_DRAW_DIST, (F64)gSavedSettings.getF32("RenderFarClip")); + stats.setStat(LLViewerStats::ST_CHAT_BUBBLES, (F64)gSavedSettings.getBOOL("UseChatBubbles")); + + stats.setStat(LLViewerStats::ST_FRAME_SECS, gDebugView->mFastTimerView->getTime("Frame")); F64 idle_secs = gDebugView->mFastTimerView->getTime("Idle"); F64 network_secs = gDebugView->mFastTimerView->getTime("Network"); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); + stats.setStat(LLViewerStats::ST_UPDATE_SECS, idle_secs - network_secs); + stats.setStat(LLViewerStats::ST_NETWORK_SECS, network_secs); + stats.setStat(LLViewerStats::ST_IMAGE_SECS, gDebugView->mFastTimerView->getTime("Update Images")); + stats.setStat(LLViewerStats::ST_REBUILD_SECS, gDebugView->mFastTimerView->getTime("Sort Draw State")); + stats.setStat(LLViewerStats::ST_RENDER_SECS, gDebugView->mFastTimerView->getTime("Geometry")); LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(gAgent.getRegion()->getHost()); if (cdp) { - LLViewerStats::getInstance()->mSimPingStat.addValue(cdp->getPingDelay()); + stats.mSimPingStat.addValue(cdp->getPingDelay()); gAvgSimPing = ((gAvgSimPing * (F32)gSimPingCount) + (F32)(cdp->getPingDelay())) / ((F32)gSimPingCount + 1); gSimPingCount++; } else { - LLViewerStats::getInstance()->mSimPingStat.addValue(10000); + stats.mSimPingStat.addValue(10000); } - LLViewerStats::getInstance()->mFPSStat.addValue(1); + stats.mFPSStat.addValue(1); F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits()); - LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f); - LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f); - LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); - LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); + stats.mLayersKBitStat.addValue(layer_bits/1024.f); + stats.mObjectKBitStat.addValue(gObjectBits/1024.f); + stats.mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending()); + stats.mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f); gTransferManager.resetTransferBitsIn(LLTCT_ASSET); if (LLAppViewer::getTextureFetch()->getNumRequests() == 0) { - gDebugTimers[0].pause(); + gTextureTimer.pause(); } else { - gDebugTimers[0].unpause(); + gTextureTimer.unpause(); } { @@ -655,7 +499,7 @@ void update_statistics(U32 frame_count) visible_avatar_frames = 1.f; avg_visible_avatars = (avg_visible_avatars * (F32)(visible_avatar_frames - 1.f) + visible_avatars) / visible_avatar_frames; } - LLViewerStats::getInstance()->setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars); + stats.setStat(LLViewerStats::ST_VISIBLE_AVATARS, (F64)avg_visible_avatars); } LLWorld::getInstance()->updateNetStats(); LLWorld::getInstance()->requestCacheMisses(); @@ -671,15 +515,14 @@ void update_statistics(U32 frame_count) static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - LLViewerStats::getInstance()->mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); - LLViewerStats::getInstance()->mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); + stats.mTextureKBitStat.addValue(LLViewerTextureList::sTextureBits/1024.f); + stats.mTexturePacketsStat.addValue(LLViewerTextureList::sTexturePackets); gTotalTextureBytes += LLViewerTextureList::sTextureBits / 8; LLViewerTextureList::sTextureBits = 0; LLViewerTextureList::sTexturePackets = 0; texture_stats_timer.reset(); } } - } class ViewerStatsResponder : public LLHTTPClient::Responder @@ -868,10 +711,7 @@ void send_stats() S32 window_height = gViewerWindow->getWindowHeightRaw(); S32 window_size = (window_width * window_height) / 1024; misc["string_1"] = llformat("%d", window_size); - if (gDebugTimers.find(0) != gDebugTimers.end() && gFrameTimeSeconds > 0) - { - misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gDebugTimers[0].getElapsedTimeF32(), gFrameTimeSeconds); - } + misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds); // misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21 // misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21 diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 554e4d647e..e02a4ccdc7 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -33,92 +33,90 @@ class LLViewerStats : public LLSingleton<LLViewerStats> { public: - LLStat mKBitStat; - LLStat mLayersKBitStat; - LLStat mObjectKBitStat; - LLStat mAssetKBitStat; - LLStat mTextureKBitStat; - LLStat mVFSPendingOperations; - LLStat mObjectsDrawnStat; - LLStat mObjectsCulledStat; - LLStat mObjectsTestedStat; - LLStat mObjectsComparedStat; - LLStat mObjectsOccludedStat; - LLStat mFPSStat; - LLStat mPacketsInStat; - LLStat mPacketsLostStat; - LLStat mPacketsOutStat; - LLStat mPacketsLostPercentStat; - LLStat mTexturePacketsStat; - LLStat mActualInKBitStat; // From the packet ring (when faking a bad connection) - LLStat mActualOutKBitStat; // From the packet ring (when faking a bad connection) - LLStat mTrianglesDrawnStat; + LLStat mKBitStat, + mLayersKBitStat, + mObjectKBitStat, + mAssetKBitStat, + mTextureKBitStat, + mVFSPendingOperations, + mObjectsDrawnStat, + mObjectsCulledStat, + mObjectsTestedStat, + mObjectsComparedStat, + mObjectsOccludedStat, + mFPSStat, + mPacketsInStat, + mPacketsLostStat, + mPacketsOutStat, + mPacketsLostPercentStat, + mTexturePacketsStat, + mActualInKBitStat, // From the packet ring (when faking a bad connection) + mActualOutKBitStat, // From the packet ring (when faking a bad connection) + mTrianglesDrawnStat; // Simulator stats - LLStat mSimTimeDilation; - - LLStat mSimFPS; - LLStat mSimPhysicsFPS; - LLStat mSimAgentUPS; - LLStat mSimScriptEPS; - - LLStat mSimFrameMsec; - LLStat mSimNetMsec; - LLStat mSimSimOtherMsec; - LLStat mSimSimPhysicsMsec; - - LLStat mSimSimPhysicsStepMsec; - LLStat mSimSimPhysicsShapeUpdateMsec; - LLStat mSimSimPhysicsOtherMsec; - - LLStat mSimSimAIStepMsec; - LLStat mSimSimSkippedSilhouetteSteps; - LLStat mSimSimPctSteppedCharacters; - - LLStat mSimAgentMsec; - LLStat mSimImagesMsec; - LLStat mSimScriptMsec; - LLStat mSimSpareMsec; - LLStat mSimSleepMsec; - LLStat mSimPumpIOMsec; - - LLStat mSimMainAgents; - LLStat mSimChildAgents; - LLStat mSimObjects; - LLStat mSimActiveObjects; - LLStat mSimActiveScripts; - LLStat mSimPctScriptsRun; - - LLStat mSimInPPS; - LLStat mSimOutPPS; - LLStat mSimPendingDownloads; - LLStat mSimPendingUploads; - LLStat mSimPendingLocalUploads; - LLStat mSimTotalUnackedBytes; - - LLStat mPhysicsPinnedTasks; - LLStat mPhysicsLODTasks; - LLStat mPhysicsMemoryAllocated; - - LLStat mSimPingStat; - - LLStat mNumImagesStat; - LLStat mNumRawImagesStat; - LLStat mGLTexMemStat; - LLStat mGLBoundMemStat; - LLStat mRawMemStat; - LLStat mFormattedMemStat; - - LLStat mNumObjectsStat; - LLStat mNumActiveObjectsStat; - LLStat mNumNewObjectsStat; - LLStat mNumSizeCulledStat; - LLStat mNumVisCulledStat; + LLStat mSimTimeDilation, + + mSimFPS, + mSimPhysicsFPS, + mSimAgentUPS, + mSimScriptEPS, + + mSimFrameMsec, + mSimNetMsec, + mSimSimOtherMsec, + mSimSimPhysicsMsec, + + mSimSimPhysicsStepMsec, + mSimSimPhysicsShapeUpdateMsec, + mSimSimPhysicsOtherMsec, + mSimSimAIStepMsec, + mSimSimSkippedSilhouetteSteps, + mSimSimPctSteppedCharacters, + + mSimAgentMsec, + mSimImagesMsec, + mSimScriptMsec, + mSimSpareMsec, + mSimSleepMsec, + mSimPumpIOMsec, + + mSimMainAgents, + mSimChildAgents, + mSimObjects, + mSimActiveObjects, + mSimActiveScripts, + mSimPctScriptsRun, + + mSimInPPS, + mSimOutPPS, + mSimPendingDownloads, + mSimPendingUploads, + mSimPendingLocalUploads, + mSimTotalUnackedBytes, + + mPhysicsPinnedTasks, + mPhysicsLODTasks, + mPhysicsMemoryAllocated, + + mSimPingStat, + + mNumImagesStat, + mNumRawImagesStat, + mGLTexMemStat, + mGLBoundMemStat, + mRawMemStat, + mFormattedMemStat, + + mNumObjectsStat, + mNumActiveObjectsStat, + mNumNewObjectsStat, + mNumSizeCulledStat, + mNumVisCulledStat; void resetStats(); public: - // If you change this, please also add a corresponding text label - // in statTypeToText in llviewerstats.cpp + // If you change this, please also add a corresponding text label in llviewerstats.cpp enum EStatType { ST_VERSION = 0, @@ -183,7 +181,6 @@ public: ST_COUNT = 58 }; - LLViewerStats(); ~LLViewerStats(); @@ -310,14 +307,10 @@ private: static const F32 SEND_STATS_PERIOD = 300.0f; // The following are from (older?) statistics code found in appviewer. -void init_statistics(); -void reset_statistics(); -void output_statistics(void*); -void update_statistics(U32 frame_count); +void update_statistics(); void send_stats(); -extern std::map<S32,LLFrameTimer> gDebugTimers; -extern std::map<S32,std::string> gDebugTimerLabel; +extern LLFrameTimer gTextureTimer; extern U32 gTotalTextureBytes; extern U32 gTotalObjectBytes; extern U32 gTotalTextureBytesPerBoostLevel[] ; diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index e9d21b4848..91e485d01b 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -27,7 +27,6 @@ #include "llviewerprecompiledheaders.h" #include "llviewerstatsrecorder.h" -#if LL_RECORD_VIEWER_STATS #include "llfile.h" #include "llviewerregion.h" @@ -45,9 +44,8 @@ LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL; LLViewerStatsRecorder::LLViewerStatsRecorder() : mObjectCacheFile(NULL), mTimer(), - mRegionp(NULL), - mStartTime(0.f), - mProcessingTime(0.f) + mStartTime(0.0), + mLastSnapshotTime(0.0) { if (NULL != sInstance) { @@ -61,112 +59,77 @@ LLViewerStatsRecorder::~LLViewerStatsRecorder() { if (mObjectCacheFile != NULL) { + // last chance snapshot + writeToLog(0.f); LLFile::close(mObjectCacheFile); mObjectCacheFile = NULL; } } -// static -void LLViewerStatsRecorder::initClass() -{ - sInstance = new LLViewerStatsRecorder(); -} - -// static -void LLViewerStatsRecorder::cleanupClass() -{ - delete sInstance; - sInstance = NULL; -} - - -void LLViewerStatsRecorder::initStatsRecorder(LLViewerRegion *regionp) -{ - if (mObjectCacheFile == NULL) - { - mStartTime = LLTimer::getTotalTime(); - mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb"); - if (mObjectCacheFile) - { // Write column headers - std::ostringstream data_msg; - data_msg << "EventTime, " - << "ProcessingTime, " - << "CacheHits, " - << "CacheFullMisses, " - << "CacheCrcMisses, " - << "FullUpdates, " - << "TerseUpdates, " - << "CacheMissRequests, " - << "CacheMissResponses, " - << "CacheUpdateDupes, " - << "CacheUpdateChanges, " - << "CacheUpdateAdds, " - << "CacheUpdateReplacements, " - << "UpdateFailures" - << "\n"; - - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); - } - } -} - -void LLViewerStatsRecorder::beginObjectUpdateEvents(LLViewerRegion *regionp) -{ - initStatsRecorder(regionp); - mRegionp = regionp; - mProcessingTime = LLTimer::getTotalTime(); - clearStats(); -} - void LLViewerStatsRecorder::clearStats() { mObjectCacheHitCount = 0; + mObjectCacheHitSize = 0; mObjectCacheMissFullCount = 0; + mObjectCacheMissFullSize = 0; mObjectCacheMissCrcCount = 0; + mObjectCacheMissCrcSize = 0; mObjectFullUpdates = 0; + mObjectFullUpdatesSize = 0; mObjectTerseUpdates = 0; + mObjectTerseUpdatesSize = 0; mObjectCacheMissRequests = 0; mObjectCacheMissResponses = 0; + mObjectCacheMissResponsesSize = 0; mObjectCacheUpdateDupes = 0; mObjectCacheUpdateChanges = 0; mObjectCacheUpdateAdds = 0; mObjectCacheUpdateReplacements = 0; mObjectUpdateFailures = 0; + mObjectUpdateFailuresSize = 0; + mTextureFetchSize = 0; } -void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type) +void LLViewerStatsRecorder::recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size) { mObjectUpdateFailures++; + mObjectUpdateFailuresSize += msg_size; } -void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type) +void LLViewerStatsRecorder::recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size) { if (LLViewerRegion::CACHE_MISS_TYPE_FULL == cache_miss_type) { mObjectCacheMissFullCount++; + mObjectCacheMissFullSize += msg_size; } else { mObjectCacheMissCrcCount++; + mObjectCacheMissCrcSize += msg_size; } } -void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp) +void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size) { switch (update_type) { case OUT_FULL: mObjectFullUpdates++; + mObjectFullUpdatesSize += msg_size; break; case OUT_TERSE_IMPROVED: mObjectTerseUpdates++; + mObjectTerseUpdatesSize += msg_size; break; case OUT_FULL_COMPRESSED: mObjectCacheMissResponses++; + mObjectCacheMissResponsesSize += msg_size; break; case OUT_FULL_CACHED: mObjectCacheHitCount++; + mObjectCacheHitSize += msg_size; break; default: llwarns << "Unknown update_type" << llendl; @@ -174,7 +137,7 @@ void LLViewerStatsRecorder::recordObjectUpdateEvent(U32 local_id, const EObjectU }; } -void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp) +void LLViewerStatsRecorder::recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size) { switch (update_result) { @@ -201,9 +164,15 @@ void LLViewerStatsRecorder::recordRequestCacheMissesEvent(S32 count) mObjectCacheMissRequests += count; } -void LLViewerStatsRecorder::endObjectUpdateEvents() +void LLViewerStatsRecorder::writeToLog( F32 interval ) { - llinfos << "ILX: " + F64 delta_time = LLTimer::getTotalSeconds() - mLastSnapshotTime; + S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures; + + if ( delta_time < interval || total_objects == 0) return; + + mLastSnapshotTime = LLTimer::getTotalSeconds(); + lldebugs << "ILX: " << mObjectCacheHitCount << " hits, " << mObjectCacheMissFullCount << " full misses, " << mObjectCacheMissCrcCount << " crc misses, " @@ -218,41 +187,81 @@ void LLViewerStatsRecorder::endObjectUpdateEvents() << mObjectUpdateFailures << " update failures" << llendl; - S32 total_objects = mObjectCacheHitCount + mObjectCacheMissCrcCount + mObjectCacheMissFullCount + mObjectFullUpdates + mObjectTerseUpdates + mObjectCacheMissRequests + mObjectCacheMissResponses + mObjectCacheUpdateDupes + mObjectCacheUpdateChanges + mObjectCacheUpdateAdds + mObjectCacheUpdateReplacements + mObjectUpdateFailures; - if (mObjectCacheFile != NULL && - total_objects > 0) + if (mObjectCacheFile == NULL) { - std::ostringstream data_msg; - F32 processing32 = (F32) ((LLTimer::getTotalTime() - mProcessingTime) / 1000.0); - - data_msg << getTimeSinceStart() - << ", " << processing32 - << ", " << mObjectCacheHitCount - << ", " << mObjectCacheMissFullCount - << ", " << mObjectCacheMissCrcCount - << ", " << mObjectFullUpdates - << ", " << mObjectTerseUpdates - << ", " << mObjectCacheMissRequests - << ", " << mObjectCacheMissResponses - << ", " << mObjectCacheUpdateDupes - << ", " << mObjectCacheUpdateChanges - << ", " << mObjectCacheUpdateAdds - << ", " << mObjectCacheUpdateReplacements - << ", " << mObjectUpdateFailures - << "\n"; + mStartTime = LLTimer::getTotalSeconds(); + mObjectCacheFile = LLFile::fopen(STATS_FILE_NAME, "wb"); + if (mObjectCacheFile) + { // Write column headers + std::ostringstream data_msg; + data_msg << "EventTime(ms)\t" + << "Cache Hits\t" + << "Cache Full Misses\t" + << "Cache Crc Misses\t" + << "Full Updates\t" + << "Terse Updates\t" + << "Cache Miss Requests\t" + << "Cache Miss Responses\t" + << "Cache Update Dupes\t" + << "Cache Update Changes\t" + << "Cache Update Adds\t" + << "Cache Update Replacements\t" + << "Update Failures\t" + << "Cache Hits bps\t" + << "Cache Full Misses bps\t" + << "Cache Crc Misses bps\t" + << "Full Updates bps\t" + << "Terse Updates bps\t" + << "Cache Miss Responses bps\t" + << "Texture Fetch bps\t" + << "\n"; - fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); + } + else + { + llwarns << "Couldn't open " << STATS_FILE_NAME << " for logging." << llendl; + return; + } } + std::ostringstream data_msg; + + data_msg << getTimeSinceStart() + << "\t " << mObjectCacheHitCount + << "\t" << mObjectCacheMissFullCount + << "\t" << mObjectCacheMissCrcCount + << "\t" << mObjectFullUpdates + << "\t" << mObjectTerseUpdates + << "\t" << mObjectCacheMissRequests + << "\t" << mObjectCacheMissResponses + << "\t" << mObjectCacheUpdateDupes + << "\t" << mObjectCacheUpdateChanges + << "\t" << mObjectCacheUpdateAdds + << "\t" << mObjectCacheUpdateReplacements + << "\t" << mObjectUpdateFailures + << "\t" << (mObjectCacheHitSize * 8 / delta_time) + << "\t" << (mObjectCacheMissFullSize * 8 / delta_time) + << "\t" << (mObjectCacheMissCrcSize * 8 / delta_time) + << "\t" << (mObjectFullUpdatesSize * 8 / delta_time) + << "\t" << (mObjectTerseUpdatesSize * 8 / delta_time) + << "\t" << (mObjectCacheMissResponsesSize * 8 / delta_time) + << "\t" << (mTextureFetchSize * 8 / delta_time) + << "\n"; + + fwrite(data_msg.str().c_str(), 1, data_msg.str().size(), mObjectCacheFile ); clearStats(); } F32 LLViewerStatsRecorder::getTimeSinceStart() { - return (F32) ((LLTimer::getTotalTime() - mStartTime) / 1000.0); + return (F32) (LLTimer::getTotalSeconds() - mStartTime); } -#endif +void LLViewerStatsRecorder::recordTextureFetch( S32 msg_size ) +{ + mTextureFetchSize += msg_size; +} diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index 612ac380f7..d1744f4910 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -35,63 +35,111 @@ #define LL_RECORD_VIEWER_STATS 0 -#if LL_RECORD_VIEWER_STATS #include "llframetimer.h" #include "llviewerobject.h" #include "llviewerregion.h" class LLMutex; -class LLViewerRegion; class LLViewerObject; -class LLViewerStatsRecorder +class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder> { public: + LOG_CLASS(LLViewerStatsRecorder); LLViewerStatsRecorder(); ~LLViewerStatsRecorder(); - static void initClass(); - static void cleanupClass(); - static LLViewerStatsRecorder* instance() {return sInstance; } + void objectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordObjectUpdateFailure(local_id, update_type, msg_size); +#endif + } - void initStatsRecorder(LLViewerRegion *regionp); + void cacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordCacheMissEvent(local_id, update_type, cache_miss_type, msg_size); +#endif + } - void beginObjectUpdateEvents(LLViewerRegion *regionp); - void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type); - void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type); - void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp); - void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp); - void recordRequestCacheMissesEvent(S32 count); - void endObjectUpdateEvents(); + void objectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordObjectUpdateEvent(local_id, update_type, objectp, msg_size); +#endif + } + + void cacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordCacheFullUpdate(local_id, update_type, update_result, objectp, msg_size); +#endif + } + + void requestCacheMissesEvent(S32 count) + { +#if LL_RECORD_VIEWER_STATS + recordRequestCacheMissesEvent(count); +#endif + } + + void textureFetch(S32 msg_size) + { +#if LL_RECORD_VIEWER_STATS + recordTextureFetch(msg_size); +#endif + } + + void log(F32 interval) + { +#if LL_RECORD_VIEWER_STATS + writeToLog(interval); +#endif + } F32 getTimeSinceStart(); private: + void recordObjectUpdateFailure(U32 local_id, const EObjectUpdateType update_type, S32 msg_size); + void recordCacheMissEvent(U32 local_id, const EObjectUpdateType update_type, U8 cache_miss_type, S32 msg_size); + void recordObjectUpdateEvent(U32 local_id, const EObjectUpdateType update_type, LLViewerObject * objectp, S32 msg_size); + void recordCacheFullUpdate(U32 local_id, const EObjectUpdateType update_type, LLViewerRegion::eCacheUpdateResult update_result, LLViewerObject* objectp, S32 msg_size); + void recordRequestCacheMissesEvent(S32 count); + void recordTextureFetch(S32 msg_size); + void writeToLog(F32 interval); + static LLViewerStatsRecorder* sInstance; LLFILE * mObjectCacheFile; // File to write data into LLFrameTimer mTimer; - LLViewerRegion* mRegionp; F64 mStartTime; - F64 mProcessingTime; + F64 mLastSnapshotTime; S32 mObjectCacheHitCount; + S32 mObjectCacheHitSize; S32 mObjectCacheMissFullCount; + S32 mObjectCacheMissFullSize; S32 mObjectCacheMissCrcCount; + S32 mObjectCacheMissCrcSize; S32 mObjectFullUpdates; + S32 mObjectFullUpdatesSize; S32 mObjectTerseUpdates; + S32 mObjectTerseUpdatesSize; S32 mObjectCacheMissRequests; S32 mObjectCacheMissResponses; + S32 mObjectCacheMissResponsesSize; S32 mObjectCacheUpdateDupes; S32 mObjectCacheUpdateChanges; S32 mObjectCacheUpdateAdds; S32 mObjectCacheUpdateReplacements; S32 mObjectUpdateFailures; + S32 mObjectUpdateFailuresSize; + S32 mTextureFetchSize; void clearStats(); }; -#endif // LL_RECORD_VIEWER_STATS #endif // LLVIEWERSTATSRECORDER_H diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 99102309a1..122d8f4a96 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1144,6 +1144,14 @@ void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc { preview->setAuxItem( item ); preview->setNotecardInfo(mNotecardInventoryID, mObjectID); + if (preview->hasString("Title")) + { + LLStringUtil::format_map_t args; + args["[NAME]"] = item->getName(); + LLUIString title = preview->getString("Title", args); + preview->setTitle(title.getString()); + } + preview->getChild<LLUICtrl>("desc")->setValue(item->getDescription()); } } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 96d7890a9e..634ff1392e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -39,7 +39,6 @@ #include "llimagebmp.h" #include "llimagej2c.h" #include "llimagetga.h" -#include "llmemtype.h" #include "llstl.h" #include "llvfile.h" #include "llvfs.h" @@ -1532,7 +1531,12 @@ void LLViewerFetchedTexture::addToCreateTexture() destroyRawImage(); return ; } - mRawImage->scale(w >> i, h >> i) ; + + { + //make a duplicate in case somebody else is using this raw image + mRawImage = mRawImage->duplicate(); + mRawImage->scale(w >> i, h >> i) ; + } } } } @@ -1765,7 +1769,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() else if (pixel_priority < 0.001f && !have_all_data) { // Not on screen but we might want some data - if (mBoostLevel > BOOST_HIGH) + if (mBoostLevel > BOOST_SELECTED) { // Always want high boosted images priority = 1.f; @@ -2900,7 +2904,11 @@ void LLViewerFetchedTexture::setCachedRawImage() --i ; } - mRawImage->scale(w >> i, h >> i) ; + { + //make a duplicate in case somebody else is using this raw image + mRawImage = mRawImage->duplicate(); + mRawImage->scale(w >> i, h >> i) ; + } } mCachedRawImage = mRawImage ; mRawDiscardLevel += i ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 2e7949e9a3..2eaa0ac92d 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -116,9 +116,9 @@ public: BOOST_SCULPTED , BOOST_HIGH = 10, - BOOST_BUMP , - BOOST_TERRAIN , // has to be high priority for minimap / low detail BOOST_SELECTED , + BOOST_BUMP , + BOOST_TERRAIN , // has to be high priority for minimap / low detail BOOST_AVATAR_BAKED_SELF , BOOST_AVATAR_SELF , // needed for baking avatar BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay. diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 49d7e8b842..b9f5c432d0 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -67,12 +67,12 @@ void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL; U32 LLViewerTextureList::sTextureBits = 0; U32 LLViewerTextureList::sTexturePackets = 0; S32 LLViewerTextureList::sNumImages = 0; -LLStat LLViewerTextureList::sNumImagesStat(32, TRUE); -LLStat LLViewerTextureList::sNumRawImagesStat(32, TRUE); -LLStat LLViewerTextureList::sGLTexMemStat(32, TRUE); -LLStat LLViewerTextureList::sGLBoundMemStat(32, TRUE); -LLStat LLViewerTextureList::sRawMemStat(32, TRUE); -LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); +LLStat LLViewerTextureList::sNumImagesStat("Num Images", 32, TRUE); +LLStat LLViewerTextureList::sNumRawImagesStat("Num Raw Images", 32, TRUE); +LLStat LLViewerTextureList::sGLTexMemStat("GL Texture Mem", 32, TRUE); +LLStat LLViewerTextureList::sGLBoundMemStat("GL Bound Mem", 32, TRUE); +LLStat LLViewerTextureList::sRawMemStat("Raw Image Mem", 32, TRUE); +LLStat LLViewerTextureList::sFormattedMemStat("Formatted Image Mem", 32, TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); @@ -1006,14 +1006,6 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time) break; } } - //if (fetch_count == 0) - //{ - // gDebugTimers[0].pause(); - //} - //else - //{ - // gDebugTimers[0].unpause(); - //} return image_op_timer.getElapsedTimeF32(); } @@ -1385,7 +1377,6 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d { static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ; - LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE); LLFastTimer t(FTM_PROCESS_IMAGES); // Receives image packet, copy into image object, diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h index 3bc95cbfbf..2826e6c316 100644 --- a/indra/newview/llviewervisualparam.h +++ b/indra/newview/llviewervisualparam.h @@ -65,6 +65,7 @@ protected: // VIRTUAL CLASS // a viewer side interface class for a generalized parametric modification of the avatar mesh //----------------------------------------------------------------------------- +LL_ALIGN_PREFIX(16) class LLViewerVisualParam : public LLVisualParam { public: @@ -104,6 +105,6 @@ public: BOOL getCrossWearable() const { return getInfo()->mCrossWearable; } -}; +} LL_ALIGN_POSTFIX(16); #endif // LL_LLViewerVisualParam_H diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1def2db829..b9243f3fdb 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -77,6 +77,7 @@ #include "llmediaentry.h" #include "llurldispatcher.h" #include "raytrace.h" +#include "llstat.h" // newview includes #include "llagent.h" @@ -334,27 +335,24 @@ public: if (gSavedSettings.getBOOL("DebugShowTime")) { - const U32 y_inc2 = 15; - for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin(); - iter != gDebugTimers.rend(); ++iter) { - S32 idx = iter->first; - LLFrameTimer& timer = iter->second; + const U32 y_inc2 = 15; + LLFrameTimer& timer = gTextureTimer; F32 time = timer.getElapsedTimeF32(); S32 hours = (S32)(time / (60*60)); S32 mins = (S32)((time - hours*(60*60)) / 60); S32 secs = (S32)((time - hours*(60*60) - mins*60)); - std::string label = gDebugTimerLabel[idx]; - if (label.empty()) label = llformat("Debug: %d", idx); - addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2; + addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2; } + { F32 time = gFrameTimeSeconds; S32 hours = (S32)(time / (60*60)); S32 mins = (S32)((time - hours*(60*60)) / 60); S32 secs = (S32)((time - hours*(60*60) - mins*60)); addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc; } + } #if LL_WINDOWS if (gSavedSettings.getBOOL("DebugShowMemory")) @@ -618,7 +616,7 @@ public: addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount, LLMeshRepository::sHTTPRetryCount)); ypos += y_inc; - + addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, LLMeshRepository::sLODProcessing)); ypos += y_inc; @@ -1545,7 +1543,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), - mProgressView(NULL) + mProgressView(NULL), + mMouseVelocityStat(new LLStat("Mouse Velocity")) { // gKeyboard is still NULL, so it doesn't do LLWindowListener any good to // pass its value right now. Instead, pass it a nullary function that @@ -1934,7 +1933,7 @@ void LLViewerWindow::initWorldUI() panel_ssf_container->addChild(panel_stand_stop_flying); panel_ssf_container->setVisible(TRUE); - + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize(); // Load and make the toolbars visible @@ -1982,12 +1981,12 @@ void LLViewerWindow::shutdownViews() gMorphView->setVisible(FALSE); } llinfos << "Global views cleaned." << llendl ; - + // DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open // will crump with LL_ERRS. LLModalDialog::shutdownModals(); llinfos << "LLModalDialog shut down." << llendl; - + // destroy the nav bar, not currently part of gViewerWindow // *TODO: Make LLNavigationBar part of gViewerWindow if (LLNavigationBar::instanceExists()) @@ -1995,17 +1994,17 @@ void LLViewerWindow::shutdownViews() delete LLNavigationBar::getInstance(); } llinfos << "LLNavigationBar destroyed." << llendl ; - + // destroy menus after instantiating navbar above, as it needs // access to gMenuHolder cleanup_menus(); llinfos << "menus destroyed." << llendl ; - + // Delete all child views. delete mRootView; mRootView = NULL; llinfos << "RootView deleted." << llendl ; - + LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit(); // Automatically deleted as children of mRootView. Fix the globals. @@ -2075,6 +2074,8 @@ LLViewerWindow::~LLViewerWindow() delete mDebugText; mDebugText = NULL; + + delete mMouseVelocityStat; } @@ -3248,7 +3249,7 @@ void LLViewerWindow::updateMouseDelta() mouse_vel.setVec((F32) dx, (F32) dy); } - mMouseVelocityStat.addValue(mouse_vel.magVec()); + mMouseVelocityStat->addValue(mouse_vel.magVec()); } void LLViewerWindow::updateKeyboardFocus() @@ -4246,7 +4247,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei F32 scale_factor = 1.0f ; if (!keep_window_aspect || (image_width > window_width) || (image_height > window_height)) { - if ((image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) + if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) && + (image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui) { if (scratch_space.allocate(image_width, image_height, GL_RGBA, true, true)) { @@ -4261,6 +4263,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei snapshot_height = image_height; reset_deferred = true; mWorldViewRectRaw.set(0, image_height, image_width, 0); + LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); + LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); scratch_space.bindTarget(); } else @@ -4470,6 +4474,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if (reset_deferred) { mWorldViewRectRaw = window_rect; + LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); + LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); scratch_space.flush(); scratch_space.release(); gPipeline.allocateScreenBuffer(original_width, original_height); @@ -4772,7 +4778,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) LLViewerDynamicTexture::restoreGL(); LLVOAvatar::restoreGL(); LLVOPartGroup::restoreGL(); - + gResizeScreenTexture = TRUE; gWindowResized = TRUE; @@ -4999,7 +5005,7 @@ S32 LLViewerWindow::getChatConsoleBottomPad() S32 offset = 0; if(gToolBarView) - offset += gToolBarView->getChild<LLView>("bottom_toolbar_panel")->getRect().getHeight(); + offset += gToolBarView->getBottomToolbar()->getRect().getHeight(); return offset; } @@ -5259,8 +5265,8 @@ void LLPickInfo::getSurfaceInfo() LLFace* facep = objectp->mDrawable->getFace(mObjectFace); if (facep) { - mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal); - } + mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal); + } } // and XY coords: diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 6efcaeaf18..5f475fe145 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -41,7 +41,6 @@ #include "llcursortypes.h" #include "llwindowcallbacks.h" #include "lltimer.h" -#include "llstat.h" #include "llmousehandler.h" #include "llhandle.h" #include "llinitparam.h" @@ -50,7 +49,7 @@ #include <boost/signals2.hpp> #include <boost/scoped_ptr.hpp> - +class LLStat; class LLView; class LLViewerObject; class LLUUID; @@ -251,7 +250,7 @@ public: S32 getCurrentMouseDX() const { return mCurrentMouseDelta.mX; } S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; } LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } - LLStat * getMouseVelocityStat() { return &mMouseVelocityStat; } + LLStat* getMouseVelocityStat() { return mMouseVelocityStat; } BOOL getLeftMouseDown() const { return mLeftMouseDown; } BOOL getMiddleMouseDown() const { return mMiddleMouseDown; } BOOL getRightMouseDown() const { return mRightMouseDown; } @@ -428,7 +427,7 @@ private: LLCoordGL mCurrentMousePoint; // last mouse position in GL coords LLCoordGL mLastMousePoint; // Mouse point at last frame. LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame - LLStat mMouseVelocityStat; + LLStat* mMouseVelocityStat; BOOL mLeftMouseDown; BOOL mMiddleMouseDown; BOOL mRightMouseDown; diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index ec932501e5..abb5153480 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -457,8 +457,6 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, texturep->createGLTexture(0, raw); } texturep->setSubImage(raw, tex_x_begin, tex_y_begin, tex_x_end - tex_x_begin, tex_y_end - tex_y_begin); - LLSurface::sTextureUpdateTime += gen_timer.getElapsedTimeF32(); - LLSurface::sTexelsUpdated += (tex_x_end - tex_x_begin) * (tex_y_end - tex_y_begin); for (S32 i = 0; i < 4; i++) { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 627238b0f5..62e93b7a53 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -695,7 +695,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mLastRezzedStatus(-1) { - LLMemType mt(LLMemType::MTYPE_AVATAR); //VTResume(); // VTune // mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline @@ -1739,8 +1738,6 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector //----------------------------------------------------------------------------- BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- @@ -1782,8 +1779,6 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) //----------------------------------------------------------------------------- BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent, S32 &volume_num, S32 &joint_num) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - LLViewerJoint* joint = NULL; if (info->mIsJoint) @@ -1849,8 +1844,6 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent //----------------------------------------------------------------------------- BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // allocate joints //------------------------------------------------------------------------- @@ -1921,8 +1914,6 @@ void LLVOAvatar::startDefaultMotions() //----------------------------------------------------------------------------- void LLVOAvatar::buildCharacter() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //------------------------------------------------------------------------- // remove all references to our existing skeleton // so we can rebuild it @@ -2072,8 +2063,6 @@ void LLVOAvatar::buildCharacter() //----------------------------------------------------------------------------- void LLVOAvatar::releaseMeshData() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if (sInstances.size() < AVATAR_RELEASE_THRESHOLD || mIsDummy) { return; @@ -2128,7 +2117,6 @@ void LLVOAvatar::releaseMeshData() void LLVOAvatar::restoreMeshData() { llassert(!isSelf()); - LLMemType mt(LLMemType::MTYPE_AVATAR); //llinfos << "Restoring" << llendl; mMeshValid = TRUE; @@ -2344,8 +2332,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - LLVector3 old_vel = getVelocity(); const BOOL has_name = !getNVPair("FirstName"); @@ -2425,7 +2411,6 @@ void LLVOAvatar::dumpAnimationState() //------------------------------------------------------------------------ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - LLMemType mt(LLMemType::MTYPE_AVATAR); LLFastTimer t(FTM_AVATAR_UPDATE); if (isDead()) @@ -3463,8 +3448,6 @@ bool LLVOAvatar::isVisuallyMuted() const //------------------------------------------------------------------------ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // clear debug text mDebugText.clear(); if (LLVOAvatar::sShowAnimationDebug) @@ -4808,8 +4791,6 @@ const LLUUID& LLVOAvatar::getStepSound() const //----------------------------------------------------------------------------- void LLVOAvatar::processAnimationStateChanges() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if ( isAnyAnimationSignaled(AGENT_WALK_ANIMS, NUM_AGENT_WALK_ANIMS) ) { startMotion(ANIM_AGENT_WALK_ADJUST); @@ -4900,8 +4881,6 @@ void LLVOAvatar::processAnimationStateChanges() //----------------------------------------------------------------------------- BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start ) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - BOOL result = FALSE; if ( start ) // start animation @@ -5036,8 +5015,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) //----------------------------------------------------------------------------- BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - lldebugs << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << llendl; LLUUID remap_id = remapMotionID(id); @@ -5866,8 +5843,6 @@ BOOL LLVOAvatar::isActive() const //----------------------------------------------------------------------------- void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - if (mDrawable.isNull()) { return; @@ -7312,8 +7287,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } - LLMemType mt(LLMemType::MTYPE_AVATAR); - BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived; mFirstAppearanceMessageReceived = TRUE; @@ -7514,7 +7487,6 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture if (!userdata) return; //llinfos << "onBakedTextureMasksLoaded: " << src_vi->getID() << llendl; - const LLMemType mt(LLMemType::MTYPE_AVATAR); const LLUUID id = src_vi->getID(); LLTextureMaskData* maskData = (LLTextureMaskData*) userdata; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7a81063f83..e32fd3c3c8 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -257,8 +257,6 @@ BOOL LLVOAvatarSelf::loadAvatarSelf() BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // add special-purpose "screen" joint mScreenp = new LLViewerJoint("mScreen", NULL); // for now, put screen at origin, as it is only used during special @@ -652,8 +650,6 @@ BOOL LLVOAvatarSelf::loadLayersets() // virtual BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent) { - LLMemType mt(LLMemType::MTYPE_AVATAR); - // update screen joint size if (mScreenp) { @@ -1008,8 +1004,6 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() // virtual void LLVOAvatarSelf::restoreMeshData() { - LLMemType mt(LLMemType::MTYPE_AVATAR); - //llinfos << "Restoring" << llendl; mMeshValid = TRUE; updateJointLODs(); diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 566c33c0af..4dca87652d 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -675,7 +675,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); void LLGrassPartition::getGeometry(LLSpatialGroup* group) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLFastTimer ftm(FTM_REBUILD_GRASS_VB); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index e4f9915e93..fa34a6f1f5 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -599,7 +599,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_GEOM("Particle Geom"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM); std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater()); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 5d1c335078..c0f80cf855 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1133,22 +1133,40 @@ void LLVOVolume::sculpt() S32 max_discard = mSculptTexture->getMaxDiscardLevel(); if (discard_level > max_discard) - discard_level = max_discard; // clamp to the best we can do + { + discard_level = max_discard; // clamp to the best we can do + } + if(discard_level > MAX_DISCARD_LEVEL) + { + return; //we think data is not ready yet. + } S32 current_discard = getVolume()->getSculptLevel() ; if(current_discard < -2) { - llwarns << "WARNING!!: Current discard of sculpty at " << current_discard - << " is less than -2." << llendl; + static S32 low_sculpty_discard_warning_count = 100; + if (++low_sculpty_discard_warning_count >= 100) + { // Log first time, then every 100 afterwards otherwise this can flood the logs + llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() + << " at " << current_discard + << " is less than -2." << llendl; + low_sculpty_discard_warning_count = 0; + } // corrupted volume... don't update the sculpty return; } else if (current_discard > MAX_DISCARD_LEVEL) { - llwarns << "WARNING!!: Current discard of sculpty at " << current_discard - << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl; - + static S32 high_sculpty_discard_warning_count = 100; + if (++high_sculpty_discard_warning_count >= 100) + { // Log first time, then every 100 afterwards otherwise this can flood the logs + llwarns << "WARNING!!: Current discard for sculpty " << mSculptTexture->getID() + << " at " << current_discard + << " is more than than allowed max of " << MAX_DISCARD_LEVEL << llendl; + high_sculpty_discard_warning_count = 0; + } + // corrupted volume... don't update the sculpty return; } @@ -1483,7 +1501,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) updateRadius(); mDrawable->movePartition(); - + return res; } @@ -3583,7 +3601,6 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e if (LLFloater::isVisible(gFloaterTools) && getAvatar()->isSelf()) { updateRiggedVolume(); - genBBoxes(FALSE); volume = mRiggedVolume; transform = false; } @@ -3983,7 +4000,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face"); void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type) { LLFastTimer t(FTM_REGISTER_FACE); - LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) { @@ -4026,10 +4042,6 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, else { model_mat = &(drawable->getRegion()->mRenderMatrix); - if (model_mat->isIdentity()) - { - model_mat = NULL; - } } //drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD))); @@ -4593,7 +4605,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (is_rigged) { - drawablep->setState(LLDrawable::RIGGED); + if (!drawablep->isState(LLDrawable::RIGGED)) + { + drawablep->setState(LLDrawable::RIGGED); + + //first time this is drawable is being marked as rigged, + // do another LoD update to use avatar bounding box + vobj->updateLOD(); + } } else { @@ -4910,11 +4929,19 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: facep->setTextureIndex(cur_tex); texture_list.push_back(tex); - //if (can_batch_texture(facep)) - { + if (can_batch_texture(facep)) + { //populate texture_list with any textures that can be batched + //move i to the next unbatchable face while (i != faces.end()) { facep = *i; + + if (!can_batch_texture(facep)) + { //face is bump mapped or has an animated texture matrix -- can't + //batch more than 1 texture at a time + break; + } + if (facep->getTexture() != tex) { if (distance_sort) @@ -4940,12 +4967,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: cur_tex++; } - if (!can_batch_texture(facep)) - { //face is bump mapped or has an animated texture matrix -- can't - //batch more than 1 texture at a time - break; - } - if (cur_tex >= texture_index_channels) { //cut batches when index channels are depleted break; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index a33f42cf84..7f17fd3e56 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -301,7 +301,7 @@ void LLVOWLSky::restoreGL() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } -static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLFastTimer::DeclareTimer FTM_GEO_SKY("Windlight Sky Geometry"); BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) { diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 78ee3e4fd9..09d17b3701 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -138,7 +138,6 @@ void LLWorld::destroyClass() LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host) { - LLMemType mt(LLMemType::MTYPE_REGIONS); llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl; LLViewerRegion *regionp = getRegionFromHandle(region_handle); if (regionp) @@ -644,7 +643,6 @@ void LLWorld::updateVisibilities() void LLWorld::updateRegions(F32 max_update_time) { - LLMemType mt_ur(LLMemType::MTYPE_IDLE_UPDATE_REGIONS); LLTimer update_timer; BOOL did_one = FALSE; @@ -1194,7 +1192,7 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi { LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter; - if (!pVOAvatar->isDead() && !pVOAvatar->isSelf()) + if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy) { LLVector3d pos_global = pVOAvatar->getPositionGlobal(); LLUUID uuid = pVOAvatar->getID(); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index a3ccf87cfc..ccc513b80d 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1320,7 +1320,7 @@ void LLWorldMapView::drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); - gGL.translatef((F32)x, (F32)y, 0.f); + gGL.translatef((F32)x * LLUI::sGLScaleFactor.mV[VX], (F32)y * LLUI::sGLScaleFactor.mV[VY], 0.f); gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color); gGL.popMatrix(); diff --git a/indra/newview/noise.h b/indra/newview/noise.h index 0923bffcf2..b3efad73c5 100644 --- a/indra/newview/noise.h +++ b/indra/newview/noise.h @@ -310,6 +310,8 @@ static void normalize3(F32 v[3]) static void init(void) { + // we want repeatable noise (e.g. for stable terrain texturing), so seed with known value + srand(42); int i, j, k; for (i = 0 ; i < B ; i++) { @@ -340,6 +342,9 @@ static void init(void) for (j = 0 ; j < 3 ; j++) g3[B + i][j] = g3[i][j]; } + + // reintroduce entropy + srand(time(NULL)); // Flawfinder: ignore } #undef B diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ab45bd3d3b..75f5e16452 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -35,7 +35,6 @@ #include "llviewercontrol.h" #include "llfasttimer.h" #include "llfontgl.h" -#include "llmemtype.h" #include "llnamevalue.h" #include "llpointer.h" #include "llprimitive.h" @@ -163,6 +162,7 @@ S32 LLPipeline::RenderGlowIterations; F32 LLPipeline::RenderGlowWidth; F32 LLPipeline::RenderGlowStrength; BOOL LLPipeline::RenderDepthOfField; +BOOL LLPipeline::RenderDepthOfFieldInEditMode; F32 LLPipeline::CameraFocusTransitionTime; F32 LLPipeline::CameraFNumber; F32 LLPipeline::CameraFocalLength; @@ -464,8 +464,6 @@ void LLPipeline::connectRefreshCachedSettingsSafe(const std::string name) void LLPipeline::init() { - LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT); - refreshCachedSettings(); gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity"); @@ -592,6 +590,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderGlowWidth"); connectRefreshCachedSettingsSafe("RenderGlowStrength"); connectRefreshCachedSettingsSafe("RenderDepthOfField"); + connectRefreshCachedSettingsSafe("RenderDepthOfFieldInEditMode"); connectRefreshCachedSettingsSafe("CameraFocusTransitionTime"); connectRefreshCachedSettingsSafe("CameraFNumber"); connectRefreshCachedSettingsSafe("CameraFocalLength"); @@ -764,7 +763,16 @@ void LLPipeline::resizeScreenTexture() GLuint resX = gViewerWindow->getWorldViewWidthRaw(); GLuint resY = gViewerWindow->getWorldViewHeightRaw(); - allocateScreenBuffer(resX,resY); + if (!allocateScreenBuffer(resX,resY)) + { //FAILSAFE: screen buffer allocation failed, disable deferred rendering if it's enabled + //NOTE: if the session closes successfully after this call, deferred rendering will be + // disabled on future sessions + if (LLPipeline::sRenderDeferred) + { + gSavedSettings.setBOOL("RenderDeferred", FALSE); + LLPipeline::refreshCachedSettings(); + } + } } } @@ -1066,6 +1074,7 @@ void LLPipeline::refreshCachedSettings() RenderGlowWidth = gSavedSettings.getF32("RenderGlowWidth"); RenderGlowStrength = gSavedSettings.getF32("RenderGlowStrength"); RenderDepthOfField = gSavedSettings.getBOOL("RenderDepthOfField"); + RenderDepthOfFieldInEditMode = gSavedSettings.getBOOL("RenderDepthOfFieldInEditMode"); CameraFocusTransitionTime = gSavedSettings.getF32("CameraFocusTransitionTime"); CameraFNumber = gSavedSettings.getF32("CameraFNumber"); CameraFocalLength = gSavedSettings.getF32("CameraFocalLength"); @@ -1167,7 +1176,6 @@ void LLPipeline::releaseScreenBuffers() void LLPipeline::createGLBuffers() { stop_glerror(); - LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS); assertInitialized(); updateRenderDeferred(); @@ -1304,7 +1312,6 @@ void LLPipeline::createLUTBuffers() void LLPipeline::restoreGL() { - LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL); assertInitialized(); if (mVertexShadersEnabled) @@ -1366,7 +1373,6 @@ BOOL LLPipeline::canUseAntiAliasing() const void LLPipeline::unloadShaders() { - LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS); LLViewerShaderMgr::instance()->unloadShaders(); mVertexShadersLoaded = 0; @@ -1398,7 +1404,6 @@ S32 LLPipeline::getMaxLightingDetail() const S32 LLPipeline::setLightingDetail(S32 level) { - LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL); refreshCachedSettings(); if (level < 0) @@ -1560,7 +1565,6 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0) LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); LLDrawPool *poolp = findPool(type, tex0); if (poolp) { @@ -1577,7 +1581,6 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0) // static LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); U32 type = getPoolTypeFromTE(te, imagep); return gPipeline.getPool(type, imagep); } @@ -1585,8 +1588,6 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* //static U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep) { - LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE); - if (!te || !imagep) { return 0; @@ -1615,7 +1616,6 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima void LLPipeline::addPool(LLDrawPool *new_poolp) { - LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL); assertInitialized(); mPools.insert(new_poolp); addToQuickLookup( new_poolp ); @@ -1623,7 +1623,6 @@ void LLPipeline::addPool(LLDrawPool *new_poolp) void LLPipeline::allocDrawable(LLViewerObject *vobj) { - LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE); LLDrawable *drawable = new LLDrawable(); vobj->mDrawable = drawable; @@ -1737,8 +1736,6 @@ void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) U32 LLPipeline::addObject(LLViewerObject *vobj) { - LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT); - if (RenderDelayCreation) { mCreateQ.push_back(vobj); @@ -1754,7 +1751,6 @@ U32 LLPipeline::addObject(LLViewerObject *vobj) void LLPipeline::createObjects(F32 max_dtime) { LLFastTimer ftm(FTM_PIPELINE_CREATE); - LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS); LLTimer update_timer; @@ -1940,7 +1936,6 @@ static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); void LLPipeline::updateMove() { LLFastTimer t(FTM_UPDATE_MOVE); - LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE); if (FreezeTime) { @@ -2294,7 +2289,6 @@ static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip, LLPlane* planep) { LLFastTimer t(FTM_CULL); - LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL); grabReferences(result); @@ -2676,7 +2670,6 @@ void LLPipeline::rebuildPriorityGroups() { LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS); LLTimer update_timer; - LLMemType mt(LLMemType::MTYPE_PIPELINE); assertInitialized(); gMeshRepo.notifyLoadedMeshes(); @@ -2748,7 +2741,6 @@ void LLPipeline::rebuildGroups() void LLPipeline::updateGeom(F32 max_dtime) { LLTimer update_timer; - LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM); LLPointer<LLDrawable> drawablep; LLFastTimer t(FTM_GEO_UPDATE); @@ -2842,8 +2834,6 @@ void LLPipeline::updateGeom(F32 max_dtime) void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE); - if(drawablep && !drawablep->isDead()) { if (drawablep->isSpatialBridge()) @@ -2883,8 +2873,6 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera) void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) { - LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED); - if (!drawablep) { //llerrs << "Sending null drawable to moved list!" << llendl; @@ -2929,8 +2917,6 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion) void LLPipeline::markShift(LLDrawable *drawablep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT); - if (!drawablep || drawablep->isDead()) { return; @@ -2956,8 +2942,6 @@ static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD"); void LLPipeline::shiftObjects(const LLVector3 &offset) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS); - assertInitialized(); glClear(GL_DEPTH_BUFFER_BIT); @@ -3011,8 +2995,6 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) void LLPipeline::markTextured(LLDrawable *drawablep) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED); - if (drawablep && !drawablep->isDead() && assertInitialized()) { mRetexturedList.insert(drawablep); @@ -3063,8 +3045,6 @@ void LLPipeline::markMeshDirty(LLSpatialGroup* group) void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) { - LLMemType mt(LLMemType::MTYPE_PIPELINE); - if (group && !group->isDead() && group->mSpatialPartition) { if (group->mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_HUD) @@ -3104,8 +3084,6 @@ void LLPipeline::markRebuild(LLSpatialGroup* group, BOOL priority) void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD); - if (drawablep && !drawablep->isDead() && assertInitialized()) { if (!drawablep->isState(LLDrawable::BUILT)) @@ -3152,7 +3130,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) } LLFastTimer ftm(FTM_STATESORT); - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); //LLVertexBuffer::unbind(); @@ -3253,7 +3230,6 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (group->changeLOD()) { for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) @@ -3272,7 +3248,6 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (bridge->getSpatialGroup()->changeLOD()) { bool force_update = false; @@ -3282,8 +3257,6 @@ void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera) void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); - if (!drawablep || drawablep->isDead() || !hasRenderType(drawablep->getRenderType())) @@ -3574,7 +3547,6 @@ void renderSoundHighlights(LLDrawable* drawablep) void LLPipeline::postSort(LLCamera& camera) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT); LLFastTimer ftm(FTM_STATESORT_POSTSORT); assertInitialized(); @@ -3826,7 +3798,6 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS); LLFastTimer t(FTM_RENDER_UI); gPipeline.disableLights(); @@ -3881,8 +3852,6 @@ void render_hud_elements() void LLPipeline::renderHighlights() { - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL); - assertInitialized(); // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD) @@ -4046,7 +4015,6 @@ U32 LLPipeline::sCurRenderPoolType = 0 ; void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM); LLFastTimer t(FTM_RENDER_GEOMETRY); assertInitialized(); @@ -4299,7 +4267,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) { LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred"); - LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED); LLFastTimer t(FTM_RENDER_GEOMETRY); LLFastTimer t2(FTM_DEFERRED_POOLS); @@ -4396,7 +4363,6 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera) void LLPipeline::renderGeomPostDeferred(LLCamera& camera) { - LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF); LLFastTimer t(FTM_POST_DEFERRED_POOLS); U32 cur_type = 0; @@ -4492,7 +4458,6 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) void LLPipeline::renderGeomShadow(LLCamera& camera) { - LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW); U32 cur_type = 0; LLGLEnable cull(GL_CULL_FACE); @@ -4646,8 +4611,6 @@ void LLPipeline::renderPhysicsDisplay() void LLPipeline::renderDebug() { - LLMemType mt(LLMemType::MTYPE_PIPELINE); - assertInitialized(); bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); @@ -5300,7 +5263,6 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools"); void LLPipeline::rebuildPools() { LLFastTimer t(FTM_REBUILD_POOLS); - LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS); assertInitialized(); @@ -5340,8 +5302,6 @@ void LLPipeline::rebuildPools() void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp ) { - LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP); - assertInitialized(); switch( new_poolp->getType() ) @@ -5507,7 +5467,6 @@ void LLPipeline::removePool( LLDrawPool* poolp ) void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp ) { assertInitialized(); - LLMemType mt(LLMemType::MTYPE_PIPELINE); switch( poolp->getType() ) { case LLDrawPool::POOL_SIMPLE: @@ -6166,7 +6125,7 @@ void LLPipeline::enableLightsPreview() LLVector4 light_pos(dir0, 0.0f); - LLLightState* light = gGL.getLight(0); + LLLightState* light = gGL.getLight(1); light->enable(); light->setPosition(light_pos); @@ -6178,7 +6137,7 @@ void LLPipeline::enableLightsPreview() light_pos = LLVector4(dir1, 0.f); - light = gGL.getLight(1); + light = gGL.getLight(2); light->enable(); light->setPosition(light_pos); light->setDiffuse(diffuse1); @@ -6188,7 +6147,7 @@ void LLPipeline::enableLightsPreview() light->setSpotCutoff(180.f); light_pos = LLVector4(dir2, 0.f); - light = gGL.getLight(2); + light = gGL.getLight(3); light->enable(); light->setPosition(light_pos); light->setDiffuse(diffuse2); @@ -6930,7 +6889,6 @@ void LLPipeline::doResetVertexBuffers() void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture) { - LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS); assertInitialized(); gGL.loadMatrix(gGLModelView); gGLLastMatrix = NULL; @@ -7003,7 +6961,6 @@ static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { - LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM); if (!(gPipeline.canUseVertexShaders() && sRenderGlow)) { @@ -7178,7 +7135,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater() && - !LLToolMgr::getInstance()->inBuildMode() && + (RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) && RenderDepthOfField; @@ -10063,7 +10020,6 @@ static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize"); void LLPipeline::generateImpostor(LLVOAvatar* avatar) { - LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR); LLGLState::checkStates(); LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 36abeca295..9e113289fc 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -857,6 +857,7 @@ public: static F32 RenderGlowWidth; static F32 RenderGlowStrength; static BOOL RenderDepthOfField; + static BOOL RenderDepthOfFieldInEditMode; static F32 CameraFocusTransitionTime; static F32 CameraFNumber; static F32 CameraFocalLength; diff --git a/indra/newview/skins/default/xui/en/floater_my_inventory.xml b/indra/newview/skins/default/xui/en/floater_my_inventory.xml index ea44fd493e..178987962b 100644 --- a/indra/newview/skins/default/xui/en/floater_my_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_my_inventory.xml @@ -6,7 +6,7 @@ height="570" help_topic="sidebar_inventory" min_width="333" - min_height="560" + min_height="570" name="floater_my_inventory" save_rect="true" save_visibility="true" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 5204efbf65..436e9f8fed 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2994,7 +2994,7 @@ even though the user gets a free copy. use_ellipses="true" read_only="true" name="media_info" - width="280" /> + width="180" /> <web_browser visible="false" enabled="false" diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml index 06d4327293..eb01294831 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -5,7 +5,7 @@ height="640" layout="topleft" min_height="230" - min_width="650" + min_width="750" name="gui_preview_tool" help_topic="gui_preview_tool" single_instance="true" diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index e91f5af3d5..29720a680b 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -3,7 +3,7 @@ layout="topleft" left="0" mouse_opaque="false" - can_tear_off="true" + can_tear_off="false" name="menu_inventory_add" visible="false"> <menu diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml index fc7272b904..3b8ace6308 100644 --- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml @@ -195,6 +195,20 @@ <menu_item_separator name="sepatator2" /> <menu_item_call + label="Expand all folders" + layout="topleft" + name="expand"> + <on_click + function="Gear.Expand" /> + </menu_item_call> + <menu_item_call + label="Collapse all folders" + layout="topleft" + name="collapse"> + <on_click + function="Gear.Collapse" /> + </menu_item_call> + <menu_item_call label="Rename Outfit" layout="topleft" name="rename"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 18932a32d0..caa36e7302 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -276,30 +276,39 @@ parameter="gestures" /> </menu_item_check> <menu_item_separator/> - <menu_item_call + <menu_item_check label="Friends" name="My Friends" shortcut="control|shift|F"> - <menu_item_call.on_click + <menu_item_check.on_check + function="SideTray.CheckPanelPeopleTab" + parameter="friends_panel" /> + <menu_item_check.on_click function="SideTray.PanelPeopleTab" parameter="friends_panel" /> - </menu_item_call> - <menu_item_call + </menu_item_check> + <menu_item_check label="Groups" name="My Groups" shortcut="control|shift|G"> - <menu_item_call.on_click + <menu_item_check.on_check + function="SideTray.CheckPanelPeopleTab" + parameter="groups_panel" /> + <menu_item_check.on_click function="SideTray.PanelPeopleTab" parameter="groups_panel" /> - </menu_item_call> - <menu_item_call + </menu_item_check> + <menu_item_check label="Nearby people" name="Active Speakers" shortcut="control|shift|A"> - <menu_item_call.on_click + <menu_item_check.on_check + function="SideTray.CheckPanelPeopleTab" + parameter="nearby_panel" /> + <menu_item_check.on_click function="SideTray.PanelPeopleTab" parameter="nearby_panel" /> - </menu_item_call> + </menu_item_check> <menu_item_call label="Block List" name="Block List"> @@ -876,14 +885,6 @@ function="Tools.EnableTakeCopy" /> </menu_item_call> <menu_item_call - label="Save Back to My Inventory" - name="Save Object Back to My Inventory"> - <menu_item_call.on_click - function="Tools.SaveToInventory" /> - <menu_item_call.on_enable - function="Tools.EnableSaveToInventory" /> - </menu_item_call> - <menu_item_call label="Save Back to Object Contents" name="Save Object Back to Object Contents"> <menu_item_call.on_click @@ -3185,6 +3186,40 @@ parameter="AllowSelectAvatar" /> </menu_item_check> </menu> + <menu + create_jump_keys="true" + label="Animation Speed" + name="Animation Speed" + tear_off="true"> + <menu_item_call + label="All Animations 10% Faster" + name="All Animations 10 Faster"> + <menu_item_call.on_click + function="Advanced.AnimTenFaster" /> + </menu_item_call> + <menu_item_call + label="All Animations 10% Slower" + name="All Animations 10 Slower"> + <menu_item_call.on_click + function="Advanced.AnimTenSlower" /> + </menu_item_call> + <menu_item_call + label="Reset All Animation Speed" + name="Reset All Animation Speed"> + <menu_item_call.on_click + function="Advanced.AnimResetAll" /> + </menu_item_call> + <menu_item_check + label="Slow Motion Animations" + name="Slow Motion Animations"> + <menu_item_check.on_check + function="CheckControl" + parameter="SlowMotionAnimation" /> + <menu_item_check.on_click + function="ToggleControl" + parameter="SlowMotionAnimation" /> + </menu_item_check> + </menu> <menu_item_call label="Force Params to Default" name="Force Params to Default"> @@ -3202,16 +3237,6 @@ parameter="" /> </menu_item_check> <menu_item_check - label="Slow Motion Animations" - name="Slow Motion Animations"> - <menu_item_check.on_check - function="CheckControl" - parameter="SlowMotionAnimation" /> - <menu_item_check.on_click - function="ToggleControl" - parameter="SlowMotionAnimation" /> - </menu_item_check> - <menu_item_check label="Show Look At" name="Show Look At"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 9dae77a304..c8f5cbb2b0 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -1293,6 +1293,45 @@ Visit [_URL] for more information? <notification icon="alertmodal.tga" + name="AMDOldDriver" + type="alertmodal"> + There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance. + + Visit [_URL] to check for driver updates? + <tag>confirm</tag> + <url option="0" name="url"> + http://support.amd.com/us/Pages/AMDSupportHub.aspx + </url> + <usetemplate + ignoretext="My graphics driver is out of date" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <tag>fail</tag> + </notification> + + <notification + icon="alertmodal.tga" + name="NVIDIAOldDriver" + type="alertmodal"> + There is likely a newer driver for your graphics chip. Updating graphics drivers can substantially improve performance. + + Visit [_URL] to check for driver updates? + <tag>confirm</tag> + <url option="0" name="url"> + http://www.nvidia.com/Download/index.aspx?lang=en-us + </url> + <usetemplate + ignoretext="My graphics driver is out of date" + name="okcancelignore" + notext="No" + yestext="Yes"/> + <tag>fail</tag> + </notification> + + + <notification + icon="alertmodal.tga" name="UnknownGPU" type="alertmodal"> Your system contains a graphics card that [APP_NAME] doesn't recognize. @@ -6744,7 +6783,7 @@ Is this OK? type="notify"> Warning: The object '<nolink>[OBJECTNAME]</nolink>' wants total access to your Linden Dollars account. If you allow access, it can remove funds from your account at any time, or empty your account completely, on an ongoing basis with no additional warnings. -It is rare that such a request is legitimate. Do not allow access if you do not fully understand why it wants access to your account. +Do not allow access if you do not fully understand why it wants access to your account. <tag>confirm</tag> <form name="form"> @@ -8252,4 +8291,1651 @@ Attempt cancelled. yestext="Yes"/> </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFrozen" + type="notify"> + <tag>fail</tag> +[AV_FREEZER] has frozen you. You cannot move or interact with the world. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFrozenDuration" + type="notify"> + <tag>fail</tag> +[AV_FREEZER] has frozen you for [AV_FREEZE_TIME] seconds. You cannot move or interact with the world. + </notification> + + <notification + icon="alertmodal.tga" + name="YouFrozeAvatar" + type="notify"> + <tag>fail</tag> +Avatar frozen. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarHasUnFrozenYou" + type="notify"> + <tag>fail</tag> +[AV_FREEZER] has unfrozen you. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarUnFrozen" + type="notify"> + <tag>fail</tag> +Avatar unfrozen. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFreezeFailure" + type="notify"> + <tag>fail</tag> +Freeze failed because you don't have admin permission for that parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarFreezeThaw" + type="notify"> + <tag>fail</tag> +Your freeze expired, go about your business. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarCantFreeze" + type="notify"> + <tag>fail</tag> +Sorry, can't freeze that user. + </notification> + + <notification + icon="alertmodal.tga" + name="NowOwnObject" + type="notify"> + <tag>fail</tag> +You are now the owner of object [OBJECT_NAME] + </notification> + + <notification + icon="alertmodal.tga" + name="CantRezOnLand" + type="notify"> + <tag>fail</tag> +Can't rez object at [OBJECT_POS] because the owner of this land does not allow it. Use the land tool to see land ownership. + </notification> + + <notification + icon="alertmodal.tga" + name="RezFailTooManyRequests" + type="notify"> + <tag>fail</tag> +Object can not be rezzed because there are too many requests. + </notification> + + <notification + icon="alertmodal.tga" + name="SitFailCantMove" + type="notify"> + <tag>fail</tag> +You cannot sit because you cannot move at this time. + </notification> + + <notification + icon="alertmodal.tga" + name="SitFailNotAllowedOnLand" + type="notify"> + <tag>fail</tag> +You cannot sit because you are not allowed on that land. + </notification> + + <notification + icon="alertmodal.tga" + name="SitFailNotSameRegion" + type="notify"> + <tag>fail</tag> +Try moving closer. Can't sit on object because +it is not in the same region as you. + </notification> + + <notification + icon="alertmodal.tga" + name="NoNewObjectRegionFull" + type="notify"> + <tag>fail</tag> +Unable to create new object. The region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="FailedToPlaceObject" + type="notify"> + <tag>fail</tag> +Failed to place object at specified location. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="NoOwnNoGardening" + type="notify"> + <tag>fail</tag> +You Can't create trees and grass on land you don't own. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCopyPermsNoObject" + type="notify"> + <tag>fail</tag> +Copy failed because you lack permission to copy the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoTransPermsNoObject" + type="notify"> + <tag>fail</tag> +Copy failed because the object '[OBJ_NAME]' cannot be transferred to you. + </notification> + + <notification + icon="alertmodal.tga" + name="AddToNavMeshNoCopy" + type="notify"> + <tag>fail</tag> +Copy failed because the object '[OBJ_NAME]' contributes to navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="DupeWithNoRootsSelected" + type="notify"> + <tag>fail</tag> +Duplicate with no root objects selected. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDupeCuzRegionIsFull" + type="notify"> + <tag>fail</tag> +Can't duplicate objects because the region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDupeCuzParcelNotFound" + type="notify"> + <tag>fail</tag> +Can't duplicate objects - Can't find the parcel they are on. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateCuzParcelFull" + type="notify"> + <tag>fail</tag> +Can't create object because +the parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="RezAttemptFailed" + type="notify"> + <tag>fail</tag> +Attempt to rez an object failed. + </notification> + + <notification + icon="alertmodal.tga" + name="ToxicInvRezAttemptFailed" + type="notify"> + <tag>fail</tag> +Unable to create item that has caused problems on this region. + </notification> + + <notification + icon="alertmodal.tga" + name="InvItemIsBlacklisted" + type="notify"> + <tag>fail</tag> +That inventory item has been blacklisted. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCanRezObjects" + type="notify"> + <tag>fail</tag> +You are not currently allowed to create objects. + </notification> + + <notification + icon="alertmodal.tga" + name="LandSearchBlocked" + type="notify"> + <tag>fail</tag> +Land Search Blocked. +You have performed too many land searches too quickly. +Please try again in a minute. + </notification> + + <notification + icon="alertmodal.tga" + name="NotEnoughResourcesToAttach" + type="notify"> + <tag>fail</tag> +Not enough script resources available to attach object! + </notification> + + <notification + icon="alertmodal.tga" + name="YouDiedAndGotTPHome" + type="notify"> + <tag>fail</tag> +You died and have been teleported to your home location + </notification> + + <notification + icon="alertmodal.tga" + name="EjectComingSoon" + type="notify"> + <tag>fail</tag> +You are no longer allowed here and have [EJECT_TIME] seconds to leave. + </notification> + + <notification + icon="alertmodal.tga" + name="NoEnterServerFull" + type="notify"> + <tag>fail</tag> +You can't enter this region because +the server is full. + </notification> + + <notification + icon="alertmodal.tga" + name="SaveBackToInvDisabled" + type="notify"> + <tag>fail</tag> +Save Back To Inventory has been disabled. + </notification> + + <notification + icon="alertmodal.tga" + name="NoExistNoSaveToContents" + type="notify"> + <tag>fail</tag> +Cannot save '[OBJ_NAME]' to object contents because the object it was rezzed from no longer exists. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNoSaveToContents" + type="notify"> + <tag>fail</tag> +Cannot save '[OBJ_NAME]' to object contents because you do not have permission to modify the object '[DEST_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSaveBackToInvDisabled" + type="notify"> + <tag>fail</tag> +Cannot save '[OBJ_NAME]' back to inventory -- this operation has been disabled. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCopyNoSelCopy" + type="notify"> + <tag>fail</tag> +You cannot copy your selection because you do not have permission to copy the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoTransNoSelCopy" + type="notify"> + <tag>fail</tag> +You cannot copy your selection because the object '[OBJ_NAME]' is not transferrable. + </notification> + + <notification + icon="alertmodal.tga" + name="NoTransNoCopy" + type="notify"> + <tag>fail</tag> +You cannot copy your selection because the object '[OBJ_NAME]' is not transferrable. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermsNoRemoval" + type="notify"> + <tag>fail</tag> +Removal of the object '[OBJ_NAME]' from the simulator is disallowed by the permissions system. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNoSaveSelection" + type="notify"> + <tag>fail</tag> +Cannot save your selection because you do not have permission to modify the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="NoCopyNoSaveSelection" + type="notify"> + <tag>fail</tag> +Cannot save your selection because the object '[OBJ_NAME]' is not copyable. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNoTaking" + type="notify"> + <tag>fail</tag> +You cannot take your selection because you do not have permission to modify the object '[OBJ_NAME]'. + </notification> + + <notification + icon="alertmodal.tga" + name="RezDestInternalError" + type="notify"> + <tag>fail</tag> +Internal Error: Unknown destination type. + </notification> + + <notification + icon="alertmodal.tga" + name="DeleteFailObjNotFound" + type="notify"> + <tag>fail</tag> +Delete failed because object not found + </notification> + + <notification + icon="alertmodal.tga" + name="SorryCantEjectUser" + type="notify"> + <tag>fail</tag> +Sorry, can't eject that user. + </notification> + + <notification + icon="alertmodal.tga" + name="RegionSezNotAHome" + type="notify"> + <tag>fail</tag> +This region does not allow you to set your home location here. + </notification> + + <notification + icon="alertmodal.tga" + name="HomeLocationLimits" + type="notify"> + <tag>fail</tag> +You can only set your 'Home Location' on your land or at a mainland Infohub. + </notification> + + <notification + icon="alertmodal.tga" + name="HomePositionSet" + type="notify"> + <tag>fail</tag> +Home position set. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarEjected" + type="notify"> + <tag>fail</tag> +Avatar ejected. + </notification> + + <notification + icon="alertmodal.tga" + name="AvatarEjectFailed" + type="notify"> + <tag>fail</tag> +Eject failed because you don't have admin permission for that parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectParcelFull" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because the parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectParcelPerms" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because your objects are not allowed on this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectParcelResources" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because there are not enough resources for this object on this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectRegionVersion" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because the other region is running an older version which does not support receiving this object via region crossing. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectNavMesh" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because you cannot modify the navmesh across region boundaries. + </notification> + + <notification + icon="alertmodal.tga" + name="CantMoveObjectWTF" + type="notify"> + <tag>fail</tag> +Can't move object '[OBJECT_NAME]' to +[OBJ_POSITION] in region [REGION_NAME] because of an unknown reason. ([FAILURE_TYPE]) + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermModifyObject" + type="notify"> + <tag>fail</tag> +You don't have permission to modify that object + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysObjContributesToNav" + type="notify"> + <tag>fail</tag> +Can't enable physics for an object that contributes to the navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysKeyframedObj" + type="notify"> + <tag>fail</tag> +Can't enable physics for keyframed objects. + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysNotEnoughLandResources" + type="notify"> + <tag>fail</tag> +Can't enable physics for object -- insufficient land resources. + </notification> + + <notification + icon="alertmodal.tga" + name="CantEnablePhysCostTooGreat" + persist="true" + type="notify"> + <tag>fail</tag> +Can't enable physics for object with physics resource cost greater than [MAX_OBJECTS] + </notification> + + <notification + icon="alertmodal.tga" + name="PhantomWithConcavePiece" + type="notify"> + <tag>fail</tag> +This object cannot have a concave piece because it is phantom and contributes to the navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableAddItem" + type="notify"> + <tag>fail</tag> +Unable to add item! + </notification> + + <notification + icon="alertmodal.tga" + name="UnableEditItem" + type="notify"> + <tag>fail</tag> +Unable to edit this! + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermToEdit" + type="notify"> + <tag>fail</tag> +Not permitted to edit this. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermToCopyInventory" + type="notify"> + <tag>fail</tag> +Not permitted to copy that inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSaveItemDoesntExist" + type="notify"> + <tag>fail</tag> +Cannot save to object contents: Item no longer exists. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSaveItemAlreadyExists" + type="notify"> + <tag>fail</tag> +Cannot save to object contents: Item with that name already exists in inventory + </notification> + + <notification + icon="alertmodal.tga" + name="CantSaveModifyAttachment" + type="notify"> + <tag>fail</tag> +Cannot save to object contents: This would modify the attachment permissions. + </notification> + + <notification + icon="alertmodal.tga" + name="TooManyScripts" + type="notify"> + <tag>fail</tag> +Too many scripts. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableAddScript" + type="notify"> + <tag>fail</tag> +Unable to add script! + </notification> + + <notification + icon="alertmodal.tga" + name="AssetServerTimeoutObjReturn" + type="notify"> + <tag>fail</tag> +Asset server didn't respond in a timely fashion. Object returned to sim. + </notification> + + <notification + icon="alertmodal.tga" + name="RegionDisablePhysicsShapes" + type="notify"> + <tag>fail</tag> +This region does not have physics shapes enabled. + </notification> + + <notification + icon="alertmodal.tga" + name="NoModNavmeshAcrossRegions" + type="notify"> + <tag>fail</tag> +You cannot modify the navmesh across region boundaries. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSetPhysicsPropertiesOnObjectType" + type="notify"> + <tag>fail</tag> +Cannot set physics properties on that object type. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSetRootPrimWithNoShape" + type="notify"> + <tag>fail</tag> +Cannot set root prim to have no shape. + </notification> + + <notification + icon="alertmodal.tga" + name="NoRegionSupportPhysMats" + type="notify"> + <tag>fail</tag> +This region does not have physics materials enabled. + </notification> + + <notification + icon="alertmodal.tga" + name="OnlyRootPrimPhysMats" + type="notify"> + <tag>fail</tag> +Only root prims may have their physics materials adjusted. + </notification> + + <notification + icon="alertmodal.tga" + name="NoSupportCharacterPhysMats" + type="notify"> + <tag>fail</tag> +Setting physics materials on characters is not yet supported. + </notification> + + <notification + icon="alertmodal.tga" + name="InvalidPhysMatProperty" + type="notify"> + <tag>fail</tag> +One or more of the specified physics material properties was invalid. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermsAlterStitchingMeshObj" + type="notify"> + <tag>fail</tag> +You may not alter the stitching type of a mesh object. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPermsAlterShapeMeshObj" + type="notify"> + <tag>fail</tag> +You may not alter the shape of a mesh object + </notification> + + <notification + icon="alertmodal.tga" + name="FullRegionCantEnter" + type="notify"> + <tag>fail</tag> +You can't enter this region because \nthe region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedOwnersDiffer" + type="notify"> + <tag>fail</tag> +Link failed -- owners differ + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedNoModNavmeshAcrossRegions" + type="notify"> + <tag>fail</tag> +Link failed -- cannot modify the navmesh across region boundaries. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedNoPermToEdit" + type="notify"> + <tag>fail</tag> +Link failed because you do not have edit permission. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedTooManyPrims" + type="notify"> + <tag>fail</tag> +Link failed -- too many primitives + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedCantLinkNoCopyNoTrans" + type="notify"> + <tag>fail</tag> +Link failed -- cannot link no-copy with no-transfer + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedNothingLinkable" + type="notify"> + <tag>fail</tag> +Link failed -- nothing linkable. + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedTooManyPathfindingChars" + type="notify"> + <tag>fail</tag> +Link failed -- too many pathfinding characters + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedInsufficientLand" + type="notify"> + <tag>fail</tag> +Link failed -- insufficient land resources + </notification> + + <notification + icon="alertmodal.tga" + name="LinkFailedTooMuchPhysics" + type="notify"> + <tag>fail</tag> +Object uses too many physics resources -- its dynamics have been disabled. + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedHomeByObjectOnParcel" + persist="true" + type="notify"> + <tag>fail</tag> +You have been teleported home by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]' + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedHomeByObject" + persist="true" + type="notify"> + <tag>fail</tag> +You have been teleported home by the object '[OBJECT_NAME]' + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByAttachment" + type="notify"> + <tag>fail</tag> +You have been teleported by an attachment on [ITEM_ID] + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByObjectOnParcel" + type="notify"> + <tag>fail</tag> +You have been teleported by the object '[OBJECT_NAME]' on the parcel '[PARCEL_NAME]' + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByObjectOwnedBy" + type="notify"> + <tag>fail</tag> +You have been teleported by the object '[OBJECT_NAME]' owned by [OWNER_ID] + </notification> + + <notification + icon="alertmodal.tga" + name="TeleportedByObjectUnknownUser" + type="notify"> + <tag>fail</tag> +You have been teleported by the object '[OBJECT_NAME]' owned by an unknown user. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObjectRegionFull" + type="notify"> + <tag>fail</tag> +Unable to create requested object. The region is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttackMultipleObjOneSpot" + type="notify"> + <tag>fail</tag> +You can't attach multiple objects to one spot. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateMultipleObjAtLoc" + type="notify"> + <tag>fail</tag> +You can't create multiple objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToCreateObjTimeOut" + type="notify"> + <tag>fail</tag> +Unable to create requested object. Object is missing from database. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToCreateObjUnknown" + type="notify"> + <tag>fail</tag> +Unable to create requested object. The request timed out. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToCreateObjMissingFromDB" + type="notify"> + <tag>fail</tag> +Unable to create requested object. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="RezFailureTookTooLong" + type="notify"> + <tag>fail</tag> +Rez failed, requested object took too long to load. + </notification> + + <notification + icon="alertmodal.tga" + name="FailedToPlaceObjAtLoc" + type="notify"> + <tag>fail</tag> +Failed to place object at specified location. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreatePlantsOnLand" + type="notify"> + <tag>fail</tag> +You cannot create plants on this land. + </notification> + + <notification + icon="alertmodal.tga" + name="CantRestoreObjectNoWorldPos" + type="notify"> + <tag>fail</tag> +Cannot restore object. No world position found. + </notification> + + <notification + icon="alertmodal.tga" + name="CantRezObjectInvalidMeshData" + type="notify"> + <tag>fail</tag> +Unable to rez object because its mesh data is invalid. + </notification> + + <notification + icon="alertmodal.tga" + name="CantRezObjectTooManyScripts" + type="notify"> + <tag>fail</tag> +Unable to rez object because there are already too many scripts in this region. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObjectNoAccess" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to create objects there. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObject" + type="notify"> + <tag>fail</tag> +You are not currently allowed to create objects. + </notification> + + <notification + icon="alertmodal.tga" + name="InvalidObjectParams" + type="notify"> + <tag>fail</tag> +Invalid object parameters + </notification> + + <notification + icon="alertmodal.tga" + name="CantDuplicateObjectNoAcess" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to duplicate objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="CantChangeShape" + type="notify"> + <tag>fail</tag> +You are not allowed to change this shape. + </notification> + + <notification + icon="alertmodal.tga" + name="NoAccessToClaimObjects" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to claim objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="DeedFailedNoPermToDeedForGroup" + type="notify"> + <tag>fail</tag> +Deed failed because you do not have permission to deed objects for your group. + </notification> + + <notification + icon="alertmodal.tga" + name="NoPrivsToBuyObject" + type="notify"> + <tag>fail</tag> +Your access privileges don't allow you to buy objects here. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachObjectAvatarSittingOnIt" + type="notify"> + <tag>fail</tag> +Cannot attach object because an avatar is sitting on it. + </notification> + + <notification + icon="alertmodal.tga" + name="WhyAreYouTryingToWearShrubbery" + type="notify"> + <tag>fail</tag> +Trees and grasses cannot be worn as attachments. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachGroupOwnedObjs" + type="notify"> + <tag>fail</tag> +Cannot attach group-owned objects. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachObjectsNotOwned" + type="notify"> + <tag>fail</tag> +Cannot attach objects that you don't own. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachNavmeshObjects" + type="notify"> + <tag>fail</tag> +Cannot attach objects that contribute to navmesh. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachObjectNoMovePermissions" + type="notify"> + <tag>fail</tag> +Cannot attach object because you do not have permission to move it. + </notification> + + <notification + icon="alertmodal.tga" + name="CantAttachNotEnoughScriptResources" + type="notify"> + <tag>fail</tag> +Not enough script resources available to attach object! + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropItemTrialUser" + type="notify"> + <tag>fail</tag> +You can't drop objects here; try the Free Trial area. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropMeshAttachment" + type="notify"> + <tag>fail</tag> +You can't drop mesh attachments. Detach to inventory and then rez in world. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropAttachmentNoPermission" + type="notify"> + <tag>fail</tag> +Failed to drop attachment: you don't have permission to drop there. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropAttachmentInsufficientLandResources" + type="notify"> + <tag>fail</tag> +Failed to drop attachment: insufficient available land resource. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropAttachmentInsufficientResources" + type="notify"> + <tag>fail</tag> +Failed to drop attachments: insufficient available resources. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDropObjectFullParcel" + type="notify"> + <tag>fail</tag> +Cannot drop object here. Parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="CantTouchObjectBannedFromParcel" + type="notify"> + <tag>fail</tag> +Can't touch/grab this object because you are banned from the land parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="PlzNarrowDeleteParams" + type="notify"> + <tag>fail</tag> +Please narrow your delete parameters. + </notification> + + <notification + icon="alertmodal.tga" + name="UnableToUploadAsset" + type="notify"> + <tag>fail</tag> +Unable to upload asset. + </notification> + + <notification + icon="alertmodal.tga" + name="CantTeleportCouldNotFindUser" + type="notify"> + <tag>fail</tag> +Could not find user to teleport home + </notification> + + <notification + icon="alertmodal.tga" + name="GodlikeRequestFailed" + type="notify"> + <tag>fail</tag> +godlike request failed + </notification> + + <notification + icon="alertmodal.tga" + name="GenericRequestFailed" + type="notify"> + <tag>fail</tag> +generic request failed + </notification> + + <notification + icon="alertmodal.tga" + name="CantUploadPostcard" + type="notify"> + <tag>fail</tag> +Unable to upload postcard. Try again later. + </notification> + + <notification + icon="alertmodal.tga" + name="CantFetchInventoryForGroupNotice" + type="notify"> + <tag>fail</tag> +Unable to fetch inventory details for the group notice. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSendGroupNoticeNotPermitted" + type="notify"> + <tag>fail</tag> +Unable to send group notice -- not permitted. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSendGroupNoticeCantConstructInventory" + type="notify"> + <tag>fail</tag> +Unable to send group notice -- could not construct inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantParceInventoryInNotice" + type="notify"> + <tag>fail</tag> +Unable to parse inventory in notice. + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainUploadFailed" + type="notify"> + <tag>fail</tag> +Terrain upload failed. + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainFileWritten" + type="notify"> + <tag>fail</tag> +Terrain file written. + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainFileWrittenStartingDownload" + type="notify"> + <tag>fail</tag> +Terrain file written, starting download... + </notification> + + <notification + icon="alertmodal.tga" + name="TerrainBaked" + type="notify"> + <tag>fail</tag> +Terrain baked. + </notification> + + <notification + icon="alertmodal.tga" + name="TenObjectsDisabledPlzRefresh" + type="notify"> + <tag>fail</tag> +Only the first 10 selected objects have been disabled. Refresh and make additional selections if required. + </notification> + + <notification + icon="alertmodal.tga" + name="UpdateViewerBuyParcel" + type="notify"> + <tag>fail</tag> +You need to update your viewer to buy this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="LandBuyAccessBlocked" + type="notify"> + <tag>fail</tag> +You can't buy this land due to your maturity Rating. You may need to validate your age and/or install the latest Viewer. Please go to the Knowledge Base for details on accessing areas with this maturity Rating. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyParcelNotForSale" + type="notify"> + <tag>fail</tag> +Unable to buy, this parcel is not for sale. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuySalePriceOrLandAreaChanged" + type="notify"> + <tag>fail</tag> +Unable to buy, the sale price or land area has changed. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyParcelNotAuthorized" + type="notify"> + <tag>fail</tag> +You are not the authorized buyer for this parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyParcelAwaitingPurchaseAuth" + type="notify"> + <tag>fail</tag> +You cannot purchase this parcel because it is already awaiting purchase aut + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuildOverflowParcel" + type="notify"> + <tag>fail</tag> +You cannot build objects here because doing so would overflow the parcel. + </notification> + + <notification + icon="alertmodal.tga" + name="SelectedMultipleOwnedLand" + type="notify"> + <tag>fail</tag> +You selected land with different owners. Please select a smaller area and try again. + </notification> + + <notification + icon="alertmodal.tga" + name="CantJoinTooFewLeasedParcels" + type="notify"> + <tag>fail</tag> +Not enough leased parcels in selection to join. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDivideLandMultipleParcelsSelected" + type="notify"> + <tag>fail</tag> +Can't divide land.\nThere is more than one parcel selected.\nTry selecting a smaller piece of land. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDivideLandCantFindParcel" + type="notify"> + <tag>fail</tag> +Can't divide land.\nCan't find the parcel.\nPlease report with Help -> Reprt Bug... + </notification> + + <notification + icon="alertmodal.tga" + name="CantDivideLandWholeParcelSelected" + type="notify"> + <tag>fail</tag> +Can't divide land. Whole parcel is selected.\nTry selecting a smaller piece of land. + </notification> + + <notification + icon="alertmodal.tga" + name="LandHasBeenDivided" + type="notify"> + <tag>fail</tag> +Land has been divided. + </notification> + + <notification + icon="alertmodal.tga" + name="PassPurchased" + type="notify"> + <tag>fail</tag> +You purchased a pass. + </notification> + + <notification + icon="alertmodal.tga" + name="RegionDisallowsClassifieds" + type="notify"> + <tag>fail</tag> +Region does not allow classified advertisements. + </notification> + + <notification + icon="alertmodal.tga" + name="LandPassExpireSoon" + type="notify"> + <tag>fail</tag> +Your pass to this land is about to expire. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSitNoSuitableSurface" + type="notify"> + <tag>fail</tag> +There is no suitable surface to sit on, try another spot. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSitNoRoom" + type="notify"> + <tag>fail</tag> +No room to sit here, try another spot. + </notification> + + <notification + icon="alertmodal.tga" + name="AutopilotCanceled" + type="notify"> + <tag>fail</tag> +Autopilot canceled + </notification> + + <notification + icon="alertmodal.tga" + name="ClaimObjectFailedNoPermission" + type="notify"> + <tag>fail</tag> +Claim object failed because you don't have permission + </notification> + + <notification + icon="alertmodal.tga" + name="ClaimObjectFailedNoMoney" + type="notify"> + <tag>fail</tag> +Claim object failed because you don't have enough L$. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDeedGroupLand" + type="notify"> + <tag>fail</tag> +Cannot deed group-owned land. + </notification> + + <notification + icon="alertmodal.tga" + name="BuyObjectFailedNoMoney" + type="notify"> + <tag>fail</tag> +Buy object failed because you don't have enough L$. + </notification> + + <notification + icon="alertmodal.tga" + name="BuyInventoryFailedNoMoney" + type="notify"> + <tag>fail</tag> +Buy inventory failed because you do not have enough L$ + </notification> + + <notification + icon="alertmodal.tga" + name="BuyPassFailedNoMoney" + type="notify"> + <tag>fail</tag> +You don't have enough L$ to buy a pass to this land. + </notification> + + <notification + icon="alertmodal.tga" + name="CantBuyPassTryAgain" + type="notify"> + <tag>fail</tag> +Unable to buy pass right now. Try again later. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateObjectParcelFull" + type="notify"> + <tag>fail</tag> +Can't create object because \nthe parcel is full. + </notification> + + <notification + icon="alertmodal.tga" + name="FailedPlacingObject" + type="notify"> + <tag>fail</tag> +Failed to place object at specified location. Please try again. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateLandmarkForEvent" + type="notify"> + <tag>fail</tag> +Unable to create landmark for event. + </notification> + + <notification + icon="alertmodal.tga" + name="GodBeatsFreeze" + type="notify"> + <tag>fail</tag> +Your godlike powers break the freeze! + </notification> + + <notification + icon="alertmodal.tga" + name="SpecialPowersRequestFailedLogged" + type="notify"> + <tag>fail</tag> +Request for special powers failed. This request has been logged. + </notification> + + <notification + icon="alertmodal.tga" + name="ExpireExplanation" + type="notify"> + <tag>fail</tag> +The system is currently unable to process your request. The request timed out. + </notification> + + <notification + icon="alertmodal.tga" + name="DieExplanation" + type="notify"> + <tag>fail</tag> +The system is unable to process your request. + </notification> + + <notification + icon="alertmodal.tga" + name="AddPrimitiveFailure" + type="notify"> + <tag>fail</tag> +Insufficient funds to create primitve. + </notification> + + <notification + icon="alertmodal.tga" + name="RezObjectFailure" + type="notify"> + <tag>fail</tag> +Insufficient funds to create object. + </notification> + + <notification + icon="alertmodal.tga" + name="ResetHomePositionNotLegal" + type="notify"> + <tag>fail</tag> +Reset Home position since Home wasn't legal. + </notification> + + <notification + icon="alertmodal.tga" + name="CantInviteRegionFull" + type="notify"> + <tag>fail</tag> +You cannot currently invite anyone to your location because the region is full. Try again later. + </notification> + + <notification + icon="alertmodal.tga" + name="CantSetHomeAtRegion" + type="notify"> + <tag>fail</tag> +This region does not allow you to set your home location here. + </notification> + + <notification + icon="alertmodal.tga" + name="ListValidHomeLocations" + type="notify"> + <tag>fail</tag> +You can only set your 'Home Location' on your land or at a mainland Infohub. + </notification> + + <notification + icon="alertmodal.tga" + name="SetHomePosition" + type="notify"> + <tag>fail</tag> +Home position set. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDerezInventoryError" + type="notify"> + <tag>fail</tag> +Cannot derez object due to inventory fault. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateRequestedInv" + type="notify"> + <tag>fail</tag> +Cannot create requested inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateRequestedInvFolder" + type="notify"> + <tag>fail</tag> +Cannot create requested inventory folder. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateInventory" + type="notify"> + <tag>fail</tag> +Cannot create that inventory. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateLandmark" + type="notify"> + <tag>fail</tag> +Cannot create landmark. + </notification> + + <notification + icon="alertmodal.tga" + name="CantCreateOutfit" + type="notify"> + <tag>fail</tag> +Cannot create outfit right now. Try again in a minute. + </notification> + + <notification + icon="alertmodal.tga" + name="InventoryNotForSale" + type="notify"> + <tag>fail</tag> +Inventory is not for sale. + </notification> + + <notification + icon="alertmodal.tga" + name="CantFindInvItem" + type="notify"> + <tag>fail</tag> +Unable to find inventory item. + </notification> + + <notification + icon="alertmodal.tga" + name="CantFindObject" + type="notify"> + <tag>fail</tag> +Unable to find object. + </notification> + + <notification + icon="alertmodal.tga" + name="CantTransfterMoneyRegionDisabled" + type="notify"> + <tag>fail</tag> +Money transfers to objects are currently disabled in this region. + </notification> + + <notification + icon="alertmodal.tga" + name="CantPayNoAgent" + type="notify"> + <tag>fail</tag> +Could not figure out who to pay. + </notification> + + <notification + icon="alertmodal.tga" + name="CantDonateToPublicObjects" + type="notify"> + <tag>fail</tag> +You cannot give L$ to public objects. + </notification> + + <notification + icon="alertmodal.tga" + name="InventoryCreationInWorldObjectFailed" + type="notify"> + <tag>fail</tag> +Inventory creation on in-world object failed. + </notification> + + <notification + icon="alertmodal.tga" + name="UserBalanceOrLandUsageError" + type="notify"> + <tag>fail</tag> +An internal error prevented us from properly updating your viewer. The L$ balance or parcel holdings displayed in your viewer may not reflect your actual balance on the servers. + </notification> + + <notification + icon="alertmodal.tga" + name="LargePrimAgentIntersect" + type="notify"> + <tag>fail</tag> +Cannot create large prims that intersect other players. Please re-try when other players have moved. + </notification> + </notifications> diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index eea2606125..df91ad8b5e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -254,7 +254,7 @@ things in this group. There's a broad variety of Abilities. column_padding="0" draw_stripes="true" height="200" - follows="left|top" + follows="left|top|right" layout="topleft" left="0" right="-1" diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index cdf14572fe..e844a15118 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -30,7 +30,7 @@ (This page does not pass the specified whitelist) </text> <line_editor - max_length="1024" + max_length_bytes="1024" bottom_delta="-24" enabled="true" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 849f3ef73d..01083a9d5d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -47,7 +47,7 @@ Better </text> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" @@ -56,16 +56,15 @@ top_delta="-2" width="2" /> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" left_pad="41" - name="LowMidraphicsDivet" - top_delta="-2" + name="LowMidGraphicsDivet" width="2" /> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" @@ -74,7 +73,7 @@ top_delta="0" width="2" /> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" @@ -83,7 +82,7 @@ top_delta="0" width="2" /> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" @@ -92,7 +91,7 @@ top_delta="0" width="2" /> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" @@ -101,7 +100,7 @@ top_delta="0" width="2" /> <icon - color="0.12 0.12 0.12 1" + color="DkGray" height="14" image_name="Rounded_Square" layout="topleft" @@ -147,24 +146,11 @@ height="12" layout="topleft" left_delta="87" - name="ShadersPrefText3" + name="ShadersPrefText2" top_delta="0" width="80"> Mid </text> - <text - type="string" - length="1" - follows="left|top" - halign="center" - height="12" - layout="topleft" - left_delta="87" - name="ShadersPrefText3" - top_delta="0" - width="80"> - High - </text> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index f6a8af0973..765b07ed8b 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -158,6 +158,7 @@ text_readonly_color="DkGray" width="487" show_line_numbers="true" + enable_tooltip_paste="true" word_wrap="true"> Loading... </text_editor> diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index 89aef57cca..0eeccbeac5 100644 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -70,8 +70,8 @@ longdescription="Toggle 'Show Place in Search' and setting a parcel's category in About Land > Options tab." name="land find places" value="17" /> <action - description="Change parcel name, description, and 'Show Place in Search' settings" - longdescription="Change parcel name, description, and 'Show Place in Search' settings. This is done in About Land > Options tab." + description="Change parcel name, description, and 'Moderate Content' settings" + longdescription="Change parcel name, description, and 'Moderate Content' settings. This is done in About Land > Options tab." name="land change identity" value="18" /> <action description="Set landing point and set teleport routing" longdescription="On a group-owned parcel, Members in a Role with this Ability can set a landing point to specify where incoming teleports arrive, and also set teleport routing for further control. This is done in About Land > Options tab." diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index e69a17e037..6ee8fc3a4c 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -292,6 +292,10 @@ label="Open" name="Open" value="Open" /> + <combo_box.item + label="Zoom" + name="Zoom" + value="Zoom" /> </combo_box> <panel border="false" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 2157a05bbf..0f4424a7f9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1447,7 +1447,7 @@ integer llScriptDanger(vector pos) Returns TRUE if pos is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts </string> <string name="LSLTipText_llDialog" translate="false"> -llDialog(key avatar, string message, list buttons, integer chat_channel +llDialog(key avatar, string message, list buttons, integer chat_channel) Shows a dialog box on the avatar's screen with a message and up to 12 buttons. If a button is pressed, the avatar says the text of the button label on chat_channel. </string> @@ -2508,6 +2508,8 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale <string name="ATTACH_HUD_BOTTOM_LEFT">HUD Bottom Left</string> <string name="ATTACH_HUD_BOTTOM">HUD Bottom</string> <string name="ATTACH_HUD_BOTTOM_RIGHT">HUD Bottom Right</string> + <string name="ATTACH_NECK">Neck</string> + <string name="ATTACH_AVATAR_CENTER">Avatar Center</string> <!-- script editor --> <string name="CursorPos">Line [LINE], Column [COLUMN]</string> @@ -3330,7 +3332,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlAdultIconTooltip">Adult Region</string> <string name="LocationCtrlModerateIconTooltip">Moderate Region</string> <string name="LocationCtrlGeneralIconTooltip">General Region</string> - <string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string> + <string name="LocationCtrlSeeAVsTooltip">Avatars inside this parcel cannot be seen or heard by avatars outside this parcel</string> <string name="LocationCtrlPathfindingDirtyTooltip">Objects that move may not behave correctly in this region until the region is rebaked.</string> <string name="LocationCtrlPathfindingDisabledTooltip">Dynamic pathfinding is not enabled on this region.</string> <!-- Strings used by the (currently Linux) auto-updater app --> diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml index 3f17324006..7e17ed6864 100644 --- a/indra/newview/skins/default/xui/zh/strings.xml +++ b/indra/newview/skins/default/xui/zh/strings.xml @@ -1982,7 +1982,7 @@ http://secondlife.com/viewer-access-faq 新腳本 </string> <string name="BusyModeResponseDefault"> - 你傳訊過去的居民目前處於忙碌狀態,這意味著他要求不被打擾。 你的訊息仍將留存並顯示於對���的 IM 面板上供稍後查閱。 + 你傳訊過去的居民目前處於忙碌狀態,這意味著他要求不被打擾。 你的訊息仍將留存並顯示於對方的 IM 面板上供稍後查閱。 </string> <string name="MuteByName"> (按名稱) diff --git a/indra/newview/tests/lldir_stub.cpp b/indra/newview/tests/lldir_stub.cpp index 3c0a4377d8..2bc6772d86 100644 --- a/indra/newview/tests/lldir_stub.cpp +++ b/indra/newview/tests/lldir_stub.cpp @@ -48,7 +48,7 @@ public: /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask) { return 42; } /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) { fname = fname + "_NEXT"; return false; } /*virtual*/ void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) { fname = "RANDOM_FILE"; } - /*virtual*/ BOOL fileExists(const std::string &filename) const { return false; } + /*virtual*/ bool fileExists(const std::string &filename) const { return false; } }; LLDir_stub gDirUtil; diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index ea75d4f4f6..e7108141ee 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -968,7 +968,6 @@ class LinuxManifest(ViewerManifest): if self.prefix(src="", dst="bin"): self.path("secondlife-bin","do-not-directly-run-secondlife-bin") self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin") - self.path("../linux_updater/linux-updater", "linux-updater.bin") self.path2basename("../llplugin/slplugin", "SLPlugin") self.path2basename("../viewer_components/updater/scripts/linux", "update_install") self.end_prefix("bin") @@ -1017,9 +1016,7 @@ class LinuxManifest(ViewerManifest): else: installer_name += '_' + self.channel_oneword().upper() - if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): - print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + self.strip_binaries() # Fix access permissions self.run_command(""" @@ -1054,6 +1051,11 @@ class LinuxManifest(ViewerManifest): 'dst': self.get_dst_prefix(), 'inst': self.build_path_of(installer_name)}) + def strip_binaries(self): + if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): + print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" + self.run_command(r"find %(d)r/bin %(d)r/lib -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + class Linux_i686Manifest(LinuxManifest): def construct(self): super(Linux_i686Manifest, self).construct() @@ -1139,9 +1141,7 @@ class Linux_i686Manifest(LinuxManifest): self.path("libvivoxplatform.so") self.end_prefix("lib") - if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer(): - print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build" - self.run_command("find %(d)r/bin %(d)r/lib -type f \\! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} ) # makes some small assumptions about our packaged dir structure + self.strip_binaries() class Linux_x86_64Manifest(LinuxManifest): diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp index dc1a5cdd3d..a25fdebb7f 100644 --- a/indra/test/llbuffer_tut.cpp +++ b/indra/test/llbuffer_tut.cpp @@ -31,7 +31,6 @@ #include "lltut.h" #include "llbuffer.h" #include "llerror.h" -#include "llmemtype.h" namespace tut diff --git a/indra/test/lluuidhashmap_tut.cpp b/indra/test/lluuidhashmap_tut.cpp index 408bc3faf1..9712a613f4 100644 --- a/indra/test/lluuidhashmap_tut.cpp +++ b/indra/test/lluuidhashmap_tut.cpp @@ -117,9 +117,10 @@ namespace tut std::string savefile(gDirUtilp->add(tempdir, "lluuidhashmap_tut.save.txt")); const int numElementsToCheck = 32*256*32; std::vector<LLUUID> idList; - if (gDirUtilp->fileExists(savefile)) + if ((! getenv("TEAMCITY_PROJECT_NAME")) && gDirUtilp->fileExists(savefile)) { - // We have saved data from a previous failed run. Reload that data. + // This is not a TeamCity build, and we have saved data from a + // previous failed run. Reload that data. std::ifstream inf(savefile.c_str()); if (! inf.is_open()) { @@ -139,8 +140,8 @@ namespace tut } else { - // savefile does not exist (normal case): regenerate idList from - // scratch. + // This is a TeamCity build, or (normal case) savefile does not + // exist: regenerate idList from scratch. for (int i = 0; i < numElementsToCheck; ++i) { LLUUID id; diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install index e0505a9f72..a9df9042fd 100644 --- a/indra/viewer_components/updater/scripts/linux/update_install +++ b/indra/viewer_components/updater/scripts/linux/update_install @@ -1,10 +1,217 @@ #! /bin/bash -INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd) -export LD_LIBRARY_PATH="$INSTALL_DIR/lib" -bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml" -if [ $? -ne 0 ] - then echo $3 >> "$2" +# @file update_install +# @author Nat Goodspeed +# @date 2013-01-09 +# @brief Update the containing Second Life application bundle to the version in +# the specified tarball. +# +# This bash implementation is derived from the previous linux-updater.bin +# application. +# +# $LicenseInfo:firstyear=2013&license=viewerlgpl$ +# Copyright (c) 2013, Linden Research, Inc. +# $/LicenseInfo$ + +# **************************************************************************** +# script parameters +# **************************************************************************** +tarball="$1" # the file to install +markerfile="$2" # create this file on failure +mandatory="$3" # what to write to markerfile on failure + +# **************************************************************************** +# helper functions +# **************************************************************************** +# empty array +cleanups=() + +# add a cleanup action to execute on exit +function cleanup { + # wacky bash syntax for appending to array + cleanups[${#cleanups[*]}]="$*" +} + +# called implicitly on exit +function onexit { + for action in "${cleanups[@]}" + do # don't quote, support actions consisting of multiple words + $action + done +} +trap 'onexit' EXIT + +# write to log file +function log { + # our log file will be open as stderr -- but until we set up that + # redirection, logging to stderr is better than nothing + echo "$*" 1>&2 +} + +# We display status by leaving one background xmessage process running. This +# is the pid of that process. +statuspid="" + +function clear_message { + [ -n "$statuspid" ] && kill $statuspid + statuspid="" +} + +# make sure we remove any message box we might have put up +cleanup clear_message + +# can we use zenity, or must we fall back to xmessage? +zenpath="$(which zenity)" +if [ -n "$zenpath" ] +then # zenity on PATH and is executable + # display a message box and continue + function status { + # clear any previous message + clear_message + # put up a new zenity box and capture its pid + "$zenpath" --info --title "Second Life Viewer Updater" \ + --width=320 --height=120 --text="$*" & + statuspid=$! + } + + # display an error box and wait for user + function errorbox { + "$zenpath" --error --title "Second Life Viewer Updater" \ + --width=320 --height=120 --text="$*" + } + +else # no zenity, use xmessage instead + # display a message box and continue + function status { + # clear any previous message + clear_message + # put up a new xmessage and capture its pid + xmessage -buttons OK:2 -center "$*" & + statuspid=$! + } + + # display an error box and wait for user + function errorbox { + xmessage -buttons OK:2 -center "$*" + } +fi + +# display an error box and terminate +function fail { + # Log the message + log "$@" + # tell subsequent viewer things went south + echo "$mandatory" > "$markerfile" + # add boilerplate + errorbox "An error occurred while updating Second Life: +$* +Please download the latest viewer from www.secondlife.com." + exit 1 +} + +# Find a graphical sudo program and define mysudo function. On error, $? is +# nonzero; output is in $err instead of being written to stdout/stderr. +gksudo="$(which gksudo)" +kdesu="$(which kdesu)" +if [ -n "$gksudo" ] +then function mysudo { + # gksudo allows you to specify description + err="$("$gksudo" --description "Second Life Viewer Updater" "$@" 2>&1)" + } +elif [ -n "$kdesu" ] +then function mysudo { + err="$("$kdesu" "$@" 2>&1)" + } +else # couldn't find either one, just try it anyway + function mysudo { + err="$("$@" 2>&1)" + } fi -rm -f "$1" +# Move directories, using mysudo if we think it necessary. On error, $? is +# nonzero; output is in $err instead of being written to stdout/stderr. +function sudo_mv { + # If we have write permission to both parent directories, shouldn't need + # sudo. + if [ -w "$(dirname "$1")" -a -w "$(dirname "$2")" ] + then err="$(mv "$@" 2>&1)" + else # use available sudo program; mysudo sets $? and $err + mysudo mv "$@" + fi +} + +# **************************************************************************** +# main script logic +# **************************************************************************** +mydir="$(dirname "$0")" +# We happen to know that the viewer specifies a marker-file pathname within +# the logs directory. +logsdir="$(dirname "$markerfile")" +logname="$logsdir/updater.log" + +# move aside old updater.log; we're about to create a new one +[ -f "$logname" ] && mv "$logname" "$logname.old" + +# Set up redirections for this script such that stderr is logged. (But first +# move the previous stderr to file descriptor 3.) +exec 3>&2- 2> "$logname" + +# Rather than setting up a special pipeline to timestamp every line of stderr, +# produce header lines into log file indicating timestamp and the arguments +# with which we were invoked. +date 1>&2 +log "$0 $*" + +# Log every command we execute, along with any stderr it might produce +set -x + +status 'Installing Second Life...' + +# Creating tempdir under /tmp means it's possible that tempdir is on a +# different filesystem than INSTALL_DIR. One is tempted to create tempdir on a +# path derived from `dirname INSTALL_DIR` -- but it seems modern 'mv' can +# handle moving across filesystems?? +tempdir="$(mktemp -d)" +tempinstall="$tempdir/install" +# capture the actual error message, if any +err="$(mkdir -p "$tempinstall" 2>&1)" || fail "$err" +cleanup rm -rf "$tempdir" + +# If we already knew the name of the tarball's top-level directory, we could +# just move that when all was said and done. Since we don't, untarring to the +# 'install' subdir with --strip 1 effectively renames that top-level +# directory. +# untar failures tend to be voluminous -- don't even try to capture, just log +tar --strip 1 -xjf "$tarball" -C "$tempinstall" || fail "Untar command failed" + +INSTALL_DIR="$(cd "$mydir/.." ; pwd)" + +# Considering we're launched from a subdirectory of INSTALL_DIR, would be +# surprising if it did NOT already exist... +if [ -e "$INSTALL_DIR" ] +then backup="$INSTALL_DIR.backup" + backupn=1 + while [ -e "$backup" ] + do backup="$INSTALL_DIR.backup.$backupn" + ((backupn += 1)) + done + # on error, fail with actual error message from sudo_mv: permissions, + # cross-filesystem mv, ...? + sudo_mv "$INSTALL_DIR" "$backup" || fail "$err" +fi +# We unpacked the tarball into tempinstall. Move that. +if ! sudo_mv "$tempinstall" "$INSTALL_DIR" +then # If we failed to move the temp install to INSTALL_DIR, try to restore + # INSTALL_DIR from backup. Save $err because next sudo_mv will trash it! + realerr="$err" + sudo_mv "$backup" "$INSTALL_DIR" + fail "$realerr" +fi + +# Removing the tarball here, rather than with a 'cleanup' action, means we +# only remove it if we succeeded. +rm -f "$tarball" + +# Launch the updated viewer. Restore original stderr from file descriptor 3, +# though -- otherwise updater.log gets cluttered with the viewer log! +"$INSTALL_DIR/secondlife" 2>&3- & diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index db52e6c55f..a49bc4161e 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -63,7 +63,7 @@ class LLDir_Mock : public LLDir const std::string &mask, std::string &fname) {} std::string getCurPath() { return ""; } - BOOL fileExists(const std::string &filename) const { return false; } + bool fileExists(const std::string &filename) const { return false; } std::string getLLPluginLauncher() { return ""; } std::string getLLPluginFilename(std::string base_name) { return ""; } |