diff options
Diffstat (limited to 'indra')
240 files changed, 3008 insertions, 2509 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index 310e6cbdd4..d1042d6e86 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -35,8 +35,10 @@ endif (NOT CMAKE_BUILD_TYPE) # For the library installation process; # see cmake/Prebuild.cmake for the counterpart code. -file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/temp) -file(WRITE ${CMAKE_BINARY_DIR}/temp/sentinel_installed "0") +if ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${CMAKE_BINARY_DIR}/temp/sentinel_installed") + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/temp) + file(WRITE ${CMAKE_BINARY_DIR}/temp/sentinel_installed "0") +endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${CMAKE_BINARY_DIR}/temp/sentinel_installed") add_subdirectory(cmake) add_subdirectory(${LIBS_OPEN_PREFIX}llaudio) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 6d5860657d..2c974fb4ff 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -36,6 +36,13 @@ if (WINDOWS) # Don't build DLLs. set(BUILD_SHARED_LIBS OFF) + # for "backwards compatibility", cmake sneaks in the Zm1000 option which royally + # screws incredibuild. this hack disables it. + # for details see: http://connect.microsoft.com/VisualStudio/feedback/details/368107/clxx-fatal-error-c1027-inconsistent-values-for-ym-between-creation-and-use-of-precompiled-headers + # http://www.ogre3d.org/forums/viewtopic.php?f=2&t=60015 + # http://www.cmake.org/pipermail/cmake/2009-September/032143.html + string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1" CACHE STRING "C++ compiler debug options" FORCE) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 881d4caa78..d9efc8f40d 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -131,7 +131,8 @@ elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 PATHS ${MSVC_DEBUG_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT - NO_DEFAULT_PATH + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) @@ -155,7 +156,8 @@ elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 PATHS ${MSVC_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT - NO_DEFAULT_PATH + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 3f259f6382..08feab6e36 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -95,7 +95,7 @@ INCLUDE(GoogleMock) IF(${name}_test_additional_INCLUDE_DIRS MATCHES NOTFOUND) SET(${name}_test_additional_INCLUDE_DIRS "") ENDIF(${name}_test_additional_INCLUDE_DIRS MATCHES NOTFOUND) - INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${name}_test_additional_INCLUDE_DIRS ) + INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${${name}_test_additional_INCLUDE_DIRS} ) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_INCLUDE_DIRS ${${name}_test_additional_INCLUDE_DIRS}") ENDIF(LL_TEST_VERBOSE) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 1b60d176f1..dbb4dfc46c 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -1,35 +1,49 @@ # -*- cmake -*- include(FindAutobuild) +if(INSTALL_PROPRIETARY) + include(FindSCP) +endif(INSTALL_PROPRIETARY) +# The use_prebuilt_binary macro handles automated installation of package +# dependencies using autobuild. The goal is that 'autobuild install' should +# only be run when we know we need to install a new package. This should be +# the case in a clean checkout, or if autobuild.xml has been updated since the +# last run (encapsulated by the file ${CMAKE_BINARY_DIR}/temp/sentinel_installed), +# or if a previous attempt to install the package has failed (the exit status +# of previous attempts is serialized in the file +# ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) macro (use_prebuilt_binary _binary) if (NOT DEFINED STANDALONE_${_binary}) set(STANDALONE_${_binary} ${STANDALONE}) endif (NOT DEFINED STANDALONE_${_binary}) if (NOT STANDALONE_${_binary}) - if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) - if(INSTALL_PROPRIETARY) - include(FindSCP) - endif(INSTALL_PROPRIETARY) - if(DEBUG_PREBUILT) - message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install - --install-dir=${AUTOBUILD_INSTALL_DIR} - --skip-license-check - ${_binary} ") - endif(DEBUG_PREBUILT) - execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" - install - --install-dir=${AUTOBUILD_INSTALL_DIR} - --skip-license-check - ${_binary} - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - RESULT_VARIABLE ${_binary}_installed - ) + if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") + file(READ ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${_binary}_installed") + if(DEBUG_PREBUILT) + message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"") + endif(DEBUG_PREBUILT) + endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") + + if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + if(DEBUG_PREBUILT) + message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install + --install-dir=${AUTOBUILD_INSTALL_DIR} + --skip-license-check + ${_binary} ") + endif(DEBUG_PREBUILT) + execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" + install + --install-dir=${AUTOBUILD_INSTALL_DIR} + --skip-license-check + ${_binary} + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE ${_binary}_installed + ) file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}") - else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) - set(${_binary}_installed 0) - endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + if(NOT ${_binary}_installed EQUAL 0) message(FATAL_ERROR "Failed to download or unpack prebuilt '${_binary}'." diff --git a/indra/cmake/Pth.cmake b/indra/cmake/Pth.cmake deleted file mode 100644 index a28f6ec696..0000000000 --- a/indra/cmake/Pth.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) - -set(PTH_FIND_QUIETLY ON) -set(PTH_FIND_REQUIRED ON) - -if (STANDALONE) -# ?? How would I construct FindPTH.cmake? This file was cloned from -# CURL.cmake, which uses include(FindCURL), but there's no FindCURL.cmake? -# include(FindPTH) -else (STANDALONE) - # This library is only needed to support Boost.Coroutine, and only on Mac. - if (DARWIN) - use_prebuilt_binary(pth) - set(PTH_LIBRARIES pth) - set(PTH_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) - else (DARWIN) - set(PTH_LIBRARIES) - set(PTH_INCLUDE_DIRS) - endif (DARWIN) -endif (STANDALONE) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 1a8b16dec7..cfccd29def 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -152,7 +152,7 @@ For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both endif (LINUX AND SERVER AND VIEWER) -set(USE_PRECOMPILED_HEADERS OFF CACHE BOOL "Enable use of precompiled header directives where supported.") +set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") source_group("CMake Rules" FILES CMakeLists.txt) diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 60ddf63b21..976aae08bb 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -70,6 +70,10 @@ static const char USAGE[] = "\n" " be used. Blocks must be smaller than precincts. Like precincts, this option adds\n" " PLT, tile markers and uses RPCL.\n" " Only valid for output j2c images. Default is 64.\n" +" -l, --levels <n>\n" +" Number of decomposition levels (aka discard levels) in the output image.\n" +" The maximum number of levels authorized is 32.\n" +" Only valid for output j2c images. Default is 5.\n" " -rev, --reversible\n" " Set the compression to be lossless (reversible in j2c parlance).\n" " Only valid for output j2c images.\n" @@ -147,7 +151,7 @@ LLPointer<LLImageRaw> load_image(const std::string &src_filename, int discard_le } // Save a raw image instance into a file -bool save_image(const std::string &dest_filename, LLPointer<LLImageRaw> raw_image, int blocks_size, int precincts_size, bool reversible, bool output_stats) +bool save_image(const std::string &dest_filename, LLPointer<LLImageRaw> raw_image, int blocks_size, int precincts_size, int levels, bool reversible, bool output_stats) { LLPointer<LLImageFormatted> image = create_image(dest_filename); @@ -156,9 +160,9 @@ bool save_image(const std::string &dest_filename, LLPointer<LLImageRaw> raw_imag { // That method doesn't exist (and likely, doesn't make sense) for any other image file format // hence the required cryptic cast. - if ((blocks_size != -1) || (precincts_size != -1)) + if ((blocks_size != -1) || (precincts_size != -1) || (levels != 0)) { - ((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size); + ((LLImageJ2C*)(image.get()))->initEncode(*raw_image, blocks_size, precincts_size, levels); } ((LLImageJ2C*)(image.get()))->setReversible(reversible); } @@ -306,6 +310,7 @@ int main(int argc, char** argv) int discard_level = -1; int precincts_size = -1; int blocks_size = -1; + int levels = 0; bool reversible = false; // Init whatever is necessary @@ -403,7 +408,6 @@ int main(int argc, char** argv) else { precincts_size = atoi(value_str.c_str()); - // *TODO: make sure precincts_size is a power of 2 } } else if (!strcmp(argv[arg], "--blocks") || !strcmp(argv[arg], "-b")) @@ -420,7 +424,22 @@ int main(int argc, char** argv) else { blocks_size = atoi(value_str.c_str()); - // *TODO: make sure blocks_size is a power of 2 + } + } + else if (!strcmp(argv[arg], "--levels") || !strcmp(argv[arg], "-l")) + { + std::string value_str; + if ((arg + 1) < argc) + { + value_str = argv[arg+1]; + } + if (((arg + 1) >= argc) || (value_str[0] == '-')) + { + std::cout << "No valid --levels argument given, default (5) will be used" << std::endl; + } + else + { + levels = atoi(value_str.c_str()); } } else if (!strcmp(argv[arg], "--reversible") || !strcmp(argv[arg], "-rev")) @@ -499,7 +518,7 @@ int main(int argc, char** argv) // Save file if (out_file != out_end) { - if (!save_image(*out_file, raw_image, blocks_size, precincts_size, reversible, image_stats)) + if (!save_image(*out_file, raw_image, blocks_size, precincts_size, levels, reversible, image_stats)) { std::cout << "Error: Image " << *out_file << " could not be saved" << std::endl; } diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index c34115ee80..217e26c3ca 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -33,6 +33,7 @@ // linden library includes #include "llcontrol.h" // LLControlGroup #include "lldir.h" +#include "lldiriterator.h" #include "llerrorcontrol.h" #include "llfloater.h" #include "llfontfreetype.h" @@ -174,7 +175,9 @@ void export_test_floaters() std::string delim = gDirUtilp->getDirDelimiter(); std::string xui_dir = get_xui_dir() + "en" + delim; std::string filename; - while (gDirUtilp->getNextFileInDir(xui_dir, "floater_test_*.xml", filename)) + + LLDirIterator iter(xui_dir, "floater_test_*.xml"); + while (iter.next(filename)) { if (filename.find("_new.xml") != std::string::npos) { diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp index a81de0223c..eed00ac06e 100644 --- a/indra/linux_updater/linux_updater.cpp +++ b/indra/linux_updater/linux_updater.cpp @@ -33,6 +33,7 @@ #include "llerrorcontrol.h" #include "llfile.h" #include "lldir.h" +#include "lldiriterator.h" #include "llxmlnode.h" #include "lltrans.h" @@ -55,6 +56,8 @@ typedef struct _updater_app_state { std::string strings_dirs; std::string strings_file; + LLDirIterator *image_dir_iter; + GtkWidget *window; GtkWidget *progress_bar; GtkWidget *image; @@ -115,7 +118,7 @@ bool translate_init(std::string comma_delim_path_list, 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); +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); @@ -181,7 +184,7 @@ void updater_app_ui_init(UpdaterAppState *app_state) // load the first image app_state->image = gtk_image_new_from_file - (next_image_filename(app_state->image_dir).c_str()); + (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); @@ -212,7 +215,7 @@ gboolean rotate_image_cb(gpointer data) llassert(data != NULL); app_state = (UpdaterAppState *) data; - filename = next_image_filename(app_state->image_dir); + 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()); @@ -221,10 +224,10 @@ gboolean rotate_image_cb(gpointer data) return TRUE; } -std::string next_image_filename(std::string& image_path) +std::string next_image_filename(std::string& image_path, LLDirIterator& iter) { std::string image_filename; - gDirUtilp->getNextFileInDir(image_path, "/*.jpg", image_filename); + iter.next(image_filename); return image_path + "/" + image_filename; } @@ -748,6 +751,7 @@ void parse_args_and_init(int argc, char **argv, UpdaterAppState *app_state) 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)) { @@ -832,6 +836,7 @@ int main(int argc, char **argv) } bool success = !app_state->failure; + delete app_state->image_dir_iter; delete app_state; return success ? 0 : 1; } diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 22e0705036..80df91a5c1 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -7,7 +7,6 @@ include(00-Common) include(LLCommon) include(Linking) include(Boost) -include(Pth) include(LLSharedLibs) include(GoogleBreakpad) include(GooglePerfTools) @@ -18,7 +17,6 @@ include_directories( ${EXPAT_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} - ${PTH_INCLUDE_DIRS} ) # add_executable(lltreeiterators lltreeiterators.cpp) @@ -268,6 +266,10 @@ if(LLCOMMON_LINK_SHARED) add_definitions(-fPIC) endif(WINDOWS) endif(NOT WORD_SIZE EQUAL 32) + if(WINDOWS) + # always generate llcommon.pdb, even for "Release" builds + set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG") + endif(WINDOWS) ll_stage_sharedlib(llcommon) else(LLCOMMON_LINK_SHARED) add_library (llcommon ${llcommon_SOURCE_FILES}) @@ -283,10 +285,15 @@ target_link_libraries( ${WINDOWS_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} - ${PTH_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} ) +if (DARWIN) + include(CMakeFindFrameworks) + find_library(CARBON_LIBRARY Carbon) + target_link_libraries(llcommon ${CARBON_LIBRARY}) +endif (DARWIN) + add_dependencies(llcommon stage_third_party_libs) if (LL_TESTS) diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 39daefd1ad..ed192a9975 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -24,6 +24,10 @@ * $/LicenseInfo$ */ +#include "linden_common.h" + +#include "llapp.h" + #include <cstdlib> #ifdef LL_DARWIN @@ -32,9 +36,6 @@ #include <sys/sysctl.h> #endif -#include "linden_common.h" -#include "llapp.h" - #include "llcommon.h" #include "llapr.h" #include "llerrorcontrol.h" diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 0adb78236e..3bd1403576 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -28,7 +28,7 @@ #include "llmemtype.h" -#if 0 //DON'T use ll_aligned_foo now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals) +#if LL_DEBUG inline void* ll_aligned_malloc( size_t size, int align ) { void* mem = malloc( size + (align - 1) + sizeof(void*) ); @@ -95,7 +95,15 @@ inline void ll_aligned_free_32(void *p) free(p); // posix_memalign() is compatible with heap deallocator #endif } -#endif +#else // LL_DEBUG +// ll_aligned_foo are noops now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals) +#define ll_aligned_malloc( size, align ) malloc(size) +#define ll_aligned_free( ptr ) free(ptr) +#define ll_aligned_malloc_16 malloc +#define ll_aligned_free_16 free +#define ll_aligned_malloc_32 malloc +#define ll_aligned_free_32 free +#endif // LL_DEBUG class LL_COMMON_API LLMemory { diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 10cdc7087b..ca2d3f9181 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -46,6 +46,7 @@ # include <sys/sysctl.h> # include <sys/utsname.h> # include <stdint.h> +# include <Carbon/Carbon.h> #elif LL_LINUX # include <errno.h> # include <sys/utsname.h> @@ -318,7 +319,58 @@ LLOSInfo::LLOSInfo() : } mOSString += compatibility_mode; +#elif LL_DARWIN + + // Initialize mOSStringSimple to something like: + // "Mac OS X 10.6.7" + { + const char * DARWIN_PRODUCT_NAME = "Mac OS X"; + + SInt32 major_version, minor_version, bugfix_version; + OSErr r1 = Gestalt(gestaltSystemVersionMajor, &major_version); + OSErr r2 = Gestalt(gestaltSystemVersionMinor, &minor_version); + OSErr r3 = Gestalt(gestaltSystemVersionBugFix, &bugfix_version); + + if((r1 == noErr) && (r2 == noErr) && (r3 == noErr)) + { + mMajorVer = major_version; + mMinorVer = minor_version; + mBuild = bugfix_version; + + std::stringstream os_version_string; + os_version_string << DARWIN_PRODUCT_NAME << " " << mMajorVer << "." << mMinorVer << "." << mBuild; + + // Put it in the OS string we are compiling + mOSStringSimple.append(os_version_string.str()); + } + else + { + mOSStringSimple.append("Unable to collect OS info"); + } + } + + // Initialize mOSString to something like: + // "Mac OS X 10.6.7 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386" + struct utsname un; + if(uname(&un) != -1) + { + mOSString = mOSStringSimple; + mOSString.append(" "); + mOSString.append(un.sysname); + mOSString.append(" "); + mOSString.append(un.release); + mOSString.append(" "); + mOSString.append(un.version); + mOSString.append(" "); + mOSString.append(un.machine); + } + else + { + mOSString = mOSStringSimple; + } + #else + struct utsname un; if(uname(&un) != -1) { @@ -334,15 +386,7 @@ LLOSInfo::LLOSInfo() : // Simplify 'Simple' std::string ostype = mOSStringSimple.substr(0, mOSStringSimple.find_first_of(" ", 0)); - if (ostype == "Darwin") - { - // Only care about major Darwin versions, truncate at first '.' - S32 idx1 = mOSStringSimple.find_first_of(".", 0); - std::string simple = mOSStringSimple.substr(0, idx1); - if (simple.length() > 0) - mOSStringSimple = simple; - } - else if (ostype == "Linux") + if (ostype == "Linux") { // Only care about major and minor Linux versions, truncate at second '.' std::string::size_type idx1 = mOSStringSimple.find_first_of(".", 0); diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 08026c38a6..79124a5a37 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 2; const S32 LL_VERSION_MINOR = 6; -const S32 LL_VERSION_PATCH = 8; +const S32 LL_VERSION_PATCH = 9; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 18444f3934..c464c3b2b6 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -35,8 +35,21 @@ const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 + +// *TODO : Use MAX_IMAGE_MIP as max discard level and modify j2c management so that the number +// of levels is read from the header's file, not inferred from its size. const S32 MAX_DISCARD_LEVEL = 5; +// JPEG2000 size constraints +// Those are declared here as they are germane to other image constraints used in the viewer +// and declared right here. Some come from the JPEG2000 spec, some conventions specific to SL. +const S32 MAX_DECOMPOSITION_LEVELS = 32; // Number of decomposition levels cannot exceed 32 according to jpeg2000 spec +const S32 MIN_DECOMPOSITION_LEVELS = 5; // the SL viewer will *crash* trying to decode images with fewer than 5 decomposition levels (unless image is small that is) +const S32 MAX_PRECINCT_SIZE = 2048; // No reason to be bigger than MAX_IMAGE_SIZE +const S32 MIN_PRECINCT_SIZE = 4; // Can't be smaller than MIN_BLOCK_SIZE +const S32 MAX_BLOCK_SIZE = 64; // Max total block size is 4096, hence 64x64 when using square blocks +const S32 MIN_BLOCK_SIZE = 4; // Min block dim is 4 according to jpeg2000 spec + const S32 MIN_IMAGE_SIZE = (1<<MIN_IMAGE_MIP); // 4, only used for expand/contract power of 2 const S32 MAX_IMAGE_SIZE = (1<<MAX_IMAGE_MIP); // 2048 const S32 MIN_IMAGE_AREA = MIN_IMAGE_SIZE * MIN_IMAGE_SIZE; diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index a90df0f1c1..44e6b89dd3 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -144,9 +144,9 @@ BOOL LLImageJ2C::initDecode(LLImageRaw &raw_image, int discard_level, int* regio return mImpl->initDecode(*this,raw_image,discard_level,region); } -BOOL LLImageJ2C::initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size) +BOOL LLImageJ2C::initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { - return mImpl->initEncode(*this,raw_image,blocks_size,precincts_size); + return mImpl->initEncode(*this,raw_image,blocks_size,precincts_size,levels); } BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index 6bba81aab5..914174fc57 100644 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h @@ -57,7 +57,7 @@ public: /*virtual*/ void setLastError(const std::string& message, const std::string& filename = std::string()); BOOL initDecode(LLImageRaw &raw_image, int discard_level, int* region); - BOOL initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size); + BOOL initEncode(LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels); // Encode with comment text BOOL encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time=0.0); @@ -120,7 +120,7 @@ protected: virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, BOOL reversible=FALSE) = 0; virtual BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL) = 0; - virtual BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1) = 0; + virtual BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0) = 0; friend class LLImageJ2C; }; diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index 8288fa1f5c..d15824ce5a 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -113,7 +113,7 @@ BOOL LLImageJ2COJ::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int disca return FALSE; } -BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size) +BOOL LLImageJ2COJ::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { // No specific implementation for this method in the OpenJpeg case return FALSE; diff --git a/indra/llimagej2coj/llimagej2coj.h b/indra/llimagej2coj/llimagej2coj.h index 9c7cc09fcb..40ad4edb00 100644 --- a/indra/llimagej2coj/llimagej2coj.h +++ b/indra/llimagej2coj/llimagej2coj.h @@ -40,7 +40,7 @@ protected: /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, BOOL reversible = FALSE); /*virtual*/ BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL); - /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1); + /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0); }; #endif diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index ae456a48be..39ae09650e 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -29,6 +29,7 @@ #include "lltimer.h" #include "llpointer.h" +#include "llmath.h" #include "llkdumem.h" @@ -192,7 +193,8 @@ mTileIndicesp(NULL), mRawImagep(NULL), mDecodeState(NULL), mBlocksSize(-1), -mPrecinctsSize(-1) +mPrecinctsSize(-1), +mLevels(0) { } @@ -328,10 +330,29 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int disc return initDecode(base,raw_image,0.0f,MODE_FAST,0,4,discard_level,region); } -BOOL LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size) +BOOL LLImageJ2CKDU::initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size, int precincts_size, int levels) { - mBlocksSize = blocks_size; mPrecinctsSize = precincts_size; + if (mPrecinctsSize != -1) + { + mPrecinctsSize = get_lower_power_two(mPrecinctsSize,MAX_PRECINCT_SIZE); + mPrecinctsSize = llmax(mPrecinctsSize,MIN_PRECINCT_SIZE); + } + mBlocksSize = blocks_size; + if (mBlocksSize != -1) + { + mBlocksSize = get_lower_power_two(mBlocksSize,MAX_BLOCK_SIZE); + mBlocksSize = llmax(mBlocksSize,MIN_BLOCK_SIZE); + if (mPrecinctsSize != -1) + { + mBlocksSize = llmin(mBlocksSize,mPrecinctsSize); // blocks *must* be smaller than precincts + } + } + mLevels = levels; + if (mLevels != 0) + { + mLevels = llclamp(mLevels,MIN_DECOMPOSITION_LEVELS,MIN_DECOMPOSITION_LEVELS); + } return TRUE; } @@ -373,10 +394,12 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco // Resize raw_image according to the image to be decoded kdu_dims dims; mCodeStreamp->get_dims(0,dims); + // *TODO: Use the real number of levels read from the file throughout the code instead of relying on an infered value from dimensions + //S32 levels = mCodeStreamp->get_min_dwt_levels(); S32 channels = base.getComponents() - first_channel; channels = llmin(channels,max_channel_count); raw_image.resize(dims.size.x, dims.size.y, channels); - // llinfos << "Resizing raw_image to " << dims.size.x << ":" << dims.size.y << llendl; + //llinfos << "j2c image dimension: width = " << dims.size.x << ", height = " << dims.size.y << ", channels = " << channels << ", levels = " << levels << llendl; if (!mTileIndicesp) { @@ -653,6 +676,11 @@ BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, co std::string Parts_string = llformat("ORGtparts=R"); codestream.access_siz()->parse_string(Parts_string.c_str()); } + if (mLevels != 0) + { + std::string levels_string = llformat("Clevels=%d",mLevels); + codestream.access_siz()->parse_string(levels_string.c_str()); + } codestream.access_siz()->finalize_all(); codestream.change_appearance(transpose,vflip,hflip); diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h index 9fce58b762..1489dbf704 100644 --- a/indra/llkdu/llimagej2ckdu.h +++ b/indra/llkdu/llimagej2ckdu.h @@ -59,7 +59,7 @@ protected: /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0, BOOL reversible=FALSE); /*virtual*/ BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, int discard_level = -1, int* region = NULL); - /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1); + /*virtual*/ BOOL initEncode(LLImageJ2C &base, LLImageRaw &raw_image, int blocks_size = -1, int precincts_size = -1, int levels = 0); private: BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count, int discard_level = -1, int* region = NULL); @@ -73,6 +73,7 @@ private: kdu_dims *mTileIndicesp; int mBlocksSize; int mPrecinctsSize; + int mLevels; // Temporary variables for in-progress decodes... LLImageRaw *mRawImagep; diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp index 7ac24a969a..ab60ab6d50 100644 --- a/indra/llkdu/tests/llimagej2ckdu_test.cpp +++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp @@ -134,6 +134,7 @@ kdu_params* kdu_params::access_cluster(const char*) { return NULL; } void kdu_codestream::set_fast() { } void kdu_codestream::set_fussy() { } void kdu_codestream::get_dims(int, kdu_dims&, bool ) { } +int kdu_codestream::get_min_dwt_levels() { return 5; } void kdu_codestream::change_appearance(bool, bool, bool) { } void kdu_codestream::get_tile_dims(kdu_coords, int, kdu_dims&, bool ) { } void kdu_codestream::destroy() { } diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 3e651cc02a..c504215ee5 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -1884,9 +1884,9 @@ LLVolume::~LLVolume() mProfilep = NULL; mVolumeFaces.clear(); - free(mHullPoints); + ll_aligned_free_16(mHullPoints); mHullPoints = NULL; - free(mHullIndices); + ll_aligned_free_16(mHullIndices); mHullIndices = NULL; } @@ -2008,7 +2008,7 @@ void LLVolumeFace::VertexData::init() { if (!mData) { - mData = (LLVector4a*) malloc(sizeof(LLVector4a)*2); + mData = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*2); } } @@ -2037,7 +2037,7 @@ const LLVolumeFace::VertexData& LLVolumeFace::VertexData::operator=(const LLVolu LLVolumeFace::VertexData::~VertexData() { - free(mData); + ll_aligned_free_16(mData); mData = NULL; } @@ -5219,7 +5219,7 @@ LLVolumeFace::LLVolumeFace() : mWeights(NULL), mOctree(NULL) { - mExtents = (LLVector4a*) malloc(sizeof(LLVector4a)*3); + mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3); mCenter = mExtents+2; } @@ -5240,7 +5240,7 @@ LLVolumeFace::LLVolumeFace(const LLVolumeFace& src) mWeights(NULL), mOctree(NULL) { - mExtents = (LLVector4a*) malloc(sizeof(LLVector4a)*3); + mExtents = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*3); mCenter = mExtents+2; *this = src; } @@ -5290,7 +5290,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src) } else { - free(mBinormals); + ll_aligned_free_16(mBinormals); mBinormals = NULL; } @@ -5301,7 +5301,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src) } else { - free(mWeights); + ll_aligned_free_16(mWeights); mWeights = NULL; } } @@ -5319,7 +5319,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src) LLVolumeFace::~LLVolumeFace() { - free(mExtents); + ll_aligned_free_16(mExtents); mExtents = NULL; freeData(); @@ -5327,17 +5327,17 @@ LLVolumeFace::~LLVolumeFace() void LLVolumeFace::freeData() { - free(mPositions); + ll_aligned_free_16(mPositions); mPositions = NULL; - free( mNormals); + ll_aligned_free_16( mNormals); mNormals = NULL; - free(mTexCoords); + ll_aligned_free_16(mTexCoords); mTexCoords = NULL; - free(mIndices); + ll_aligned_free_16(mIndices); mIndices = NULL; - free(mBinormals); + ll_aligned_free_16(mBinormals); mBinormals = NULL; - free(mWeights); + ll_aligned_free_16(mWeights); mWeights = NULL; delete mOctree; @@ -5854,21 +5854,21 @@ void LLVolumeFace::cacheOptimize() //allocate space for new buffer S32 num_verts = mNumVertices; - LLVector4a* pos = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); - LLVector4a* norm = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + LLVector4a* pos = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); + LLVector4a* norm = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF; - LLVector2* tc = (LLVector2*) malloc(size); + LLVector2* tc = (LLVector2*) ll_aligned_malloc_16(size); LLVector4a* wght = NULL; if (mWeights) { - wght = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + wght = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); } LLVector4a* binorm = NULL; if (mBinormals) { - binorm = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + binorm = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); } //allocate mapping of old indices to new indices @@ -5905,11 +5905,11 @@ void LLVolumeFace::cacheOptimize() mIndices[i] = new_idx[mIndices[i]]; } - free(mPositions); - free(mNormals); - free(mTexCoords); - free(mWeights); - free(mBinormals); + ll_aligned_free_16(mPositions); + ll_aligned_free_16(mNormals); + ll_aligned_free_16(mTexCoords); + ll_aligned_free_16(mWeights); + ll_aligned_free_16(mBinormals); mPositions = pos; mNormals = norm; @@ -6630,23 +6630,23 @@ void LLVolumeFace::createBinormals() void LLVolumeFace::resizeVertices(S32 num_verts) { - free(mPositions); - free(mNormals); - free(mBinormals); - free(mTexCoords); + ll_aligned_free_16(mPositions); + ll_aligned_free_16(mNormals); + ll_aligned_free_16(mBinormals); + ll_aligned_free_16(mTexCoords); mBinormals = NULL; if (num_verts) { - mPositions = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + mPositions = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); assert_aligned(mPositions, 16); - mNormals = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + mNormals = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); assert_aligned(mNormals, 16); //pad texture coordinate block end to allow for QWORD reads S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF; - mTexCoords = (LLVector2*) malloc(size); + mTexCoords = (LLVector2*) ll_aligned_malloc_16(size); assert_aligned(mTexCoords, 16); } else @@ -6682,7 +6682,7 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con //just clear binormals - free(mBinormals); + ll_aligned_free_16(mBinormals); mBinormals = NULL; mPositions[mNumVertices] = pos; @@ -6694,26 +6694,26 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con void LLVolumeFace::allocateBinormals(S32 num_verts) { - free(mBinormals); - mBinormals = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + ll_aligned_free_16(mBinormals); + mBinormals = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); } void LLVolumeFace::allocateWeights(S32 num_verts) { - free(mWeights); - mWeights = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); + ll_aligned_free_16(mWeights); + mWeights = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); } void LLVolumeFace::resizeIndices(S32 num_indices) { - free(mIndices); + ll_aligned_free_16(mIndices); if (num_indices) { //pad index block end to allow for QWORD reads S32 size = ((num_indices*sizeof(U16)) + 0xF) & ~0xF; - mIndices = (U16*) malloc(size); + mIndices = (U16*) ll_aligned_malloc_16(size); } else { diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index b0f68df2e8..7c8b7e3584 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -769,15 +769,7 @@ void LLCurl::Multi::removeEasy(Easy* easy) //static std::string LLCurl::strerror(CURLcode errorcode) { -#if LL_DARWIN - // curl_easy_strerror was added in libcurl 7.12.0. Unfortunately, the version in the Mac OS X 10.3.9 SDK is 7.10.2... - // There's a problem with the custom curl headers in our build that keeps me from #ifdefing this on the libcurl version number - // (the correct check would be #if LIBCURL_VERSION_NUM >= 0x070c00). We'll fix the header problem soon, but for now - // just punt and print the numeric error code on the Mac. - return llformat("%d", errorcode); -#else // LL_DARWIN return std::string(curl_easy_strerror(errorcode)); -#endif // LL_DARWIN } //////////////////////////////////////////////////////////////////////////// diff --git a/indra/llmessage/tests/commtest.h b/indra/llmessage/tests/commtest.h index 32035783e2..0fef596df2 100644 --- a/indra/llmessage/tests/commtest.h +++ b/indra/llmessage/tests/commtest.h @@ -35,6 +35,13 @@ #include "llhost.h" #include "stringize.h" #include <string> +#include <stdexcept> +#include <boost/lexical_cast.hpp> + +struct CommtestError: public std::runtime_error +{ + CommtestError(const std::string& what): std::runtime_error(what) {} +}; /** * This struct is shared by a couple of standalone comm tests (ADD_COMM_BUILD_TEST). @@ -55,13 +62,24 @@ struct commtest_data replyPump("reply"), errorPump("error"), success(false), - host("127.0.0.1", 8000), + host("127.0.0.1", getport("PORT")), server(STRINGIZE("http://" << host.getString() << "/")) { replyPump.listen("self", boost::bind(&commtest_data::outcome, this, _1, true)); errorPump.listen("self", boost::bind(&commtest_data::outcome, this, _1, false)); } + static int getport(const std::string& var) + { + const char* port = getenv(var.c_str()); + if (! port) + { + throw CommtestError("missing $PORT environment variable"); + } + // This will throw, too, if the value of PORT isn't numeric. + return boost::lexical_cast<int>(port); + } + bool outcome(const LLSD& _result, bool _success) { // std::cout << "commtest_data::outcome(" << _result << ", " << _success << ")\n"; diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 580ee7f8b4..cea5032111 100644 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -38,7 +38,7 @@ mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tes sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) from indra.util.fastest_elementtree import parse as xml_parse from indra.base import llsd -from testrunner import run, debug +from testrunner import freeport, run, debug class TestHTTPRequestHandler(BaseHTTPRequestHandler): """This subclass of BaseHTTPRequestHandler is to receive and echo @@ -97,6 +97,10 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): self.wfile.write(response) else: # fail requested status = data.get("status", 500) + # self.responses maps an int status to a (short, long) pair of + # strings. We want the longer string. That's why we pass a string + # pair to get(): the [1] will select the second string, whether it + # came from self.responses or from our default pair. reason = data.get("reason", self.responses.get(status, ("fail requested", @@ -113,11 +117,17 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): # Suppress error output as well pass -class TestHTTPServer(Thread): - def run(self): - httpd = HTTPServer(('127.0.0.1', 8000), TestHTTPRequestHandler) - debug("Starting HTTP server...\n") - httpd.serve_forever() - if __name__ == "__main__": - sys.exit(run(server=TestHTTPServer(name="httpd"), *sys.argv[1:])) + # Instantiate an HTTPServer(TestHTTPRequestHandler) on the first free port + # in the specified port range. Doing this inline is better than in a + # daemon thread: if it blows up here, we'll get a traceback. If it blew up + # in some other thread, the traceback would get eaten and we'd run the + # subject test program anyway. + httpd, port = freeport(xrange(8000, 8020), + lambda port: HTTPServer(('127.0.0.1', port), TestHTTPRequestHandler)) + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["PORT"] = str(port) + sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), *sys.argv[1:])) diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py index b70ce91ee7..8ff13e0426 100644 --- a/indra/llmessage/tests/testrunner.py +++ b/indra/llmessage/tests/testrunner.py @@ -29,6 +29,8 @@ $/LicenseInfo$ import os import sys +import errno +import socket def debug(*args): sys.stdout.writelines(args) @@ -36,6 +38,85 @@ def debug(*args): # comment out the line below to enable debug output debug = lambda *args: None +def freeport(portlist, expr): + """ + Find a free server port to use. Specifically, evaluate 'expr' (a + callable(port)) until it stops raising EADDRINUSE exception. + + Pass: + + portlist: an iterable (e.g. xrange()) of ports to try. If you exhaust the + range, freeport() lets the socket.error exception propagate. If you want + unbounded, you could pass itertools.count(baseport), though of course in + practice the ceiling is 2^16-1 anyway. But it seems prudent to constrain + the range much more sharply: if we're iterating an absurd number of times, + probably something else is wrong. + + expr: a callable accepting a port number, specifically one of the items + from portlist. If calling that callable raises socket.error with + EADDRINUSE, freeport() retrieves the next item from portlist and retries. + + Returns: (expr(port), port) + + port: the value from portlist for which expr(port) succeeded + + Raises: + + Any exception raised by expr(port) other than EADDRINUSE. + + socket.error if, for every item from portlist, expr(port) raises + socket.error. The exception you see is the one from the last item in + portlist. + + StopIteration if portlist is completely empty. + + Example: + + server, port = freeport(xrange(8000, 8010), + lambda port: HTTPServer(("localhost", port), + MyRequestHandler)) + # pass 'port' to client code + # call server.serve_forever() + """ + # If portlist is completely empty, let StopIteration propagate: that's an + # error because we can't return meaningful values. We have no 'port', + # therefore no 'expr(port)'. + portiter = iter(portlist) + port = portiter.next() + + while True: + try: + # If this value of port works, return as promised. + return expr(port), port + + except socket.error, err: + # Anything other than 'Address already in use', propagate + if err.args[0] != errno.EADDRINUSE: + raise + + # Here we want the next port from portiter. But on StopIteration, + # we want to raise the original exception rather than + # StopIteration. So save the original exc_info(). + type, value, tb = sys.exc_info() + try: + try: + port = portiter.next() + except StopIteration: + raise type, value, tb + finally: + # Clean up local traceback, see docs for sys.exc_info() + del tb + + # Recap of the control flow above: + # If expr(port) doesn't raise, return as promised. + # If expr(port) raises anything but EADDRINUSE, propagate that + # exception. + # If portiter.next() raises StopIteration -- that is, if the port + # value we just passed to expr(port) was the last available -- reraise + # the EADDRINUSE exception. + # If we've actually arrived at this point, portiter.next() delivered a + # new port value. Loop back to pass that to expr(port). + def run(*args, **kwds): """All positional arguments collectively form a command line, executed as a synchronous child process. diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 24d9a3a1e2..0cbb46cc71 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -991,6 +991,9 @@ void LLModel::normalizeVolumeFaces() scale.splat(1.f); scale.div(size); + LLVector4a inv_scale(1.f); + inv_scale.div(scale); + for (U32 i = 0; i < mVolumeFaces.size(); ++i) { LLVolumeFace& face = mVolumeFaces[i]; @@ -1007,10 +1010,14 @@ void LLModel::normalizeVolumeFaces() // For all the positions, we scale // the positions to fit within the unit cube. LLVector4a* pos = (LLVector4a*) face.mPositions; + LLVector4a* norm = (LLVector4a*) face.mNormals; + for (U32 j = 0; j < face.mNumVertices; ++j) { pos[j].add(trans); pos[j].mul(scale); + norm[j].mul(inv_scale); + norm[j].normalize3(); } } diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 99a1e5c826..f29ee0e57e 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -105,7 +105,6 @@ LLMatrix4 gGLObliqueProjectionInverse; #define LL_GL_NAME_POOLING 0 -LLGLNamePool::pool_list_t LLGLNamePool::sInstances; std::list<LLGLUpdate*> LLGLUpdate::sGLQ; #if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS @@ -1945,22 +1944,8 @@ LLGLNamePool::LLGLNamePool() { } -void LLGLNamePool::registerPool(LLGLNamePool* pool) -{ - pool_list_t::iterator iter = std::find(sInstances.begin(), sInstances.end(), pool); - if (iter == sInstances.end()) - { - sInstances.push_back(pool); - } -} - LLGLNamePool::~LLGLNamePool() { - pool_list_t::iterator iter = std::find(sInstances.begin(), sInstances.end(), this); - if (iter != sInstances.end()) - { - sInstances.erase(iter); - } } void LLGLNamePool::upkeep() @@ -2029,20 +2014,22 @@ void LLGLNamePool::release(GLuint name) void LLGLNamePool::upkeepPools() { LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS); - for (pool_list_t::iterator iter = sInstances.begin(); iter != sInstances.end(); ++iter) + tracker_t::LLInstanceTrackerScopedGuard guard; + for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter) { - LLGLNamePool* pool = *iter; - pool->upkeep(); + LLGLNamePool & pool = *iter; + pool.upkeep(); } } //static void LLGLNamePool::cleanupPools() { - for (pool_list_t::iterator iter = sInstances.begin(); iter != sInstances.end(); ++iter) + tracker_t::LLInstanceTrackerScopedGuard guard; + for (tracker_t::instance_iter iter = guard.beginInstances(); iter != guard.endInstances(); ++iter) { - LLGLNamePool* pool = *iter; - pool->cleanup(); + LLGLNamePool & pool = *iter; + pool.cleanup(); } } diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index c77d85ba2b..3d002fd8c4 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -40,6 +40,7 @@ #include "v4math.h" #include "llplane.h" #include "llgltypes.h" +#include "llinstancetracker.h" #include "llglheaders.h" #include "glh/glh_linear.h" @@ -332,9 +333,11 @@ public: Generic pooling scheme for things which use GL names (used for occlusion queries and vertex buffer objects). Prevents thrashing of GL name caches by avoiding calls to glGenFoo and glDeleteFoo. */ -class LLGLNamePool +class LLGLNamePool : public LLInstanceTracker<LLGLNamePool> { public: + typedef LLInstanceTracker<LLGLNamePool> tracker_t; + struct NameEntry { GLuint name; @@ -361,13 +364,11 @@ public: GLuint allocate(); void release(GLuint name); - static void registerPool(LLGLNamePool* pool); static void upkeepPools(); static void cleanupPools(); protected: typedef std::vector<LLGLNamePool*> pool_list_t; - static pool_list_t sInstances; virtual GLuint allocateName() = 0; virtual void releaseName(GLuint name) = 0; diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 21b02fdb71..98a0a93084 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -315,7 +315,7 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns) } else { - LL_DEBUGS("ShaderLoading") << log << LL_ENDL; + LL_INFOS("ShaderLoading") << log << LL_ENDL; } } } diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 73efbfc999..8c9171ccf4 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -383,10 +383,6 @@ void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping) } sDisableVBOMapping = sEnableVBOs && no_vbo_mapping ; - LLGLNamePool::registerPool(&sDynamicVBOPool); - LLGLNamePool::registerPool(&sDynamicIBOPool); - LLGLNamePool::registerPool(&sStreamVBOPool); - LLGLNamePool::registerPool(&sStreamIBOPool); } //static @@ -633,7 +629,7 @@ void LLVertexBuffer::createGLBuffer() { static int gl_buffer_idx = 0; mGLBuffer = ++gl_buffer_idx; - mMappedData = (U8*) malloc(size); + mMappedData = (U8*) ll_aligned_malloc_16(size); } } @@ -667,7 +663,7 @@ void LLVertexBuffer::createGLIndices() } else { - mMappedIndexData = (U8*) malloc(size); + mMappedIndexData = (U8*) ll_aligned_malloc_16(size); static int gl_buffer_idx = 0; mGLIndices = ++gl_buffer_idx; } @@ -690,7 +686,7 @@ void LLVertexBuffer::destroyGLBuffer() } else { - free(mMappedData); + ll_aligned_free_16(mMappedData); mMappedData = NULL; mEmpty = TRUE; } @@ -719,7 +715,7 @@ void LLVertexBuffer::destroyGLIndices() } else { - free(mMappedIndexData); + ll_aligned_free_16(mMappedIndexData); mMappedIndexData = NULL; mEmpty = TRUE; } @@ -852,8 +848,8 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) { if (!useVBOs()) { - free(mMappedData); - mMappedData = (U8*) malloc(newsize); + ll_aligned_free_16(mMappedData); + mMappedData = (U8*) ll_aligned_malloc_16(newsize); } mResized = TRUE; } @@ -873,8 +869,8 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices) { if (!useVBOs()) { - free(mMappedIndexData); - mMappedIndexData = (U8*) malloc(new_index_size); + ll_aligned_free_16(mMappedIndexData); + mMappedIndexData = (U8*) ll_aligned_malloc_16(new_index_size); } mResized = TRUE; } @@ -915,8 +911,8 @@ void LLVertexBuffer::freeClientBuffer() { if(useVBOs() && sDisableVBOMapping && (mMappedData || mMappedIndexData)) { - free(mMappedData) ; - free(mMappedIndexData) ; + ll_aligned_free_16(mMappedData) ; + ll_aligned_free_16(mMappedIndexData) ; mMappedData = NULL ; mMappedIndexData = NULL ; } @@ -926,7 +922,7 @@ void LLVertexBuffer::allocateClientVertexBuffer() { if(!mMappedData) { - mMappedData = (U8*)malloc(getSize()); + mMappedData = (U8*)ll_aligned_malloc_16(getSize()); } } @@ -934,7 +930,7 @@ void LLVertexBuffer::allocateClientIndexBuffer() { if(!mMappedIndexData) { - mMappedIndexData = (U8*)malloc(getIndicesSize()); + mMappedIndexData = (U8*)ll_aligned_malloc_16(getIndicesSize()); } } diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 16aa49b653..0cfc393e05 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -27,7 +27,6 @@ #ifndef LL_LLBUTTON_H #define LL_LLBUTTON_H -#include "lluuid.h" #include "llcontrol.h" #include "lluictrl.h" #include "v4color.h" @@ -53,6 +52,8 @@ S32 round_up(S32 grid, S32 value); class LLUICtrlFactory; +class LLUIImage; +class LLUUID; // // Classes diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 94387fb41a..8414b92113 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -27,14 +27,9 @@ #define LLFLOATERREG_H /// llcommon -#include "llboost.h" #include "llrect.h" -#include "llstl.h" #include "llsd.h" -/// llui -#include "lluictrl.h" - #include <boost/function.hpp> //******************************************************* @@ -43,6 +38,7 @@ // class LLFloater; +class LLUICtrl; typedef boost::function<LLFloater* (const LLSD& key)> LLFloaterBuildFunc; diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 43e5f6b051..724d190307 100644 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -113,6 +113,16 @@ boost::signals2::connection LLFocusableElement::setTopLostCallback(const focus_s +typedef std::list<LLHandle<LLView> > view_handle_list_t; +typedef std::map<LLHandle<LLView>, LLHandle<LLView> > focus_history_map_t; +struct LLFocusMgr::Impl +{ + // caching list of keyboard focus ancestors for calling onFocusReceived and onFocusLost + view_handle_list_t mCachedKeyboardFocusList; + + focus_history_map_t mFocusHistory; +}; + LLFocusMgr gFocusMgr; LLFocusMgr::LLFocusMgr() @@ -123,10 +133,17 @@ LLFocusMgr::LLFocusMgr() mDefaultKeyboardFocus( NULL ), mKeystrokesOnly(FALSE), mTopCtrl( NULL ), - mAppHasFocus(TRUE) // Macs don't seem to notify us that we've gotten focus, so default to true + mAppHasFocus(TRUE), // Macs don't seem to notify us that we've gotten focus, so default to true + mImpl(new LLFocusMgr::Impl) { } +LLFocusMgr::~LLFocusMgr() +{ + mImpl->mFocusHistory.clear(); + delete mImpl; + mImpl = NULL; +} void LLFocusMgr::releaseFocusIfNeeded( LLView* view ) { @@ -179,7 +196,7 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL mKeyboardFocus = new_focus; // list of the focus and it's ancestors - view_handle_list_t old_focus_list = mCachedKeyboardFocusList; + view_handle_list_t old_focus_list = mImpl->mCachedKeyboardFocusList; view_handle_list_t new_focus_list; // walk up the tree to root and add all views to the new_focus_list @@ -206,7 +223,7 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL LLView* old_focus_view = old_focus_iter->get(); if (old_focus_view) { - mCachedKeyboardFocusList.pop_front(); + mImpl->mCachedKeyboardFocusList.pop_front(); old_focus_view->onFocusLost(); } } @@ -219,7 +236,7 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL LLView* new_focus_view = new_focus_riter->get(); if (new_focus_view) { - mCachedKeyboardFocusList.push_front(new_focus_view->getHandle()); + mImpl->mCachedKeyboardFocusList.push_front(new_focus_view->getHandle()); new_focus_view->onFocusReceived(); } } @@ -254,7 +271,7 @@ void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL if (focus_subtree) { LLView* focused_view = dynamic_cast<LLView*>(mKeyboardFocus); - mFocusHistory[focus_subtree->getHandle()] = focused_view ? focused_view->getHandle() : LLHandle<LLView>(); + mImpl->mFocusHistory[focus_subtree->getHandle()] = focused_view ? focused_view->getHandle() : LLHandle<LLView>(); } } @@ -456,8 +473,8 @@ LLUICtrl* LLFocusMgr::getLastFocusForGroup(LLView* subtree_root) const { if (subtree_root) { - focus_history_map_t::const_iterator found_it = mFocusHistory.find(subtree_root->getHandle()); - if (found_it != mFocusHistory.end()) + focus_history_map_t::const_iterator found_it = mImpl->mFocusHistory.find(subtree_root->getHandle()); + if (found_it != mImpl->mFocusHistory.end()) { // found last focus for this subtree return static_cast<LLUICtrl*>(found_it->second.get()); @@ -470,6 +487,6 @@ void LLFocusMgr::clearLastFocusForGroup(LLView* subtree_root) { if (subtree_root) { - mFocusHistory.erase(subtree_root->getHandle()); + mImpl->mFocusHistory.erase(subtree_root->getHandle()); } } diff --git a/indra/llui/llfocusmgr.h b/indra/llui/llfocusmgr.h index 22c1895075..25ae1d2579 100644 --- a/indra/llui/llfocusmgr.h +++ b/indra/llui/llfocusmgr.h @@ -74,7 +74,7 @@ class LLFocusMgr { public: LLFocusMgr(); - ~LLFocusMgr() { mFocusHistory.clear(); } + ~LLFocusMgr(); // Mouse Captor void setMouseCapture(LLMouseHandler* new_captor); // new_captor = NULL to release the mouse. @@ -120,6 +120,8 @@ public: bool keyboardFocusHasAccelerators() const; + struct Impl; + private: LLUICtrl* mLockedView; @@ -132,10 +134,6 @@ private: LLFocusableElement* mDefaultKeyboardFocus; BOOL mKeystrokesOnly; - // caching list of keyboard focus ancestors for calling onFocusReceived and onFocusLost - typedef std::list<LLHandle<LLView> > view_handle_list_t; - view_handle_list_t mCachedKeyboardFocusList; - // Top View LLUICtrl* mTopCtrl; @@ -143,8 +141,7 @@ private: BOOL mAppHasFocus; - typedef std::map<LLHandle<LLView>, LLHandle<LLView> > focus_history_map_t; - focus_history_map_t mFocusHistory; + Impl * mImpl; }; extern LLFocusMgr gFocusMgr; diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index 669e126266..efa0925a4a 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -30,6 +30,7 @@ #include "lluuid.h" #include "v4color.h" #include "lluictrl.h" +#include "lluiimage.h" #include "stdenums.h" class LLTextBox; diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 7b5fa218f2..fe191e5971 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -41,6 +41,7 @@ #include "lleditmenuhandler.h" #include "lluictrl.h" +#include "lluiimage.h" #include "lluistring.h" #include "llviewborder.h" diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h index c0cb1cc74a..4c47cc267c 100644 --- a/indra/llui/llloadingindicator.h +++ b/indra/llui/llloadingindicator.h @@ -28,6 +28,7 @@ #define LL_LLLOADINGINDICATOR_H #include "lluictrl.h" +#include "lluiimage.h" /////////////////////////////////////////////////////////////////////////////// // class LLLoadingIndicator diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index d4e6091ee0..f744e9db41 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -35,6 +35,7 @@ #include "llkeyboard.h" // for the MASK constants #include "llcontrol.h" #include "lluictrlfactory.h" +#include "lluiimage.h" #include <sstream> diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index c1a1a06f39..7bbbeaf709 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -32,6 +32,7 @@ #include "llcallbackmap.h" #include "lluictrl.h" #include "llviewborder.h" +#include "lluiimage.h" #include "lluistring.h" #include "v4color.h" #include <list> diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp index ead22686bc..84a890edfa 100644 --- a/indra/llui/llprogressbar.cpp +++ b/indra/llui/llprogressbar.cpp @@ -38,6 +38,7 @@ #include "llfocusmgr.h" #include "lluictrlfactory.h" +#include "lluiimage.h" static LLDefaultChildRegistry::Register<LLProgressBar> r("progress_bar"); diff --git a/indra/llui/llprogressbar.h b/indra/llui/llprogressbar.h index 3f308e7496..a8ec83ea00 100644 --- a/indra/llui/llprogressbar.h +++ b/indra/llui/llprogressbar.h @@ -27,8 +27,9 @@ #ifndef LL_LLPROGRESSBAR_H #define LL_LLPROGRESSBAR_H -#include "lluictrl.h" #include "llframetimer.h" +#include "lluictrl.h" +#include "lluiimage.h" class LLProgressBar : public LLUICtrl diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h index 68823ed68e..700c17ea3e 100644 --- a/indra/llui/llslider.h +++ b/indra/llui/llslider.h @@ -29,6 +29,7 @@ #include "llf32uictrl.h" #include "v4color.h" +#include "lluiimage.h" class LLSlider : public LLF32UICtrl { diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp index 28a064e6b6..bb731f4f7e 100644 --- a/indra/llui/llstyle.cpp +++ b/indra/llui/llstyle.cpp @@ -88,7 +88,7 @@ void LLStyle::setVisible(BOOL is_visible) mVisible = is_visible; } -LLUIImagePtr LLStyle::getImage() const +LLPointer<LLUIImage> LLStyle::getImage() const { return mImagep; } diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index 322edc343c..9f1eba79d8 100644 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -30,6 +30,7 @@ #include "v4color.h" #include "llui.h" #include "llinitparam.h" +#include "lluiimage.h" class LLFontGL; @@ -72,7 +73,7 @@ public: void setLinkHREF(const std::string& href); BOOL isLink() const; - LLUIImagePtr getImage() const; + LLPointer<LLUIImage> getImage() const; void setImage(const LLUUID& src); void setImage(const std::string& name); @@ -108,7 +109,7 @@ private: const LLFontGL* mFont; std::string mLink; bool mIsLink; - LLUIImagePtr mImagep; + LLPointer<LLUIImage> mImagep; }; typedef LLPointer<LLStyle> LLStyleSP; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 1c19a33c4e..1cc3cc04d6 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1164,7 +1164,7 @@ void LLTextBase::reflow() S32 first_line = getFirstVisibleLine(); // if scroll anchor not on first line, update it to first character of first line - if (!mLineInfoList.empty() + if ((first_line < mLineInfoList.size()) && (mScrollIndex < mLineInfoList[first_line].mDocIndexStart || mScrollIndex >= mLineInfoList[first_line].mDocIndexEnd)) { diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp index 9d0ff9d5cb..58fa8a0828 100644 --- a/indra/llui/lltransutil.cpp +++ b/indra/llui/lltransutil.cpp @@ -26,10 +26,11 @@ #include "linden_common.h" +#include "lltransutil.h" + #include "lltrans.h" #include "lluictrlfactory.h" - -#include "lltransutil.h" +#include "llxmlnode.h" bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<std::string>& default_args) diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 6a43477693..c583d58d5a 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -33,15 +33,12 @@ #include "llrect.h" #include "llcontrol.h" #include "llcoord.h" -#include "lluiimage.h" // *TODO: break this dependency, need to add #include "lluiimage.h" to all widgets that hold an Optional<LLUIImage*> in their paramblocks #include "llinitparam.h" #include "llregistry.h" #include "lluicolor.h" #include "lluicolortable.h" #include <boost/signals2.hpp> #include "lllazyvalue.h" -#include "llhandle.h" // *TODO: remove this dependency, added as a - // convenience when LLHandle moved to llhandle.h #include "llframetimer.h" // LLUIFactory @@ -265,8 +262,6 @@ private: // Moved LLLocalClipRect to lllocalcliprect.h -// Moved all LLHandle-related code to llhandle.h - //RN: maybe this needs to moved elsewhere? class LLImageProviderInterface { diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 9ab0797f9e..594a5eec6b 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -34,6 +34,7 @@ #include "stdtypes.h" #include "llcoord.h" #include "llfontgl.h" +#include "llhandle.h" #include "llmortician.h" #include "llmousehandler.h" #include "llstring.h" diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp index 89cd34c37c..32d7ea7c25 100644 --- a/indra/llui/llviewborder.cpp +++ b/indra/llui/llviewborder.cpp @@ -28,6 +28,7 @@ #include "llrender.h" #include "llfocusmgr.h" #include "lluictrlfactory.h" +#include "lluiimage.h" static LLDefaultChildRegistry::Register<LLViewBorder> r("view_border"); diff --git a/indra/llui/llwindowshade.h b/indra/llui/llwindowshade.h index 0047195929..09ffc2cd54 100644 --- a/indra/llui/llwindowshade.h +++ b/indra/llui/llwindowshade.h @@ -29,6 +29,7 @@ #include "lluictrl.h" #include "llnotifications.h" +#include "lluiimage.h" class LLWindowShade : public LLUICtrl { diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index 569674ecf0..b6d1ce61e5 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -12,6 +12,7 @@ include_directories( set(llvfs_SOURCE_FILES lldir.cpp + lldiriterator.cpp lllfsthread.cpp llpidlock.cpp llvfile.cpp @@ -24,6 +25,7 @@ set(llvfs_HEADER_FILES lldir.h lldirguard.h + lldiriterator.h lllfsthread.h llpidlock.h llvfile.h @@ -60,6 +62,11 @@ list(APPEND llvfs_SOURCE_FILES ${llvfs_HEADER_FILES}) add_library (llvfs ${llvfs_SOURCE_FILES}) +target_link_libraries(llvfs + ${BOOST_FILESYSTEM_LIBRARY} + ${BOOST_SYSTEM_LIBRARY} + ) + if (DARWIN) include(CMakeFindFrameworks) find_library(CARBON_LIBRARY Carbon) diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 341c96f6ea..f3ac17d612 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -40,6 +40,8 @@ #include "lltimer.h" // ms_sleep() #include "lluuid.h" +#include "lldiriterator.h" + #if LL_WINDOWS #include "lldir_win32.h" LLDir_Win32 gDirUtil; @@ -83,7 +85,9 @@ S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) std::string filename; std::string fullpath; S32 result; - while (getNextFileInDir(dirname, mask, filename)) + + LLDirIterator iter(dirname, mask); + while (iter.next(filename)) { fullpath = dirname; fullpath += getDirDelimiter(); diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 42996fd051..5ee8bdb542 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -75,31 +75,6 @@ class LLDir // pure virtual functions virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0; - /// Walk the files in a directory, with file pattern matching - virtual BOOL getNextFileInDir(const std::string& dirname, ///< directory path - must end in trailing slash! - const std::string& mask, ///< file pattern string (use "*" for all) - std::string& fname ///< output: found file name - ) = 0; - /**< - * @returns true if a file was found, false if the entire directory has been scanned. - * - * @note that this function is NOT thread safe - * - * This function may not be used to scan part of a directory, then start a new search of a different - * directory, and then restart the first search where it left off; the entire search must run to - * completion or be abandoned - there is no restart. - * - * @bug: See http://jira.secondlife.com/browse/VWR-23697 - * and/or the tests in test/lldir_test.cpp - * This is known to fail with patterns that have both: - * a wildcard left of a . and more than one sequential ? right of a . - * the pattern foo.??x appears to work - * but *.??x or foo?.??x do not - * - * @todo this really should be rewritten as an iterator object, and the - * filtering should be done in a platform-independent way. - */ - virtual std::string getCurPath() = 0; virtual BOOL fileExists(const std::string &filename) const = 0; diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 72b54f5380..407f3b93fb 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -242,68 +242,6 @@ U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string & return (file_count); } -// get the next file in the directory -BOOL LLDir_Linux::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) -{ - glob_t g; - BOOL result = FALSE; - fname = ""; - - if(!(dirname == mCurrentDir)) - { - // different dir specified, close old search - mCurrentDirIndex = -1; - mCurrentDirCount = -1; - mCurrentDir = dirname; - } - - std::string tmp_str; - tmp_str = dirname; - tmp_str += mask; - - if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0) - { - if(g.gl_pathc > 0) - { - if((int)g.gl_pathc != mCurrentDirCount) - { - // Number of matches has changed since the last search, meaning a file has been added or deleted. - // Reset the index. - mCurrentDirIndex = -1; - mCurrentDirCount = g.gl_pathc; - } - - mCurrentDirIndex++; - - if(mCurrentDirIndex < (int)g.gl_pathc) - { -// llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl; - - // The API wants just the filename, not the full path. - //fname = g.gl_pathv[mCurrentDirIndex]; - - char *s = strrchr(g.gl_pathv[mCurrentDirIndex], '/'); - - if(s == NULL) - s = g.gl_pathv[mCurrentDirIndex]; - else if(s[0] == '/') - s++; - - fname = s; - - result = TRUE; - } - } - - globfree(&g); - } - - return(result); -} - - - - std::string LLDir_Linux::getCurPath() { char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ diff --git a/indra/llvfs/lldir_linux.h b/indra/llvfs/lldir_linux.h index a34de1241d..7603239867 100644 --- a/indra/llvfs/lldir_linux.h +++ b/indra/llvfs/lldir_linux.h @@ -47,7 +47,6 @@ public: virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); /*virtual*/ BOOL fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); diff --git a/indra/llvfs/lldir_mac.cpp b/indra/llvfs/lldir_mac.cpp index f9369b043e..8f48f92e2a 100644 --- a/indra/llvfs/lldir_mac.cpp +++ b/indra/llvfs/lldir_mac.cpp @@ -258,67 +258,6 @@ U32 LLDir_Mac::countFilesInDir(const std::string &dirname, const std::string &ma return (file_count); } -// get the next file in the directory -BOOL LLDir_Mac::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) -{ - glob_t g; - BOOL result = FALSE; - fname = ""; - - if(!(dirname == mCurrentDir)) - { - // different dir specified, close old search - mCurrentDirIndex = -1; - mCurrentDirCount = -1; - mCurrentDir = dirname; - } - - std::string tmp_str; - tmp_str = dirname; - tmp_str += mask; - - if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0) - { - if(g.gl_pathc > 0) - { - if(g.gl_pathc != mCurrentDirCount) - { - // Number of matches has changed since the last search, meaning a file has been added or deleted. - // Reset the index. - mCurrentDirIndex = -1; - mCurrentDirCount = g.gl_pathc; - } - - mCurrentDirIndex++; - - if(mCurrentDirIndex < g.gl_pathc) - { -// llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl; - - // The API wants just the filename, not the full path. - //fname = g.gl_pathv[mCurrentDirIndex]; - - char *s = strrchr(g.gl_pathv[mCurrentDirIndex], '/'); - - if(s == NULL) - s = g.gl_pathv[mCurrentDirIndex]; - else if(s[0] == '/') - s++; - - fname = s; - - result = TRUE; - } - } - - globfree(&g); - } - - return(result); -} - - - S32 LLDir_Mac::deleteFilesInDir(const std::string &dirname, const std::string &mask) { glob_t g; diff --git a/indra/llvfs/lldir_mac.h b/indra/llvfs/lldir_mac.h index b456d3afca..bc3f0fac00 100644 --- a/indra/llvfs/lldir_mac.h +++ b/indra/llvfs/lldir_mac.h @@ -47,7 +47,6 @@ public: virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask); virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); virtual BOOL fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index 515fd66b6e..21f8c3acdb 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -260,68 +260,6 @@ U32 LLDir_Solaris::countFilesInDir(const std::string &dirname, const std::string return (file_count); } -// get the next file in the directory -BOOL LLDir_Solaris::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) -{ - glob_t g; - BOOL result = FALSE; - fname = ""; - - if(!(dirname == mCurrentDir)) - { - // different dir specified, close old search - mCurrentDirIndex = -1; - mCurrentDirCount = -1; - mCurrentDir = dirname; - } - - std::string tmp_str; - tmp_str = dirname; - tmp_str += mask; - - if(glob(tmp_str.c_str(), GLOB_NOSORT, NULL, &g) == 0) - { - if(g.gl_pathc > 0) - { - if((int)g.gl_pathc != mCurrentDirCount) - { - // Number of matches has changed since the last search, meaning a file has been added or deleted. - // Reset the index. - mCurrentDirIndex = -1; - mCurrentDirCount = g.gl_pathc; - } - - mCurrentDirIndex++; - - if(mCurrentDirIndex < (int)g.gl_pathc) - { -// llinfos << "getNextFileInDir: returning number " << mCurrentDirIndex << ", path is " << g.gl_pathv[mCurrentDirIndex] << llendl; - - // The API wants just the filename, not the full path. - //fname = g.gl_pathv[mCurrentDirIndex]; - - char *s = strrchr(g.gl_pathv[mCurrentDirIndex], '/'); - - if(s == NULL) - s = g.gl_pathv[mCurrentDirIndex]; - else if(s[0] == '/') - s++; - - fname = s; - - result = TRUE; - } - } - - globfree(&g); - } - - return(result); -} - - - - std::string LLDir_Solaris::getCurPath() { char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ diff --git a/indra/llvfs/lldir_solaris.h b/indra/llvfs/lldir_solaris.h index 70fac6f818..0b58a45b15 100644 --- a/indra/llvfs/lldir_solaris.h +++ b/indra/llvfs/lldir_solaris.h @@ -47,7 +47,6 @@ public: virtual std::string getCurPath(); virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask); - virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); /*virtual*/ BOOL fileExists(const std::string &filename) const; private: diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 4e2a55f4b3..7709945123 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -240,67 +240,6 @@ U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string & return (file_count); } - -// get the next file in the directory -BOOL LLDir_Win32::getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) -{ - BOOL fileFound = FALSE; - fname = ""; - - WIN32_FIND_DATAW FileData; - llutf16string pathname = utf8str_to_utf16str(dirname) + utf8str_to_utf16str(mask); - - if (pathname != mCurrentDir) - { - // different dir specified, close old search - if (!mCurrentDir.empty()) - { - FindClose(mDirSearch_h); - } - mCurrentDir = pathname; - - // and open new one - // Check error opening Directory structure - if ((mDirSearch_h = FindFirstFile(pathname.c_str(), &FileData)) != INVALID_HANDLE_VALUE) - { - fileFound = TRUE; - } - } - - // Loop to skip over the current (.) and parent (..) directory entries - // (apparently returned in Win7 but not XP) - do - { - if ( fileFound - && ( (lstrcmp(FileData.cFileName, (LPCTSTR)TEXT(".")) == 0) - ||(lstrcmp(FileData.cFileName, (LPCTSTR)TEXT("..")) == 0) - ) - ) - { - fileFound = FALSE; - } - } while ( mDirSearch_h != INVALID_HANDLE_VALUE - && !fileFound - && (fileFound = FindNextFile(mDirSearch_h, &FileData) - ) - ); - - if (!fileFound && GetLastError() == ERROR_NO_MORE_FILES) - { - // No more files, so reset to beginning of directory - FindClose(mDirSearch_h); - mCurrentDir[0] = '\000'; - } - - if (fileFound) - { - // convert from TCHAR to char - fname = utf16str_to_utf8str(FileData.cFileName); - } - - return fileFound; -} - std::string LLDir_Win32::getCurPath() { WCHAR w_str[MAX_PATH]; diff --git a/indra/llvfs/lldir_win32.h b/indra/llvfs/lldir_win32.h index b170ebbcd7..62fb4713ab 100644 --- a/indra/llvfs/lldir_win32.h +++ b/indra/llvfs/lldir_win32.h @@ -44,15 +44,12 @@ public: /*virtual*/ std::string getCurPath(); /*virtual*/ U32 countFilesInDir(const std::string &dirname, const std::string &mask); - /*virtual*/ BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname); /*virtual*/ BOOL fileExists(const std::string &filename) const; /*virtual*/ std::string getLLPluginLauncher(); /*virtual*/ std::string getLLPluginFilename(std::string base_name); private: - BOOL getNextFileInDir(const llutf16string &dirname, const std::string &mask, std::string &fname); - void* mDirSearch_h; llutf16string mCurrentDir; }; diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index 20e10041f4..82c926620a 100644 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -26,6 +26,8 @@ #include "linden_common.h" +#include "llvfs.h" + #include <sys/stat.h> #include <set> #include <map> @@ -39,8 +41,6 @@ #include <sys/file.h> #endif -#include "llvfs.h" - #include "llstl.h" #include "lltimer.h" @@ -1711,7 +1711,8 @@ void LLVFS::audit() BOOL vfs_corrupt = FALSE; - std::vector<U8> buffer(index_size); + // since we take the address of element 0, we need to have at least one element. + std::vector<U8> buffer(llmax<size_t>(index_size,1U)); if (fread(&buffer[0], 1, index_size, mIndexFP) != index_size) { diff --git a/indra/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp index 8788bd63e8..ea321c5ae9 100644 --- a/indra/llvfs/tests/lldir_test.cpp +++ b/indra/llvfs/tests/lldir_test.cpp @@ -28,6 +28,7 @@ #include "linden_common.h" #include "../lldir.h" +#include "../lldiriterator.h" #include "../test/lltut.h" @@ -259,13 +260,12 @@ namespace tut std::string makeTestFile( const std::string& dir, const std::string& file ) { - std::string delim = gDirUtilp->getDirDelimiter(); - std::string path = dir + delim + file; + std::string path = dir + file; LLFILE* handle = LLFile::fopen( path, "w" ); ensure("failed to open test file '"+path+"'", handle != NULL ); // Harbison & Steele, 4th ed., p. 366: "If an error occurs, fputs // returns EOF; otherwise, it returns some other, nonnegative value." - ensure("failed to write to test file '"+path+"'", fputs("test file", handle) >= 0); + ensure("failed to write to test file '"+path+"'", EOF != fputs("test file", handle) ); fclose(handle); return path; } @@ -290,7 +290,7 @@ namespace tut } static const char* DirScanFilename[5] = { "file1.abc", "file2.abc", "file1.xyz", "file2.xyz", "file1.mno" }; - + void scanTest(const std::string& directory, const std::string& pattern, bool correctResult[5]) { @@ -300,7 +300,8 @@ namespace tut bool filesFound[5] = { false, false, false, false, false }; //std::cerr << "searching '"+directory+"' for '"+pattern+"'\n"; - while ( found <= 5 && gDirUtilp->getNextFileInDir(directory, pattern, scanResult) ) + LLDirIterator iter(directory, pattern); + while ( found <= 5 && iter.next(scanResult) ) { found++; //std::cerr << " found '"+scanResult+"'\n"; @@ -334,15 +335,15 @@ namespace tut template<> template<> void LLDirTest_object_t::test<5>() - // getNextFileInDir + // LLDirIterator::next { std::string delim = gDirUtilp->getDirDelimiter(); std::string dirTemp = LLFile::tmpdir(); // Create the same 5 file names of the two directories - std::string dir1 = makeTestDir(dirTemp + "getNextFileInDir"); - std::string dir2 = makeTestDir(dirTemp + "getNextFileInDir"); + std::string dir1 = makeTestDir(dirTemp + "LLDirIterator"); + std::string dir2 = makeTestDir(dirTemp + "LLDirIterator"); std::string dir1files[5]; std::string dir2files[5]; for (int i=0; i<5; i++) @@ -380,19 +381,17 @@ namespace tut scanTest(dir2, "file?.x?z", expected7); // Scan dir2 and see if any file?.??c files are found - // THESE FAIL ON Mac and Windows, SO ARE COMMENTED OUT FOR NOW - // bool expected8[5] = { true, true, false, false, false }; - // scanTest(dir2, "file?.??c", expected8); - // scanTest(dir2, "*.??c", expected8); + bool expected8[5] = { true, true, false, false, false }; + scanTest(dir2, "file?.??c", expected8); + scanTest(dir2, "*.??c", expected8); // Scan dir1 and see if any *.?n? files are found bool expected9[5] = { false, false, false, false, true }; scanTest(dir1, "*.?n?", expected9); // Scan dir1 and see if any *.???? files are found - // THIS ONE FAILS ON WINDOWS (returns three charater suffixes) SO IS COMMENTED OUT FOR NOW - // bool expected10[5] = { false, false, false, false, false }; - // scanTest(dir1, "*.????", expected10); + bool expected10[5] = { false, false, false, false, false }; + scanTest(dir1, "*.????", expected10); // Scan dir1 and see if any ?????.* files are found bool expected11[5] = { true, true, true, true, true }; @@ -402,6 +401,15 @@ namespace tut bool expected12[5] = { false, false, true, true, false }; scanTest(dir1, "??l??.xyz", expected12); + bool expected13[5] = { true, false, true, false, false }; + scanTest(dir1, "file1.{abc,xyz}", expected13); + + bool expected14[5] = { true, true, false, false, false }; + scanTest(dir1, "file[0-9].abc", expected14); + + bool expected15[5] = { true, true, false, false, false }; + scanTest(dir1, "file[!a-z].abc", expected15); + // clean up all test files and directories for (int i=0; i<5; i++) { diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index affd7276cc..cb2abc5bc0 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -108,9 +108,6 @@ static long getDictLong (CFDictionaryRef refDict, CFStringRef key); static EventTypeSpec WindowHandlerEventList[] = { // Window-related events - // { kEventClassWindow, kEventWindowCollapsing }, - // { kEventClassWindow, kEventWindowCollapsed }, - // { kEventClassWindow, kEventWindowShown }, { kEventClassWindow, kEventWindowActivated }, { kEventClassWindow, kEventWindowDeactivated }, { kEventClassWindow, kEventWindowShown }, @@ -121,8 +118,7 @@ static EventTypeSpec WindowHandlerEventList[] = { kEventClassWindow, kEventWindowClose }, { kEventClassWindow, kEventWindowBoundsChanging }, { kEventClassWindow, kEventWindowBoundsChanged }, - // { kEventClassWindow, kEventWindowZoomed }, - // { kEventClassWindow, kEventWindowDrawContent }, + { kEventClassWindow, kEventWindowGetIdealSize }, // Mouse events { kEventClassMouse, kEventMouseDown }, @@ -248,6 +244,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, mCursorIgnoreNextDelta = FALSE; mNeedsResize = FALSE; mOverrideAspectRatio = 0.f; + mMaximized = FALSE; mMinimized = FALSE; mTSMDocument = NULL; // Just in case. mLanguageTextInputAllowed = FALSE; @@ -455,24 +452,23 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits if(!mFullscreen && (mWindow == NULL)) { - Rect window_rect; //int displayWidth = CGDisplayPixelsWide(mDisplay); //int displayHeight = CGDisplayPixelsHigh(mDisplay); //const int menuBarPlusTitleBar = 44; // Ugly magic number. LL_DEBUGS("Window") << "createContext: creating window" << LL_ENDL; - window_rect.left = (long) x; - window_rect.right = (long) x + width; - window_rect.top = (long) y; - window_rect.bottom = (long) y + height; + mPreviousWindowRect.left = (long) x; + mPreviousWindowRect.right = (long) x + width; + mPreviousWindowRect.top = (long) y; + mPreviousWindowRect.bottom = (long) y + height; //----------------------------------------------------------------------- // Create the window //----------------------------------------------------------------------- mWindow = NewCWindow( NULL, - &window_rect, + &mPreviousWindowRect, mWindowTitle, false, // Create the window invisible. Whoever calls createContext() should show it after any moving/resizing. // noGrowDocProc, // Window with no grow box and no zoom box @@ -481,8 +477,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits kFirstWindowOfClass, true, (long)this); - - + if (!mWindow) { setupFailure("Window creation error", "Error", OSMB_OK); @@ -541,20 +536,20 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits GLint fullscreenAttrib[] = { AGL_RGBA, - AGL_FULLSCREEN, - // AGL_NO_RECOVERY, // MBW -- XXX -- Not sure if we want this attribute - AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, - AGL_SAMPLES_ARB, mFSAASamples, - AGL_DOUBLEBUFFER, - AGL_CLOSEST_POLICY, - AGL_ACCELERATED, - AGL_RED_SIZE, 8, - AGL_GREEN_SIZE, 8, - AGL_BLUE_SIZE, 8, - AGL_ALPHA_SIZE, 8, - AGL_DEPTH_SIZE, 24, - AGL_STENCIL_SIZE, 8, - AGL_NONE + AGL_FULLSCREEN, + AGL_NO_RECOVERY, + AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, + AGL_SAMPLES_ARB, mFSAASamples, + AGL_DOUBLEBUFFER, + AGL_CLOSEST_POLICY, + AGL_ACCELERATED, + AGL_RED_SIZE, 8, + AGL_GREEN_SIZE, 8, + AGL_BLUE_SIZE, 8, + AGL_ALPHA_SIZE, 8, + AGL_DEPTH_SIZE, 24, + AGL_STENCIL_SIZE, 8, + AGL_NONE }; LL_DEBUGS("Window") << "createContext: creating fullscreen pixelformat" << LL_ENDL; @@ -567,21 +562,28 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits } else { + // NOTE from Leslie: + // + // AGL_NO_RECOVERY, when combined with AGL_ACCELERATED prevents software rendering + // fallback which means we won't hvae shaders that compile and link but then don't + // work. The drawback is that our shader compilation will be a bit more finicky though. + GLint windowedAttrib[] = { AGL_RGBA, - AGL_DOUBLEBUFFER, - AGL_CLOSEST_POLICY, - AGL_ACCELERATED, - AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, - AGL_SAMPLES_ARB, mFSAASamples, - AGL_RED_SIZE, 8, - AGL_GREEN_SIZE, 8, - AGL_BLUE_SIZE, 8, - AGL_ALPHA_SIZE, 8, - AGL_DEPTH_SIZE, 24, - AGL_STENCIL_SIZE, 8, - AGL_NONE + AGL_NO_RECOVERY, + AGL_DOUBLEBUFFER, + AGL_CLOSEST_POLICY, + AGL_ACCELERATED, + AGL_SAMPLE_BUFFERS_ARB, mFSAASamples > 0 ? 1 : 0, + AGL_SAMPLES_ARB, mFSAASamples, + AGL_RED_SIZE, 8, + AGL_GREEN_SIZE, 8, + AGL_BLUE_SIZE, 8, + AGL_ALPHA_SIZE, 8, + AGL_DEPTH_SIZE, 24, + AGL_STENCIL_SIZE, 8, + AGL_NONE }; LL_DEBUGS("Window") << "createContext: creating windowed pixelformat" << LL_ENDL; @@ -1093,31 +1095,22 @@ BOOL LLWindowMacOSX::getVisible() BOOL LLWindowMacOSX::getMinimized() { - BOOL result = FALSE; - - // Since the set of states where we want to act "minimized" is non-trivial, it's easier to - // track things locally than to try and retrieve the state from the window manager. - result = mMinimized; - - return(result); + return mMinimized; } BOOL LLWindowMacOSX::getMaximized() { - BOOL result = FALSE; - - if (mWindow) - { - // TODO - } - - return(result); + return mMaximized; } BOOL LLWindowMacOSX::maximize() { - // TODO - return FALSE; + if (mWindow && !mMaximized) + { + ZoomWindow(mWindow, inContent, true); + } + + return mMaximized; } BOOL LLWindowMacOSX::getFullscreen() @@ -2559,7 +2552,24 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, ¤tBounds); GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &previousBounds); - + + // Put an offset into window un-maximize operation since the kEventWindowGetIdealSize + // event only allows the specification of size and not position. + if (mMaximized) + { + short leftOffset = mPreviousWindowRect.left - currentBounds.left; + currentBounds.left += leftOffset; + currentBounds.right += leftOffset; + + short topOffset = mPreviousWindowRect.top - currentBounds.top; + currentBounds.top += topOffset; + currentBounds.bottom += topOffset; + } + else + { + // Store off the size for future un-maximize operations + mPreviousWindowRect = previousBounds; + } if ((currentBounds.right - currentBounds.left) < MIN_WIDTH) { @@ -2578,13 +2588,43 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e case kEventWindowBoundsChanged: { + // Get new window bounds Rect newBounds; - GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &newBounds); + + // Get previous window bounds + Rect oldBounds; + GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &oldBounds); + + // Determine if the new size is larger than the old + bool newBoundsLarger = ((newBounds.right - newBounds.left) >= (oldBounds.right - oldBounds.left)); + newBoundsLarger &= ((newBounds.bottom - newBounds.top) >= (oldBounds.bottom - oldBounds.top)); + + // Check to see if this is a zoom event (+ button on window pane) + unsigned int eventParams; + GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(int), NULL, &eventParams); + bool isZoomEvent = ((eventParams & kWindowBoundsChangeZoom) != 0); + + // Maximized flag is if zoom event and increasing window size + mMaximized = (isZoomEvent && newBoundsLarger); + aglUpdateContext(mContext); + mCallbacks->handleResize(this, newBounds.right - newBounds.left, newBounds.bottom - newBounds.top); - - + } + break; + + case kEventWindowGetIdealSize: + // Only recommend a new ideal size when un-maximizing + if (mMaximized == TRUE) + { + Point nonMaximizedSize; + + nonMaximizedSize.v = mPreviousWindowRect.bottom - mPreviousWindowRect.top; + nonMaximizedSize.h = mPreviousWindowRect.right - mPreviousWindowRect.left; + + SetEventParameter(event, kEventParamDimensions, typeQDPoint, sizeof(Point), &nonMaximizedSize); + result = noErr; } break; diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 6dc093b4be..6c9e075a21 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -156,7 +156,6 @@ protected: static pascal Boolean staticMoveEventComparator( EventRef event, void* data); OSStatus eventHandler (EventHandlerCallRef myHandler, EventRef event); void adjustCursorDecouple(bool warpingMouse = false); - void fixWindowSize(void); void stopDockTileBounce(); static MASK modifiersToMask(SInt16 modifiers); @@ -182,6 +181,7 @@ protected: EventComparatorUPP mMoveEventCampartorUPP; Rect mOldMouseClip; // Screen rect to which the mouse cursor was globally constrained before we changed it in clipMouse() + Rect mPreviousWindowRect; // Save previous window for un-maximize event Str255 mWindowTitle; double mOriginalAspectRatio; BOOL mSimulatedRightClick; @@ -195,6 +195,7 @@ protected: BOOL mNeedsResize; // Constructor figured out the window is too big, it needs a resize. LLCoordScreen mNeedsResizeSize; F32 mOverrideAspectRatio; + BOOL mMaximized; BOOL mMinimized; U32 mFSAASamples; BOOL mForceRebuild; diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 6e4364a20d..0809d95628 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -837,9 +837,7 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values, bool save_values) { - std::string name; LLSD settings; - LLSD control_map; llifstream infile; infile.open(filename); if(!infile.is_open()) @@ -863,8 +861,8 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr) { bool persist = true; - name = (*itr).first; - control_map = (*itr).second; + std::string const & name = itr->first; + LLSD const & control_map = itr->second; if(control_map.has("Persist")) { diff --git a/indra/llxuixml/lltrans.cpp b/indra/llxuixml/lltrans.cpp index e13d73c640..b403b86048 100644 --- a/indra/llxuixml/lltrans.cpp +++ b/indra/llxuixml/lltrans.cpp @@ -30,6 +30,7 @@ #include "llfasttimer.h" // for call count statistics #include "llxuiparser.h" +#include "llxmlnode.h" #include <map> diff --git a/indra/llxuixml/lltrans.h b/indra/llxuixml/lltrans.h index 5b127b53cf..b7091f77e8 100644 --- a/indra/llxuixml/lltrans.h +++ b/indra/llxuixml/lltrans.h @@ -29,8 +29,10 @@ #include <map> +#include "llpointer.h" #include "llstring.h" -#include "llxmlnode.h" + +class LLXMLNode; /** * @brief String template loaded from strings.xml @@ -61,9 +63,9 @@ public: * @param default_args Set of strings (expected to be in the file) to use as default replacement args, e.g. "SECOND_LIFE" * @returns true if the file was parsed successfully, true if something went wrong */ - static bool parseStrings(LLXMLNodePtr& root, const std::set<std::string>& default_args); + static bool parseStrings(LLPointer<LLXMLNode> & root, const std::set<std::string>& default_args); - static bool parseLanguageStrings(LLXMLNodePtr &root); + static bool parseLanguageStrings(LLPointer<LLXMLNode> & root); /** * @brief Returns a translated string diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h index 7a748d8aea..0c38c4da93 100644 --- a/indra/llxuixml/llxuiparser.h +++ b/indra/llxuixml/llxuiparser.h @@ -28,7 +28,6 @@ #define LLXUIPARSER_H #include "llinitparam.h" -#include "llfasttimer.h" #include "llregistry.h" #include "llpointer.h" @@ -95,6 +94,7 @@ public: }; +class LLXUIParserImpl; class LLXUIParser : public LLInitParam::Parser { @@ -176,6 +176,7 @@ private: // ordering of child elements from base file to localized diff file. Then we can use a pair // of coroutines to perform matching of xml nodes during parsing. Not sure if the overhead // of coroutines would offset the gain from SAX parsing +class LLSimpleXUIParserImpl; class LLSimpleXUIParser : public LLInitParam::Parser { diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1d155add51..2ecce0ebd3 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -222,6 +222,7 @@ set(viewer_SOURCE_FILES llfloatersettingsdebug.cpp llfloatersidetraytab.cpp llfloatersnapshot.cpp + llfloatersounddevices.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp llfloatertestlistview.cpp @@ -771,6 +772,7 @@ set(viewer_HEADER_FILES llfloatersettingsdebug.h llfloatersidetraytab.h llfloatersnapshot.h + llfloatersounddevices.h llfloatertelehub.h llfloatertestinspectors.h llfloatertestlistview.h diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml index f1862f9d72..5bc2e1b7e6 100644 --- a/indra/newview/app_settings/high_graphics.xml +++ b/indra/newview/app_settings/high_graphics.xml @@ -4,15 +4,15 @@ <RenderAvatarCloth value="FALSE"/> <!--Default for now--> <RenderAvatarLODFactor value="1.0"/> - <!--Default for now--> - <RenderAvatarPhysicsLODFactor value="0.9"/> + <!--Default for now--> + <RenderAvatarPhysicsLODFactor value="0.9"/> <!--NO SHADERS--> <RenderAvatarVP value="TRUE"/> <!--Short Range--> <RenderFarClip value="128"/> <!--Default for now--> <RenderFlexTimeFactor value="1"/> - <!--256... but they don't use this--> + <!--256... but they do not use this--> <RenderGlowResolutionPow value="9"/> <!--Low number--> <RenderMaxPartCount value="4096"/> @@ -34,11 +34,10 @@ <VertexShaderEnable value="TRUE"/> <!--NO SHADERS--> <WindLightUseAtmosShaders value="TRUE"/> - <!--Deferred Shading--> - <RenderDeferred value="FALSE"/> - <!--SSAO Disabled--> - <RenderDeferredSSAO value="FALSE"/> - <!--Sun Shadows--> - <RenderShadowDetail value="0"/> - + <!--Deferred Shading--> + <RenderDeferred value="FALSE"/> + <!--SSAO Disabled--> + <RenderDeferredSSAO value="FALSE"/> + <!--Sun Shadows--> + <RenderShadowDetail value="0"/> </settings> diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml index ad0073dfac..ca1dae0b86 100644 --- a/indra/newview/app_settings/low_graphics.xml +++ b/indra/newview/app_settings/low_graphics.xml @@ -4,17 +4,17 @@ <RenderAvatarCloth value="FALSE"/> <!--Default for now--> <RenderAvatarLODFactor value="0.5"/> - <!--Default for now--> - <RenderAvatarPhysicsLODFactor value="0.0"/> - <!--Default for now--> - <RenderAvatarMaxVisible value="3"/> + <!--Default for now--> + <RenderAvatarPhysicsLODFactor value="0.0"/> + <!--Default for now--> + <RenderAvatarMaxVisible value="3"/> <!--NO SHADERS--> <RenderAvatarVP value="FALSE"/> <!--Short Range--> <RenderFarClip value="64"/> <!--Default for now--> <RenderFlexTimeFactor value="0.5"/> - <!--256... but they don't use this--> + <!--256... but they do not use this--> <RenderGlowResolutionPow value="8"/> <!--Low number--> <RenderMaxPartCount value="1024"/> @@ -36,11 +36,10 @@ <VertexShaderEnable value="FALSE"/> <!--NO SHADERS--> <WindLightUseAtmosShaders value="FALSE"/> - <!--No Deferred Shading--> - <RenderDeferred value="FALSE"/> - <!--SSAO Disabled--> - <RenderDeferredSSAO value="FALSE"/> - <!--No Shadows--> - <RenderShadowDetail value="0"/> - + <!--No Deferred Shading--> + <RenderDeferred value="FALSE"/> + <!--SSAO Disabled--> + <RenderDeferredSSAO value="FALSE"/> + <!--No Shadows--> + <RenderShadowDetail value="0"/> </settings> diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml index 6c4afbd7f0..01822fe64c 100644 --- a/indra/newview/app_settings/mid_graphics.xml +++ b/indra/newview/app_settings/mid_graphics.xml @@ -4,15 +4,15 @@ <RenderAvatarCloth value="FALSE"/> <!--Default for now--> <RenderAvatarLODFactor value="0.5"/> - <!--Default for now--> - <RenderAvatarPhysicsLODFactor value="0.75"/> + <!--Default for now--> + <RenderAvatarPhysicsLODFactor value="0.75"/> <!--NO SHADERS--> <RenderAvatarVP value="TRUE"/> <!--Short Range--> <RenderFarClip value="96"/> <!--Default for now--> <RenderFlexTimeFactor value="1"/> - <!--256... but they don't use this--> + <!--256... but they do not use this--> <RenderGlowResolutionPow value="8"/> <!--Low number--> <RenderMaxPartCount value="2048"/> @@ -34,11 +34,10 @@ <VertexShaderEnable value="TRUE"/> <!--NO SHADERS--> <WindLightUseAtmosShaders value="FALSE"/> - <!--No Deferred Shading--> - <RenderDeferred value="FALSE"/> - <!--SSAO Disabled--> - <RenderDeferredSSAO value="FALSE"/> - <!--No Shadows--> - <RenderShadowDetail value="0"/> - + <!--No Deferred Shading--> + <RenderDeferred value="FALSE"/> + <!--SSAO Disabled--> + <RenderDeferredSSAO value="FALSE"/> + <!--No Shadows--> + <RenderShadowDetail value="0"/> </settings> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c4af9e2ab6..78db307d64 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4356,6 +4356,39 @@ <key>Value</key> <real>0.25</real> </map> + <key>Jpeg2000AdvancedCompression</key> + <map> + <key>Comment</key> + <string>Use advanced Jpeg2000 compression options (precincts, blocks, ordering, markers)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>Jpeg2000PrecinctsSize</key> + <map> + <key>Comment</key> + <string>Size of image precincts. Assumed square and same for all levels. Must be power of 2.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>256</integer> + </map> + <key>Jpeg2000BlocksSize</key> + <map> + <key>Comment</key> + <string>Size of encoding blocks. Assumed square and same for all levels. Must be power of 2. Max 64, Min 4.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>64</integer> + </map> <key>KeepAspectForSnapshot</key> <map> <key>Comment</key> @@ -5545,6 +5578,17 @@ <key>Value</key> <real>0</real> </map> + <key>MeshUseWholeModelUpload</key> + <map> + <key>Comment</key> + <string>Upload model in its entirety instead of mesh-by-mesh (new caps)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <real>0</real> + </map> <key>MigrateCacheDirectory</key> <map> <key>Comment</key> @@ -12100,10 +12144,10 @@ <key>Value</key> <integer>0</integer> </map> - <key>VoiceCallsRejectAll</key> + <key>VoiceCallsRejectGroup</key> <map> <key>Comment</key> - <string>Silently reject all incoming voice calls.</string> + <string>Silently reject all incoming group voice calls.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -12995,6 +13039,17 @@ <string>Boolean</string> <key>Value</key> <integer>1</integer> + </map> + <key>EnablePlaceProfile</key> + <map> + <key>Comment</key> + <string>Enable viewing of place profile from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> </map> <key>EnablePicks</key> <map> @@ -13161,5 +13216,27 @@ <key>Value</key> <integer>0</integer> </map> + <key>OpenIMOnVoice</key> + <map> + <key>Comment</key> + <string>Open the corresponding IM window when connecting to a voice call.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>AllowBottomTrayButtonReordering</key> + <map> + <key>Comment</key> + <string>Allow user to move and hide bottom tray buttons</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/settings_minimal.xml b/indra/newview/app_settings/settings_minimal.xml index bc97ec00e9..70a75cb4ca 100644 --- a/indra/newview/app_settings/settings_minimal.xml +++ b/indra/newview/app_settings/settings_minimal.xml @@ -45,15 +45,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>EnableVoiceChat</key> - <map> - <key>Comment</key> - <string>Enable talking to other residents with a microphone</string> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>HelpURLFormat</key> <map> <key>Comment</key> @@ -117,10 +108,10 @@ <key>Value</key> <integer>0</integer> </map> - <key>VoiceCallsRejectAll</key> + <key>VoiceCallsRejectGroup</key> <map> <key>Comment</key> - <string>Silently reject all incoming voice calls.</string> + <string>Silently reject all incoming group voice calls.</string> <key>Type</key> <string>Boolean</string> <key>Value</key> @@ -133,7 +124,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>ScriptsCanShowUI</key> <map> @@ -248,6 +239,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>EnablePlaceProfile</key> + <map> + <key>Comment</key> + <string>Enable viewing of place profile from web link</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>EnablePicks</key> <map> <key>Comment</key> @@ -290,7 +292,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>EnableAvatarShare</key> <map> @@ -435,5 +437,27 @@ <key>Value</key> <integer>0</integer> </map> + <key>OpenIMOnVoice</key> + <map> + <key>Comment</key> + <string>Open the corresponding IM window when connecting to a voice call.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>AllowBottomTrayButtonReordering</key> + <map> + <key>Comment</key> + <string>Allow user to move and hide bottom tray buttons</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 8efec1cff0..ff24efaf2c 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -44,6 +44,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>LastPostcardRecipient</key> + <map> + <key>Comment</key> + <string>Last recipient of postcard</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string /> + </map> <key>LogNearbyChat</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaF.glsl deleted file mode 100644 index 7d9d6cc0b2..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaF.glsl +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file avatarAlphaF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - -#version 120 - -uniform sampler2D diffuseMap; -uniform sampler2DShadow shadowMap0; -uniform sampler2DShadow shadowMap1; -uniform sampler2DShadow shadowMap2; -uniform sampler2DShadow shadowMap3; -uniform sampler2D noiseMap; - -uniform mat4 shadow_matrix[6]; -uniform vec4 shadow_clip; - -vec3 atmosLighting(vec3 light); -vec3 scaleSoftClip(vec3 light); - -varying vec3 vary_ambient; -varying vec3 vary_directional; -varying vec4 vary_position; -varying vec3 vary_normal; - -void main() -{ - float shadow = 1.0; - vec4 pos = vary_position; - vec3 norm = normalize(vary_normal); - - vec3 nz = texture2D(noiseMap, gl_FragCoord.xy/128.0).xyz; - - if (pos.z > -shadow_clip.w) - { - - if (pos.z < -shadow_clip.z) - { - vec4 lpos = shadow_matrix[3]*pos; - shadow = shadow2DProj(shadowMap3, lpos).x; - } - else if (pos.z < -shadow_clip.y) - { - vec4 lpos = shadow_matrix[2]*pos; - shadow = shadow2DProj(shadowMap2, lpos).x; - } - else if (pos.z < -shadow_clip.x) - { - vec4 lpos = shadow_matrix[1]*pos; - shadow = shadow2DProj(shadowMap1, lpos).x; - } - else - { - vec4 lpos = shadow_matrix[0]*pos; - shadow = shadow2DProj(shadowMap0, lpos).x; - } - } - - - vec4 col = vec4(vary_ambient + vary_directional*shadow, gl_Color.a); - vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * col; - - color.rgb = atmosLighting(color.rgb); - - color.rgb = scaleSoftClip(color.rgb); - - gl_FragColor = color; -} diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl index 5dfbb91393..a2a7dea20d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl @@ -22,11 +22,36 @@ vec3 scaleUpLight(vec3 light); varying vec3 vary_position; varying vec3 vary_ambient; varying vec3 vary_directional; -varying vec3 vary_normal; varying vec3 vary_fragcoord; +varying vec3 vary_pointlight_col; uniform float near_clip; +float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, 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 dist2 = d*d/(la*la); + float da = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 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; +} + void main() { gl_TexCoord[0] = gl_MultiTexCoord0; @@ -49,7 +74,6 @@ void main() gl_Position = frag_pos; vary_position = pos.xyz; - vary_normal = norm; calcAtmospherics(pos.xyz); @@ -57,18 +81,20 @@ void main() vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a); - // Collect normal lights (need to be divided by two, as we later multiply by 2) - col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].specular.a); - col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].specular.a); - col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].specular.a); - col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].specular.a); - col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].specular.a); - col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].specular.a); - col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz); - col.rgb = scaleDownLight(col.rgb); + // Collect normal lights + col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a); + col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a); + col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a); + col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a); + col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a); + col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a); + vary_pointlight_col = col.rgb*gl_Color.rgb; + + col.rgb = vec3(0,0,0); + // Add windlight lights - col.rgb += atmosAmbient(vec3(0.)); + col.rgb = atmosAmbient(vec3(0.)); vary_ambient = col.rgb*gl_Color.rgb; vary_directional = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a))); diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl new file mode 100644 index 0000000000..2e3e84dd15 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightV.glsl @@ -0,0 +1,20 @@ +/** + * @file multiPointLightV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $/LicenseInfo$ + */ + +#version 120 + +varying vec4 vary_fragcoord; + +void main() +{ + //transform vertex + vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex; + vary_fragcoord = pos; + + gl_Position = pos; + gl_FrontColor = gl_Color; +} diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl index 25ff958107..cd91351ad4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunLightSSAOF.glsl @@ -15,8 +15,6 @@ uniform sampler2DRect depthMap; uniform sampler2DRect normalMap; uniform sampler2D noiseMap; -uniform sampler2D lightFunc; - // Inputs uniform mat4 shadow_matrix[6]; diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaF.glsl deleted file mode 100644 index 4671a54078..0000000000 --- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaF.glsl +++ /dev/null @@ -1,100 +0,0 @@ -/** - * @file avatarAlphaF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * $/LicenseInfo$ - */ - -#version 120 - -#extension GL_ARB_texture_rectangle : enable - -uniform sampler2D diffuseMap; -uniform sampler2DRectShadow shadowMap0; -uniform sampler2DRectShadow shadowMap1; -uniform sampler2DRectShadow shadowMap2; -uniform sampler2DRectShadow shadowMap3; -uniform sampler2D noiseMap; - -uniform mat4 shadow_matrix[6]; -uniform vec4 shadow_clip; -uniform vec2 screen_res; -uniform vec2 shadow_res; - -vec3 atmosLighting(vec3 light); -vec3 scaleSoftClip(vec3 light); - -varying vec3 vary_ambient; -varying vec3 vary_directional; -varying vec3 vary_position; -varying vec3 vary_normal; - -uniform float shadow_bias; - -float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) -{ - stc.xyz /= stc.w; - stc.z += shadow_bias; - - float cs = shadow2DRect(shadowMap, stc.xyz).x; - float shadow = cs; - - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(scl, -scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, scl, 0.0)).x, cs); - shadow += max(shadow2DRect(shadowMap, stc.xyz+vec3(-scl, -scl, 0.0)).x, cs); - - return shadow/5.0; -} - -void main() -{ - float shadow = 1.0; - vec4 pos = vec4(vary_position, 1.0); - vec3 norm = normalize(vary_normal); - - //vec3 nz = texture2D(noiseMap, gl_FragCoord.xy/128.0).xyz; - - vec4 spos = pos; - - if (spos.z > -shadow_clip.w) - { - vec4 lpos; - - if (spos.z < -shadow_clip.z) - { - lpos = shadow_matrix[3]*spos; - lpos.xy *= shadow_res; - shadow = pcfShadow(shadowMap3, lpos, 1.5); - shadow += max((pos.z+shadow_clip.z)/(shadow_clip.z-shadow_clip.w)*2.0-1.0, 0.0); - } - else if (spos.z < -shadow_clip.y) - { - lpos = shadow_matrix[2]*spos; - lpos.xy *= shadow_res; - shadow = pcfShadow(shadowMap2, lpos, 1.5); - } - else if (spos.z < -shadow_clip.x) - { - lpos = shadow_matrix[1]*spos; - lpos.xy *= shadow_res; - shadow = pcfShadow(shadowMap1, lpos, 1.5); - } - else - { - lpos = shadow_matrix[0]*spos; - lpos.xy *= shadow_res; - shadow = pcfShadow(shadowMap0, lpos, 1.5); - } - } - - - vec4 col = vec4(vary_ambient + vary_directional*shadow, gl_Color.a); - vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * col; - - color.rgb = atmosLighting(color.rgb); - - color.rgb = scaleSoftClip(color.rgb); - - gl_FragColor = color; -} diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl index 30954a8677..495e86c8db 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl @@ -22,13 +22,38 @@ vec3 scaleUpLight(vec3 light); varying vec3 vary_position; varying vec3 vary_ambient; varying vec3 vary_directional; -varying vec3 vary_normal; varying vec3 vary_fragcoord; +varying vec3 vary_pointlight_col; uniform float near_clip; uniform float shadow_offset; uniform float shadow_bias; +float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, 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 dist2 = d*d/(la*la); + float da = clamp(1.0-(dist2-1.0*(1.0-fa))/fa, 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; +} + void main() { gl_TexCoord[0] = gl_MultiTexCoord0; @@ -51,7 +76,6 @@ void main() float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz)); vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset; - vary_normal = norm; calcAtmospherics(pos.xyz); @@ -59,18 +83,20 @@ void main() vec4 col = vec4(0.0, 0.0, 0.0, gl_Color.a); - // Collect normal lights (need to be divided by two, as we later multiply by 2) - col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].specular.a); - col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].specular.a); - col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].specular.a); - col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].specular.a); - col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].specular.a); - col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].specular.a); - col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz); - col.rgb = scaleDownLight(col.rgb); + // Collect normal lights + col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[2].position, gl_LightSource[2].spotDirection.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].specular.a); + col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[3].position, gl_LightSource[3].spotDirection.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation ,gl_LightSource[3].specular.a); + col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[4].position, gl_LightSource[4].spotDirection.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].specular.a); + col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[5].position, gl_LightSource[5].spotDirection.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation, gl_LightSource[5].specular.a); + col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[6].position, gl_LightSource[6].spotDirection.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation, gl_LightSource[6].specular.a); + col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLightOrSpotLight(pos.xyz, norm, gl_LightSource[7].position, gl_LightSource[7].spotDirection.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation, gl_LightSource[7].specular.a); + vary_pointlight_col = col.rgb*gl_Color.rgb; + + col.rgb = vec3(0,0,0); + // Add windlight lights - col.rgb += atmosAmbient(vec3(0.)); + col.rgb = atmosAmbient(vec3(0.)); vary_ambient = col.rgb*gl_Color.rgb; vary_directional = gl_Color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, gl_LightSource[0].position.xyz), (1.0-gl_Color.a)*(1.0-gl_Color.a))); diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index 26bc83e0d4..4369b3b34f 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -19,9 +19,6 @@ uniform sampler2DRectShadow shadowMap2; uniform sampler2DRectShadow shadowMap3; uniform sampler2DShadow shadowMap4; uniform sampler2DShadow shadowMap5; -uniform sampler2D noiseMap; - -uniform sampler2D lightFunc; // Inputs diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index 08b16d787f..847b36b1ac 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -21,8 +21,6 @@ uniform sampler2DShadow shadowMap4; uniform sampler2DShadow shadowMap5; uniform sampler2D noiseMap; -uniform sampler2D lightFunc; - // Inputs uniform mat4 shadow_matrix[6]; uniform vec4 shadow_clip; diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml index 3d588cf57d..71459e5470 100644 --- a/indra/newview/app_settings/ultra_graphics.xml +++ b/indra/newview/app_settings/ultra_graphics.xml @@ -4,15 +4,15 @@ <RenderAvatarCloth value="TRUE"/> <!--Default for now--> <RenderAvatarLODFactor value="1.0"/> - <!--Default for now--> - <RenderAvatarPhysicsLODFactor value="1.0"/> + <!--Default for now--> + <RenderAvatarPhysicsLODFactor value="1.0"/> <!--NO SHADERS--> <RenderAvatarVP value="TRUE"/> <!--Short Range--> <RenderFarClip value="256"/> <!--Default for now--> <RenderFlexTimeFactor value="1"/> - <!--256... but they don't use this--> + <!--256... but they do not use this--> <RenderGlowResolutionPow value="9"/> <!--Low number--> <RenderMaxPartCount value="4096"/> @@ -34,11 +34,10 @@ <VertexShaderEnable value="TRUE"/> <!--NO SHADERS--> <WindLightUseAtmosShaders value="TRUE"/> - <!--Deferred Shading--> - <RenderDeferred value="TRUE"/> - <!--SSAO Enabled--> - <RenderDeferredSSAO value="TRUE"/> - <!--Full Shadows--> - <RenderShadowDetail value="2"/> - + <!--Deferred Shading--> + <RenderDeferred value="TRUE"/> + <!--SSAO Enabled--> + <RenderDeferredSSAO value="TRUE"/> + <!--Full Shadows--> + <RenderShadowDetail value="2"/> </settings> diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index ce15c4b8f7..5d6b10c047 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -11903,7 +11903,7 @@ render_pass="bump"> edit_group="physics_breasts_updown" value_default="0" value_min="0" - value_max="1"> + value_max="3"> <param_driver /> </param> <param @@ -11956,7 +11956,7 @@ render_pass="bump"> edit_group="physics_breasts_inout" value_default="0" value_min="0" - value_max="1"> + value_max="3"> <param_driver /> </param> <param @@ -12044,7 +12044,7 @@ render_pass="bump"> edit_group="physics_belly_updown" value_default="0" value_min="0" - value_max="1"> + value_max="3"> <param_driver /> </param> <param @@ -12130,7 +12130,7 @@ render_pass="bump"> edit_group="physics_butt_updown" value_default="0" value_min="0" - value_max="1"> + value_max="3"> <param_driver /> </param> <param @@ -12179,7 +12179,7 @@ render_pass="bump"> edit_group="physics_butt_leftright" value_default="0" value_min="0" - value_max="1"> + value_max="3"> <param_driver /> </param> <param @@ -12229,7 +12229,7 @@ render_pass="bump"> edit_group="physics_breasts_leftright" value_default="0" value_min="0" - value_max="1"> + value_max="3"> <param_driver /> </param> <param diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 6bdb1e1787..c075c660f3 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 22 +version 23 // NOTE: This is mostly identical to featuretable_mac.txt with a few differences // Should be combined into one table @@ -24,11 +24,11 @@ version 22 // list all RenderAnisotropic 1 0 -RenderAvatarCloth 0 0 +RenderAvatarCloth 1 1 RenderAvatarLODFactor 1 1.0 RenderAvatarPhysicsLODFactor 1 1.0 RenderAvatarMaxVisible 1 12 -RenderAvatarVP 1 0 +RenderAvatarVP 1 1 RenderCubeMap 1 1 RenderDelayVBUpdate 1 0 RenderFarClip 1 256 @@ -41,7 +41,7 @@ RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderNightBrightness 1 1.0 RenderObjectBump 1 1 -RenderReflectionDetail 1 3 +RenderReflectionDetail 1 4 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 RenderTransparentWater 1 1 @@ -49,23 +49,21 @@ RenderTreeLODFactor 1 1.0 RenderUseImpostors 1 1 RenderVBOEnable 1 1 RenderVolumeLODFactor 1 2.0 -RenderWaterReflections 1 1 +UseStartScreen 1 1 UseOcclusion 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 -RenderUseCleverUI 1 1 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 RenderTextureMemoryMultiple 1 0.5 -Disregard128DefaultDrawDistance 1 1 -Disregard96DefaultDrawDistance 1 1 +RenderShaderLightingMaxLevel 1 3 SkyUseClassicClouds 1 1 -WatchdogDisabled 1 1 RenderDeferred 1 1 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 - +WatchdogDisabled 1 1 +RenderUseStreamVBO 1 1 // // Low Graphics Settings @@ -90,15 +88,13 @@ RenderTransparentWater 1 0 RenderTreeLODFactor 1 0 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 0.5 -RenderWaterReflections 1 0 VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 SkyUseClassicClouds 1 0 RenderDeferred 1 0 RenderDeferredSSAO 1 0 -RenderShadowDetail 1 2 - +RenderShadowDetail 1 0 // // Mid Graphics Settings @@ -122,14 +118,12 @@ RenderTransparentWater 1 1 RenderTreeLODFactor 1 0.5 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 -RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 -RenderShadowDetail 1 2 - +RenderShadowDetail 1 0 // // High Graphics Settings (purty) @@ -153,7 +147,6 @@ RenderTransparentWater 1 1 RenderTreeLODFactor 1 0.5 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 1.125 -RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 @@ -161,7 +154,6 @@ RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 2 - // // Ultra graphics (REALLY PURTY!) // @@ -177,14 +169,13 @@ RenderGlowResolutionPow 1 9 RenderLocalLights 1 1 RenderMaxPartCount 1 8192 RenderObjectBump 1 1 -RenderReflectionDetail 1 3 +RenderReflectionDetail 1 4 RenderTerrainDetail 1 1 RenderTerrainLODFactor 1 2.0 RenderTransparentWater 1 1 RenderTreeLODFactor 1 1.0 RenderUseImpostors 1 1 RenderVolumeLODFactor 1 2.0 -RenderWaterReflections 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 @@ -192,7 +183,6 @@ RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 2 - // // Class Unknown Hardware (unknown) // @@ -229,9 +219,12 @@ RenderVBOEnable 1 1 list NoPixelShaders RenderAvatarVP 0 0 RenderAvatarCloth 0 0 -RenderWaterReflections 0 0 +RenderReflectionDetail 0 0 VertexShaderEnable 0 0 WindLightUseAtmosShaders 0 0 +RenderDeferred 0 0 +RenderDeferredSSAO 0 0 +RenderShadowDetail 0 0 // // No Vertex Shaders available @@ -239,10 +232,14 @@ WindLightUseAtmosShaders 0 0 list NoVertexShaders RenderAvatarVP 0 0 RenderAvatarCloth 0 0 -RenderWaterReflections 0 0 +RenderReflectionDetail 0 0 VertexShaderEnable 0 0 WindLightUseAtmosShaders 0 0 +RenderDeferred 0 0 +RenderDeferredSSAO 0 0 +RenderShadowDetail 0 0 +// // "Default" setups for safe, low, medium, high // list safe @@ -255,8 +252,11 @@ RenderMaxPartCount 1 1024 RenderTerrainDetail 1 0 RenderUseImpostors 0 0 RenderVBOEnable 1 0 -RenderWaterReflections 0 0 +RenderReflectionDetail 0 0 WindLightUseAtmosShaders 0 0 +RenderDeferred 0 0 +RenderDeferredSSAO 0 0 +RenderShadowDetail 0 0 // // CPU based feature masks @@ -278,6 +278,9 @@ RenderObjectBump 0 0 list OpenGLPre15 RenderVBOEnable 1 0 +list TexUnit8orLess +RenderDeferredSSAO 0 0 + list Intel RenderAnisotropic 1 0 RenderLocalLights 1 0 diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index 08fb67a0c8..3339172a1a 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -152,7 +152,7 @@ WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 -RenderShadowDetail 1 0 +RenderShadowDetail 1 2 // // Ultra graphics (REALLY PURTY!) @@ -181,7 +181,7 @@ WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 RenderDeferred 1 0 RenderDeferredSSAO 1 0 -RenderShadowDetail 1 0 +RenderShadowDetail 1 2 // // Class Unknown Hardware (unknown) diff --git a/indra/newview/licenses-mac.txt b/indra/newview/licenses-mac.txt index 1324fa1a86..af80bff5d9 100644 --- a/indra/newview/licenses-mac.txt +++ b/indra/newview/licenses-mac.txt @@ -315,516 +315,6 @@ This product includes cryptographic software written by Eric Young Hudson (tjh@cryptsoft.com). -=========== -Pth License -=========== - ____ _ _ - | _ \| |_| |__ ``Ian Fleming was a UNIX fan! - | |_) | __| '_ \ How do I know? Well, James Bond - | __/| |_| | | | had the (license to kill) number 007, - |_| \__|_| |_| i.e., he could execute anyone!'' - - GNU Pth - The GNU Portable Threads - - LICENSE - ======= - - 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; either version 2.1 of the - License, or (at your option) any later version. - - For some people, it is not clear, what is the real intention of the - author by using the GNU Lesser General Public License (LGPL) as the - distribution license for GNU Pth. This is, because the LGPL and the - GPL can be (and are often) interpreted very differently and some - interpretations seem to be not compatible with others. So an explicit - clarification for the use of the LGPL for GNU Pth from the authors - point of view might be useful. - - The author places this library under the LGPL to make sure that it - can be used both commercially and non-commercially provided that - modifications to the code base are always donated back to the official - code base under the same license conditions. Please keep in mind that - especially using this library in code not staying under the GPL or - the LGPL _is_ allowed and that any taint or license creap into code - that uses the library is not the authors intention. It is just the - case that _including_ this library into the source tree of other - applications is a little bit more inconvinient because of the LGPL. - But it has to be this way for good reasons. And keep in mind that - inconvinient doesn't mean not allowed or even impossible. - - Even if you want to use this library in some BSD-style licensed - packages, this _is_ possible as long as you are a little bit - carefully. Usually this means you have to make sure that the code is - still clearly separated into the source tree and that modifications to - this source area are done under the conditions of the LGPL. Read below - for more details on the conditions. Contact the author if you have - more questions. - - The license text of the GNU Lesser General Public License follows: - __________________________________________________________________________ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - ======================= Original SSLeay License ======================= diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f4023502f6..08d71fc8fc 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -25,10 +25,12 @@ */ #include "llviewerprecompiledheaders.h" + #include "llagent.h" #include "pipeline.h" +#include "llagentaccess.h" #include "llagentcamera.h" #include "llagentlistener.h" #include "llagentwearables.h" @@ -36,6 +38,7 @@ #include "llanimationstates.h" #include "llbottomtray.h" #include "llcallingcard.h" +#include "llcapabilitylistener.h" #include "llchannelmanager.h" #include "llconsole.h" #include "llfirstuse.h" @@ -55,13 +58,16 @@ #include "llpaneltopinfobar.h" #include "llparcel.h" #include "llrendersphere.h" +#include "llsdmessage.h" #include "llsdutil.h" #include "llsky.h" +#include "llslurl.h" #include "llsmoothstep.h" #include "llstartup.h" #include "llstatusbar.h" #include "llteleportflags.h" #include "lltool.h" +#include "lltoolpie.h" #include "lltoolmgr.h" #include "lltrans.h" #include "llurlentry.h" @@ -73,6 +79,7 @@ #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" #include "llviewerstats.h" +#include "llviewerwindow.h" #include "llvoavatarself.h" #include "llwindow.h" #include "llworld.h" @@ -171,7 +178,8 @@ LLAgent::LLAgent() : mbRunning(false), mbTeleportKeepsLookAt(false), - mAgentAccess(gSavedSettings), + mAgentAccess(new LLAgentAccess(gSavedSettings)), + mTeleportSourceSLURL(new LLSLURL), mTeleportState( TELEPORT_NONE ), mRegionp(NULL), @@ -208,7 +216,7 @@ LLAgent::LLAgent() : mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - mEffectColor(LLColor4(0.f, 1.f, 1.f, 1.f)), + mEffectColor(new LLUIColor(LLColor4(0.f, 1.f, 1.f, 1.f))), mHaveHomePosition(FALSE), mHomeRegionHandle( 0 ), @@ -250,7 +258,7 @@ void LLAgent::init() setFlying( gSavedSettings.getBOOL("FlyingAtExit") ); - mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); + *mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2)); gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2)); @@ -274,9 +282,16 @@ LLAgent::~LLAgent() cleanup(); delete mMouselookModeInSignal; + mMouselookModeInSignal = NULL; delete mMouselookModeOutSignal; + mMouselookModeOutSignal = NULL; - // *Note: this is where LLViewerCamera::getInstance() used to be deleted. + delete mAgentAccess; + mAgentAccess = NULL; + delete mEffectColor; + mEffectColor = NULL; + delete mTeleportSourceSLURL; + mTeleportSourceSLURL = NULL; } // Handle any actions that need to be performed when the main app gains focus @@ -559,6 +574,8 @@ void LLAgent::setFlying(BOOL fly) // static void LLAgent::toggleFlying() { + LLToolPie::instance().stopClickToWalk(); + BOOL fly = !gAgent.getFlying(); gAgent.mMoveTimer.reset(); @@ -2145,32 +2162,32 @@ void LLAgent::onAnimStop(const LLUUID& id) bool LLAgent::isGodlike() const { - return mAgentAccess.isGodlike(); + return mAgentAccess->isGodlike(); } bool LLAgent::isGodlikeWithoutAdminMenuFakery() const { - return mAgentAccess.isGodlikeWithoutAdminMenuFakery(); + return mAgentAccess->isGodlikeWithoutAdminMenuFakery(); } U8 LLAgent::getGodLevel() const { - return mAgentAccess.getGodLevel(); + return mAgentAccess->getGodLevel(); } bool LLAgent::wantsPGOnly() const { - return mAgentAccess.wantsPGOnly(); + return mAgentAccess->wantsPGOnly(); } bool LLAgent::canAccessMature() const { - return mAgentAccess.canAccessMature(); + return mAgentAccess->canAccessMature(); } bool LLAgent::canAccessAdult() const { - return mAgentAccess.canAccessAdult(); + return mAgentAccess->canAccessAdult(); } bool LLAgent::canAccessMaturityInRegion( U64 region_handle ) const @@ -2205,37 +2222,37 @@ bool LLAgent::canAccessMaturityAtGlobal( LLVector3d pos_global ) const bool LLAgent::prefersPG() const { - return mAgentAccess.prefersPG(); + return mAgentAccess->prefersPG(); } bool LLAgent::prefersMature() const { - return mAgentAccess.prefersMature(); + return mAgentAccess->prefersMature(); } bool LLAgent::prefersAdult() const { - return mAgentAccess.prefersAdult(); + return mAgentAccess->prefersAdult(); } bool LLAgent::isTeen() const { - return mAgentAccess.isTeen(); + return mAgentAccess->isTeen(); } bool LLAgent::isMature() const { - return mAgentAccess.isMature(); + return mAgentAccess->isMature(); } bool LLAgent::isAdult() const { - return mAgentAccess.isAdult(); + return mAgentAccess->isAdult(); } void LLAgent::setTeen(bool teen) { - mAgentAccess.setTeen(teen); + mAgentAccess->setTeen(teen); } //static @@ -2280,37 +2297,37 @@ bool LLAgent::sendMaturityPreferenceToServer(int preferredMaturity) BOOL LLAgent::getAdminOverride() const { - return mAgentAccess.getAdminOverride(); + return mAgentAccess->getAdminOverride(); } void LLAgent::setMaturity(char text) { - mAgentAccess.setMaturity(text); + mAgentAccess->setMaturity(text); } void LLAgent::setAdminOverride(BOOL b) { - mAgentAccess.setAdminOverride(b); + mAgentAccess->setAdminOverride(b); } void LLAgent::setGodLevel(U8 god_level) { - mAgentAccess.setGodLevel(god_level); + mAgentAccess->setGodLevel(god_level); } void LLAgent::setAOTransition() { - mAgentAccess.setTransition(); + mAgentAccess->setTransition(); } const LLAgentAccess& LLAgent::getAgentAccess() { - return mAgentAccess; + return *mAgentAccess; } bool LLAgent::validateMaturity(const LLSD& newvalue) { - return mAgentAccess.canSetMaturity(newvalue.asInteger()); + return mAgentAccess->canSetMaturity(newvalue.asInteger()); } void LLAgent::handleMaturity(const LLSD& newvalue) @@ -2642,12 +2659,12 @@ BOOL LLAgent::allowOperation(PermissionBit op, const LLColor4 &LLAgent::getEffectColor() { - return mEffectColor; + return *mEffectColor; } void LLAgent::setEffectColor(const LLColor4 &color) { - mEffectColor = color; + *mEffectColor = color; } void LLAgent::initOriginGlobal(const LLVector3d &origin_global) @@ -3475,7 +3492,7 @@ void LLAgent::setTeleportState(ETeleportState state) case TELEPORT_MOVING: // We're outa here. Save "back" slurl. - LLAgentUI::buildSLURL(mTeleportSourceSLURL); + LLAgentUI::buildSLURL(*mTeleportSourceSLURL); break; case TELEPORT_ARRIVING: @@ -3808,6 +3825,11 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename) }//end for (all message sets in xml file) } +const void LLAgent::getTeleportSourceSLURL(LLSLURL& slurl) const +{ + slurl = *mTeleportSourceSLURL; +} + void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& directory_visibility ) { gMessageSystem->newMessageFast(_PREHASH_UpdateUserInfo); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 896408c0dd..54c5649f97 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -29,15 +29,11 @@ #include "indra_constants.h" #include "llevent.h" // LLObservable base class -#include "llagentaccess.h" #include "llagentconstants.h" #include "llagentdata.h" // gAgentID, gAgentSessionID -#include "llcharacter.h" // LLAnimPauseRequest +#include "llcharacter.h" #include "llcoordframe.h" // for mFrameAgent -#include "llpointer.h" -#include "lluicolor.h" #include "llvoavatardefines.h" -#include "llslurl.h" #include <boost/signals2.hpp> @@ -56,6 +52,10 @@ class LLFriendObserver; class LLPickInfo; class LLViewerObject; class LLAgentDropGroupViewerNode; +class LLAgentAccess; +class LLSLURL; +class LLPauseRequestHandle; +class LLUIColor; //-------------------------------------------------------------------- // Types @@ -80,6 +80,8 @@ struct LLGroupData class LLAgentListener; +class LLAgentImpl; + //------------------------------------------------------------------------ // LLAgent //------------------------------------------------------------------------ @@ -420,7 +422,7 @@ private: camera_signal_t* mMouselookModeInSignal; camera_signal_t* mMouselookModeOutSignal; BOOL mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ? - LLAnimPauseRequest mPauseRequest; + LLPointer<LLPauseRequestHandle> mPauseRequest; BOOL mViewsPushed; // Keep track of whether or not we have pushed views /** Animation @@ -515,13 +517,13 @@ public: public: static void parseTeleportMessages(const std::string& xml_filename); - const void getTeleportSourceSLURL(LLSLURL& slurl) const { slurl = mTeleportSourceSLURL; } + const void getTeleportSourceSLURL(LLSLURL& slurl) const; public: // ! TODO ! Define ERROR and PROGRESS enums here instead of exposing the mappings. static std::map<std::string, std::string> sTeleportErrorMessages; static std::map<std::string, std::string> sTeleportProgressMessages; private: - LLSLURL mTeleportSourceSLURL; // SLURL where last TP began + LLSLURL * mTeleportSourceSLURL; // SLURL where last TP began //-------------------------------------------------------------------- // Teleport Actions @@ -580,7 +582,7 @@ public: // ! BACKWARDS COMPATIBILITY ! This function can go away after the AO transition (see llstartup.cpp). void setAOTransition(); private: - LLAgentAccess mAgentAccess; + LLAgentAccess * mAgentAccess; //-------------------------------------------------------------------- // God @@ -660,7 +662,7 @@ public: const LLColor4 &getEffectColor(); void setEffectColor(const LLColor4 &color); private: - LLUIColor mEffectColor; + LLUIColor * mEffectColor; /** Rendering ** ** diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index c6b5a0113f..80085dad9d 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -394,7 +394,9 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation LLVector3 object_extents; const LLVector4a* oe4 = object->mDrawable->getSpatialExtents(); - object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] ); + LLVector4a size; + size.setSub(oe4[1], oe4[0]); + object_extents.set( size[0], size[1], size[2] ); // make sure they object extents are non-zero object_extents.clamp(0.001f, F32_MAX); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e304729839..746d2480b8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -85,13 +85,14 @@ #include "lltextutil.h" #include "lllogininstance.h" #include "llprogressview.h" - +#include "llvocache.h" #include "llweb.h" #include "llsecondlifeurls.h" #include "llupdaterservice.h" // Linden library includes #include "llavatarnamecache.h" +#include "lldiriterator.h" #include "llimagej2c.h" #include "llmemory.h" #include "llprimitive.h" @@ -135,7 +136,6 @@ #include "lltoolmgr.h" #include "llassetstorage.h" #include "llpolymesh.h" -#include "llcachename.h" #include "llaudioengine.h" #include "llstreamingaudio.h" #include "llviewermenu.h" @@ -3479,7 +3479,9 @@ void LLAppViewer::migrateCacheDirectory() S32 file_count = 0; std::string file_name; std::string mask = delimiter + "*.*"; - while (gDirUtilp->getNextFileInDir(old_cache_dir, mask, file_name)) + + LLDirIterator iter(old_cache_dir, mask); + while (iter.next(file_name)) { if (file_name == "." || file_name == "..") continue; std::string source_path = old_cache_dir + delimiter + file_name; @@ -3700,7 +3702,8 @@ bool LLAppViewer::initCache() dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""); std::string found_file; - if (gDirUtilp->getNextFileInDir(dir, mask, found_file)) + LLDirIterator iter(dir, mask); + if (iter.next(found_file)) { old_vfs_data_file = dir + gDirUtilp->getDirDelimiter() + found_file; diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 523c2e3adf..714e0e6163 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -30,6 +30,7 @@ #include "llcommandlineparser.h" +#include "lldiriterator.h" #include "llmemtype.h" #include "llurldispatcher.h" // SLURL from other app instance #include "llviewernetwork.h" @@ -504,7 +505,9 @@ std::string LLAppViewerLinux::generateSerialNumber() // trawl /dev/disk/by-uuid looking for a good-looking UUID to grab std::string this_name; - while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name)) + + LLDirIterator iter(uuiddir, "*"); + while (iter.next(this_name)) { if (this_name.length() > best.length() || (this_name.length() == best.length() && diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index b6482e0ec4..f51552aae5 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -218,7 +218,7 @@ LLBottomTray::LLBottomTray(const LLSD&) mLandingTab(NULL), mCheckForDrag(false) { - // Firstly add ourself to IMSession observers, so we catch session events + // Firstly add our self to IMSession observers, so we catch session events // before chiclets do that. LLIMMgr::getInstance()->addSessionObserver(this); @@ -378,12 +378,13 @@ void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, b } // We have to enable/disable right and left parts of speak button separately (EXT-4648) - mSpeakBtn->setSpeakBtnEnabled(enable); + getChild<LLButton>("speak_btn")->setEnabled(enable); + // skipped to avoid button blinking if (status != STATUS_JOINING && status!= STATUS_LEFT_CHANNEL) { bool voice_status = LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking(); - mSpeakBtn->setFlyoutBtnEnabled(voice_status); + getChild<LLButton>("speak_flyout_btn")->setEnabled(voice_status); if (voice_status) { LLFirstUse::speak(true); @@ -546,17 +547,27 @@ BOOL LLBottomTray::postBuild() setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4)); mSpeakPanel = getChild<LLPanel>("speak_panel"); - mSpeakBtn = getChild<LLSpeakButton>("talk"); - LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); + mSpeakBtn = findChild<LLSpeakButton>("talk"); + if (mSpeakBtn) + { + LLHints::registerHintTarget("speak_btn", mSpeakBtn->getHandle()); + + // Localization tool doesn't understand custom buttons like <talk_button> + mSpeakBtn->setSpeakToolTip( getString("SpeakBtnToolTip") ); + mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") ); + } + else + { + LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("speak_btn")); + LLTransientFloaterMgr::getInstance()->addControlView(getChild<LLButton>("flyout_btn")); + } + // Both parts of speak button should be initially disabled because // it takes some time between logging in to world and connecting to voice channel. - mSpeakBtn->setSpeakBtnEnabled(false); - mSpeakBtn->setFlyoutBtnEnabled(false); + getChild<LLButton>("speak_btn")->setEnabled(false); + getChild<LLButton>("speak_flyout_btn")->setEnabled(false); - // Localization tool doesn't understand custom buttons like <talk_button> - mSpeakBtn->setSpeakToolTip( getString("SpeakBtnToolTip") ); - mSpeakBtn->setShowToolTip( getString("VoiceControlBtnToolTip") ); // Registering Chat Bar to receive Voice client status change notifications. LLVoiceClient::getInstance()->addObserver(this); @@ -740,6 +751,8 @@ void LLBottomTray::updateButtonsOrdersAfterDnD() void LLBottomTray::saveButtonsOrder() { + if (!gSavedSettings.getBOOL("AllowBottomTrayButtonReordering")) return; + std::string user_dir = gDirUtilp->getLindenUserDir(); if (user_dir.empty()) return; @@ -760,6 +773,8 @@ void LLBottomTray::saveButtonsOrder() void LLBottomTray::loadButtonsOrder() { + if (!gSavedSettings.getBOOL("AllowBottomTrayButtonReordering")) return; + // load per-resident sorting information std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); @@ -852,6 +867,10 @@ void LLBottomTray::draw() getChild<LLButton>("show_help_btn")->setToggleState(help_floater_visible); + bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); + bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); + getChild<LLButton>("speak_btn")->setToggleState(openmic && voiceenabled); + getChild<LLOutputMonitorCtrl>("chat_zone_indicator")->setIsMuted(!voiceenabled); } @@ -1309,7 +1328,11 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ if (possible_shrink_width > 0) { - mSpeakBtn->setLabelVisible(false); + if (mSpeakBtn) + { + mSpeakBtn->setLabelVisible(false); + } + mSpeakPanel->reshape(panel_width - possible_shrink_width, mSpeakPanel->getRect().getHeight()); required_width += possible_shrink_width; @@ -1435,7 +1458,7 @@ bool LLBottomTray::processExtendSpeakButton(S32& available_width) } // Reshape the Speak button to its maximum width. - mSpeakBtn->setLabelVisible(true); + if (mSpeakBtn) mSpeakBtn->setLabelVisible(true); mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); available_width -= required_headroom; @@ -1510,21 +1533,35 @@ void LLBottomTray::initResizeStateContainers() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_DESTINATIONS, getChild<LLPanel>("destinations_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_AVATARS, getChild<LLPanel>("avatar_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild<LLPanel>("mini_map_btn_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_1, getChild<LLPanel>("splitter_panel_1"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PEOPLE, getChild<LLPanel>("people_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PROFILE, getChild<LLPanel>("profile_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_2, getChild<LLPanel>("splitter_panel_2"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_HOWTO, getChild<LLPanel>("howto_panel"))); // init an order of processed buttons - mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); - mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); - mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); + mButtonsProcessOrder.push_back(RS_BUTTON_DESTINATIONS); + mButtonsProcessOrder.push_back(RS_BUTTON_AVATARS); mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT); mButtonsProcessOrder.push_back(RS_BUTTON_BUILD); mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH); mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP); mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP); + mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_1); + mButtonsProcessOrder.push_back(RS_BUTTON_PEOPLE); + mButtonsProcessOrder.push_back(RS_BUTTON_PROFILE); + mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_2); + mButtonsProcessOrder.push_back(RS_BUTTON_HOWTO); + mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT); + mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA); + mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES); mButtonsOrder.push_back(RS_BUTTON_SPEAK); mButtonsOrder.insert(mButtonsOrder.end(), mButtonsProcessOrder.begin(), mButtonsProcessOrder.end()); @@ -1554,7 +1591,7 @@ void LLBottomTray::initResizeStateContainers() // because it resets chatbar's width according to resize logic. void LLBottomTray::initButtonsVisibility() { - setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat")); + setVisibleAndFitWidths(RS_BUTTON_SPEAK, gSavedSettings.getBOOL("EnableVoiceChat") || !mSpeakBtn ); setVisibleAndFitWidths(RS_BUTTON_GESTURES, gSavedSettings.getBOOL("ShowGestureButton")); setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton")); setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton")); @@ -1568,7 +1605,12 @@ void LLBottomTray::initButtonsVisibility() void LLBottomTray::setButtonsControlsAndListeners() { - gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); + // always show the speak panel if using the basic skin + if (mSpeakBtn) + { + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SPEAK, _2)); + } + gSavedSettings.getControl("ShowGestureButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_GESTURES, _2)); gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2)); gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2)); @@ -1857,26 +1899,36 @@ S32 LLBottomTray::getChicletPanelShrinkHeadroom() const // static std::string LLBottomTray::resizeStateToString(EResizeState state) { + const char *rs_string = "UNKNOWN_BUTTON"; + switch (state) { - case RS_NORESIZE: return "RS_NORESIZE"; - case RS_CHICLET_PANEL: return "RS_CHICLET_PANEL"; - case RS_CHATBAR_INPUT: return "RS_CHATBAR_INPUT"; - case RS_BUTTON_SNAPSHOT: return "RS_BUTTON_SNAPSHOT"; - case RS_BUTTON_CAMERA: return "RS_BUTTON_CAMERA"; - case RS_BUTTON_MOVEMENT: return "RS_BUTTON_MOVEMENT"; - case RS_BUTTON_GESTURES: return "RS_BUTTON_GESTURES"; - case RS_BUTTON_SPEAK: return "RS_BUTTON_SPEAK"; - case RS_IM_WELL: return "RS_IM_WELL"; - case RS_NOTIFICATION_WELL: return "RS_NOTIFICATION_WELL"; - case RS_BUTTON_BUILD: return "RS_BUTTON_BUILD"; - case RS_BUTTON_SEARCH: return "RS_BUTTON_SEARCH"; - case RS_BUTTON_WORLD_MAP: return "RS_BUTTON_WORLD_MAP"; - case RS_BUTTON_MINI_MAP: return "RS_BUTTON_MINI_MAP"; - case RS_BUTTONS_CAN_BE_HIDDEN: return "RS_BUTTONS_CAN_BE_HIDDEN"; - // No default to track additions. - } - return "UNKNOWN_BUTTON"; + case RS_NORESIZE: rs_string = "RS_NORESIZE"; break; + case RS_CHICLET_PANEL: rs_string = "RS_CHICLET_PANEL"; break; + case RS_CHATBAR_INPUT: rs_string = "RS_CHATBAR_INPUT"; break; + case RS_BUTTON_SNAPSHOT: rs_string = "RS_BUTTON_SNAPSHOT"; break; + case RS_BUTTON_CAMERA: rs_string = "RS_BUTTON_CAMERA"; break; + case RS_BUTTON_MOVEMENT: rs_string = "RS_BUTTON_MOVEMENT"; break; + case RS_BUTTON_GESTURES: rs_string = "RS_BUTTON_GESTURES"; break; + case RS_BUTTON_SPEAK: rs_string = "RS_BUTTON_SPEAK"; break; + case RS_IM_WELL: rs_string = "RS_IM_WELL"; break; + case RS_NOTIFICATION_WELL: rs_string = "RS_NOTIFICATION_WELL"; break; + case RS_BUTTON_BUILD: rs_string = "RS_BUTTON_BUILD"; break; + case RS_BUTTON_SEARCH: rs_string = "RS_BUTTON_SEARCH"; break; + case RS_BUTTON_WORLD_MAP: rs_string = "RS_BUTTON_WORLD_MAP"; break; + case RS_BUTTON_MINI_MAP: rs_string = "RS_BUTTON_MINI_MAP"; break; + case RS_BUTTON_DESTINATIONS: rs_string = "RS_BUTTON_DESTINATIONS"; break; + case RS_BUTTON_AVATARS: rs_string = "RS_BUTTON_AVATARS"; break; + case RS_BUTTON_PEOPLE: rs_string = "RS_BUTTON_PEOPLE"; break; + case RS_BUTTON_PROFILE: rs_string = "RS_BUTTON_PROFILE"; break; + case RS_BUTTON_HOWTO: rs_string = "RS_BUTTON_HOWTO"; break; + case RS_BUTTON_SPLITTER_1: rs_string = "RS_BUTTON_SPLITTER_1"; break; + case RS_BUTTON_SPLITTER_2: rs_string = "RS_BUTTON_SPLITTER_2"; break; + case RS_BUTTONS_CAN_BE_HIDDEN: rs_string = "RS_BUTTONS_CAN_BE_HIDDEN"; break; + // No default to track additions. + } + + return rs_string; } // static diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 52bcd2ddac..d9c95d82e5 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -140,22 +140,29 @@ public: private: - typedef enum e_resize_status_type + typedef enum e_resize_state { - RS_NORESIZE = 0x0000 - , RS_CHICLET_PANEL = 0x0001 - , RS_CHATBAR_INPUT = 0x0002 - , RS_BUTTON_SNAPSHOT = 0x0004 - , RS_BUTTON_CAMERA = 0x0008 - , RS_BUTTON_MOVEMENT = 0x0010 - , RS_BUTTON_GESTURES = 0x0020 - , RS_BUTTON_SPEAK = 0x0040 - , RS_IM_WELL = 0x0080 - , RS_NOTIFICATION_WELL = 0x0100 - , RS_BUTTON_BUILD = 0x0200 - , RS_BUTTON_SEARCH = 0x0400 - , RS_BUTTON_WORLD_MAP = 0x0800 - , RS_BUTTON_MINI_MAP = 0x1000 + RS_NORESIZE = 0x0000, + RS_CHICLET_PANEL = 0x0001, + RS_CHATBAR_INPUT = 0x0002, + RS_BUTTON_SNAPSHOT = 0x0004, + RS_BUTTON_CAMERA = 0x0008, + RS_BUTTON_MOVEMENT = 0x0010, + RS_BUTTON_GESTURES = 0x0020, + RS_BUTTON_SPEAK = 0x0040, + RS_IM_WELL = 0x0080, + RS_NOTIFICATION_WELL = 0x0100, + RS_BUTTON_BUILD = 0x0200, + RS_BUTTON_SEARCH = 0x0400, + RS_BUTTON_WORLD_MAP = 0x0800, + RS_BUTTON_MINI_MAP = 0x1000, + RS_BUTTON_DESTINATIONS = 0x2000, + RS_BUTTON_AVATARS = 0x4000, + RS_BUTTON_PEOPLE = 0x8000, + RS_BUTTON_PROFILE = 0x10000, + RS_BUTTON_HOWTO = 0x20000, + RS_BUTTON_SPLITTER_1 = 0x40000, + RS_BUTTON_SPLITTER_2 = 0x80000, /* Once new button that can be hidden on resize is added don't forget to update related places: @@ -166,10 +173,11 @@ private: /** * Specifies buttons which can be hidden when bottom tray is shrunk. * They are: Gestures, Movement (Move), Camera (View), Snapshot - * new: Build, Search, Map, World Map, Mini-Map. + * new: Build, Search, Map, World Map, Mini-Map, destinations, avatars */ - , RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES + RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES | RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP + | RS_BUTTON_DESTINATIONS | RS_BUTTON_AVATARS }EResizeState; // Below are three methods that were introduced to handle drag'n'drop diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 885d553524..3000209aad 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -483,8 +483,9 @@ void LLIMChiclet::setShowSpeaker(bool show) if(needs_resize) { mShowSpeaker = show; - toggleSpeakerControl(); } + + toggleSpeakerControl(); } void LLIMChiclet::enableCounterControl(bool enable) @@ -1183,6 +1184,10 @@ void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) if(chiclet) { chiclet->setShowSpeaker(true); + if (gSavedSettings.getBOOL("OpenIMOnVoice")) + { + LLIMFloater::show(chiclet->getSessionId()); + } } } diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 3f5cb4778e..29b50761d8 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -889,6 +889,11 @@ void LLBumpImageList::destroyGL() void LLBumpImageList::restoreGL() { + if(!gTextureList.isInitialized())
+ {
+ return ;
+ } + LLStandardBumpmap::restoreGL(); // Images will be recreated as they are needed. } diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp index 6b45c5abb0..030d6e1110 100644 --- a/indra/newview/lldrawpoolsky.cpp +++ b/indra/newview/lldrawpoolsky.cpp @@ -63,6 +63,8 @@ void LLDrawPoolSky::prerender() void LLDrawPoolSky::render(S32 pass) { + gGL.flush(); + if (mDrawFace.empty()) { return; @@ -111,13 +113,14 @@ void LLDrawPoolSky::render(S32 pass) S32 face_count = (S32)mDrawFace.size(); + LLVertexBuffer::unbind(); + glColor4f(1,1,1,1); + for (S32 i = 0; i < llmin(6, face_count); ++i) { renderSkyCubeFace(i); } - LLGLEnable blend(GL_BLEND); - glPopMatrix(); } diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h index 697a708762..3fee46c2f6 100644 --- a/indra/newview/lleventnotifier.h +++ b/indra/newview/lleventnotifier.h @@ -31,6 +31,7 @@ #include "v3dmath.h" class LLEventNotification; +class LLMessageSystem; class LLEventNotifier diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 9f0b34becc..524d2d74ef 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -753,6 +753,10 @@ void LLFeatureManager::applyBaseMasks() { maskFeatures("OpenGLPre30"); } + if (gGLManager.mNumTextureUnits <= 8) + { + maskFeatures("TexUnit8orLess"); + } // now mask by gpu string // Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 2c4153688a..a9f52282a5 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -131,7 +131,7 @@ void LLFirstUse::notMoving(bool enable) // static void LLFirstUse::viewPopup(bool enable) { - firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right")); +// firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right")); } // static diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 83105ef27c..50b19a4221 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -459,10 +459,18 @@ void LLFloaterBuyLandUI::updateParcelInfo() return; } - if (!authorizedBuyer.isNull() && buyer != authorizedBuyer) + if (!authorizedBuyer.isNull() && buyer != authorizedBuyer) { - mCannotBuyReason = getString("set_to_sell_to_other"); - return; + // Maybe the parcel is set for sale to a group we are in.
+ bool authorized_group =
+ gAgent.hasPowerInGroup(authorizedBuyer,GP_LAND_DEED)
+ && gAgent.hasPowerInGroup(authorizedBuyer,GP_LAND_SET_SALE_INFO);
+
+ if (!authorized_group)
+ {
+ mCannotBuyReason = getString("set_to_sell_to_other");
+ return;
+ } } } else diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 7be4ebc690..0d0c1f594d 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -38,6 +38,7 @@ #include "message.h" #include "llagent.h" +#include "llagentaccess.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index a096fb64cd..8a70fa24d8 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -43,11 +43,12 @@ class LLButton; class LLCheckBoxCtrl; class LLRadioGroup; class LLComboBox; -class LLNameListCtrl; -class LLSpinCtrl; class LLLineEditor; +class LLMessageSystem; +class LLNameListCtrl; class LLRadioGroup; class LLParcelSelectionObserver; +class LLSpinCtrl; class LLTabContainer; class LLTextBox; class LLTextEditor; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e8da1aa42c..241e908d8c 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2597,6 +2597,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) mLoading = false; mLoadState = LLModelLoader::STARTING; mGroup = 0; + mLODFrozen = false; mBuildShareTolerance = 0.f; mBuildQueueMode = GLOD_QUEUE_GREEDY; mBuildBorderMode = GLOD_BORDER_UNLOCK; @@ -2605,6 +2606,13 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) for (U32 i = 0; i < LLModel::NUM_LODS; ++i) { mRequestedTriangleCount[i] = 0; + mRequestedCreaseAngle[i] = -1.f; + mRequestedLoDMode[i] = 0; + mRequestedErrorThreshold[i] = 0.f; + mRequestedBuildOperator[i] = 0; + mRequestedQueueMode[i] = 0; + mRequestedBorderMode[i] = 0; + mRequestedShareTolerance[i] = 0.f; } mViewOption["show_textures"] = false; @@ -3247,6 +3255,8 @@ void LLModelPreview::generateNormals() F32 angle_cutoff = mFMP->childGetValue("crease_angle").asReal(); + mRequestedCreaseAngle[which_lod] = angle_cutoff; + angle_cutoff *= DEG_TO_RAD; if (which_lod == 3 && !mBaseModel.empty()) @@ -3266,7 +3276,7 @@ void LLModelPreview::generateNormals() mVertexBuffer[which_lod].clear(); refresh(); - + updateStatusMessages(); } void LLModelPreview::clearMaterials() @@ -3342,6 +3352,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim { lod_mode = iface->getFirstSelectedIndex(); } + mRequestedLoDMode[mPreviewLOD] = lod_mode; F32 lod_error_threshold = mFMP->childGetValue("lod_error_threshold").asReal(); @@ -3365,6 +3376,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim { build_operator = iface->getFirstSelectedIndex(); } + mRequestedBuildOperator[mPreviewLOD] = build_operator; if (build_operator == 0) { @@ -3381,6 +3393,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim { queue_mode = iface->getFirstSelectedIndex(); } + mRequestedQueueMode[mPreviewLOD] = queue_mode; if (queue_mode == 0) { @@ -3402,6 +3415,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim { border_mode = iface->getFirstSelectedIndex(); } + mRequestedBorderMode[mPreviewLOD] = border_mode; if (border_mode == 0) { @@ -3437,6 +3451,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim mBuildShareTolerance = share_tolerance; object_dirty = true; } + mRequestedShareTolerance[mPreviewLOD] = share_tolerance; if (mGroup == 0) { @@ -3545,6 +3560,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim U32 submeshes = 0; mRequestedTriangleCount[lod] = triangle_count; + mRequestedErrorThreshold[lod] = lod_error_threshold; glodGroupParameteri(mGroup, GLOD_ADAPT_MODE, lod_mode); stop_gloderror(); @@ -3832,6 +3848,18 @@ void LLModelPreview::updateStatusMessages() } } + + //make sure no hulls have more than 256 points in them + for (U32 i = 0; upload_ok && i < mModel[LLModel::LOD_PHYSICS].size(); ++i) + { + LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i]; + + for (U32 j = 0; upload_ok && j < mdl->mPhysics.mHull.size(); ++j) + { + upload_ok = upload_ok && mdl->mPhysics.mHull[i].size() <= 256; + } + } + bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false; bool skinAndRigOk = true; @@ -3855,6 +3883,10 @@ void LLModelPreview::updateStatusMessages() { mFMP->childEnable("ok_btn"); } + else + { + mFMP->childDisable("ok_btn"); + } //add up physics triangles etc S32 start = 0; @@ -4021,6 +4053,9 @@ void LLModelPreview::updateStatusMessages() { // auto generate, also the default case for wizard which has no radio selection fmp->mLODMode[mPreviewLOD] = 1; + //don't actually regenerate lod when refreshing UI + mLODFrozen = true; + for (U32 i = 0; i < num_file_controls; ++i) { mFMP->childDisable(file_controls[i]); @@ -4033,20 +4068,21 @@ void LLModelPreview::updateStatusMessages() //if (threshold) { - U32 lod_mode = 0; - LLCtrlSelectionInterface* iface = mFMP->childGetSelectionInterface("lod_mode"); - if (iface) - { - lod_mode = iface->getFirstSelectedIndex(); - } - LLSpinCtrl* threshold = mFMP->getChild<LLSpinCtrl>("lod_error_threshold"); LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit"); limit->setMaxValue(mMaxTriangleLimit); - limit->setValue(mRequestedTriangleCount[mPreviewLOD]); + limit->forceSetValue(mRequestedTriangleCount[mPreviewLOD]); - if (lod_mode == 0) + threshold->forceSetValue(mRequestedErrorThreshold[mPreviewLOD]); + + mFMP->getChild<LLComboBox>("lod_mode")->selectNthItem(mRequestedLoDMode[mPreviewLOD]); + mFMP->getChild<LLComboBox>("build_operator")->selectNthItem(mRequestedBuildOperator[mPreviewLOD]); + mFMP->getChild<LLComboBox>("queue_mode")->selectNthItem(mRequestedQueueMode[mPreviewLOD]); + mFMP->getChild<LLComboBox>("border_mode")->selectNthItem(mRequestedBorderMode[mPreviewLOD]); + mFMP->getChild<LLSpinCtrl>("share_tolerance")->setValue(mRequestedShareTolerance[mPreviewLOD]); + + if (mRequestedLoDMode[mPreviewLOD] == 0) { limit->setVisible(true); threshold->setVisible(false); @@ -4060,6 +4096,8 @@ void LLModelPreview::updateStatusMessages() threshold->setVisible(true); } } + + mLODFrozen = false; } } @@ -4075,6 +4113,20 @@ void LLModelPreview::updateStatusMessages() mFMP->childDisable("physics_file"); mFMP->childDisable("physics_browse"); } + + LLSpinCtrl* crease = mFMP->getChild<LLSpinCtrl>("crease_angle"); + + if (mRequestedCreaseAngle[mPreviewLOD] == -1.f) + { + mFMP->childSetColor("crease_label", LLColor4::grey); + crease->forceSetValue(75.f); + } + else + { + mFMP->childSetColor("crease_label", LLColor4::white); + crease->forceSetValue(mRequestedCreaseAngle[mPreviewLOD]); + } + } void LLModelPreview::setPreviewTarget(F32 distance) @@ -4925,9 +4977,12 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture void LLModelPreview::onLODParamCommit(bool enforce_tri_limit) { - genLODs(mPreviewLOD, 3, enforce_tri_limit); - updateStatusMessages(); - refresh(); + if (!mLODFrozen) + { + genLODs(mPreviewLOD, 3, enforce_tri_limit); + updateStatusMessages(); + refresh(); + } } LLFloaterModelPreview::DecompRequest::DecompRequest(const std::string& stage, LLModel* mdl) diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 4d8b46807f..b54a72e555 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -373,13 +373,20 @@ public: std::map<std::string, bool> mViewOption; //GLOD object parameters (must rebuild object if these change) + bool mLODFrozen; F32 mBuildShareTolerance; U32 mBuildQueueMode; U32 mBuildOperator; U32 mBuildBorderMode; + U32 mRequestedLoDMode[LLModel::NUM_LODS]; S32 mRequestedTriangleCount[LLModel::NUM_LODS]; + F32 mRequestedErrorThreshold[LLModel::NUM_LODS]; + U32 mRequestedBuildOperator[LLModel::NUM_LODS]; + U32 mRequestedQueueMode[LLModel::NUM_LODS]; + U32 mRequestedBorderMode[LLModel::NUM_LODS]; + F32 mRequestedShareTolerance[LLModel::NUM_LODS]; + F32 mRequestedCreaseAngle[LLModel::NUM_LODS]; - LLModelLoader* mModelLoader; LLModelLoader::scene mScene[LLModel::NUM_LODS]; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 18b7a48d7b..4b15695cbf 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -987,9 +987,15 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram"); // Avatar Render Mode LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth"); + + bool avatar_vp_enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP"); + if (LLViewerShaderMgr::sInitialized) + { + S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; + avatar_vp_enabled = (max_avatar_shader > 0) ? TRUE : FALSE; + } - S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; - ctrl_avatar_vp->setEnabled((max_avatar_shader > 0) ? TRUE : FALSE); + ctrl_avatar_vp->setEnabled(avatar_vp_enabled); if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE || gSavedSettings.getBOOL("RenderAvatarVP") == FALSE) @@ -1006,7 +1012,7 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders"); // radio set for terrain detail mode LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var - + ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")); BOOL shaders = ctrl_shader_enable->get(); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 34fda49375..fc6976755f 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -590,6 +590,11 @@ bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) getChildView("im_btn")->setEnabled(allow_modify); getChildView("manage_telehub_btn")->setEnabled(allow_modify); + const bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") && + gAgent.getRegion() && + !gAgent.getRegion()->getCapability("GetMesh").empty(); + getChildView("mesh_rez_enabled_check")->setVisible(enable_mesh); + getChildView("mesh_rez_enabled_check")->setEnabled(getChildView("mesh_rez_enabled_check")->getEnabled() && enable_mesh); // Data gets filled in by processRegionInfo return LLPanelRegionInfo::refreshFromRegion(region); diff --git a/indra/newview/llfloatersidetraytab.cpp b/indra/newview/llfloatersidetraytab.cpp index 94407e6da0..9f15e62d84 100644 --- a/indra/newview/llfloatersidetraytab.cpp +++ b/indra/newview/llfloatersidetraytab.cpp @@ -47,5 +47,6 @@ LLFloaterSideTrayTab::~LLFloaterSideTrayTab() void LLFloaterSideTrayTab::onClose(bool app_quitting) { - LLSideTray::getInstance()->setTabDocked(getName(), true); + // The floater is already being closed, so don't toggle it once more (that may crash viewer). + LLSideTray::getInstance()->setTabDocked(getName(), /* dock = */ true, /* toggle_floater = */ false); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index add591895b..00dc7b1627 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -53,6 +53,7 @@ #include "llfloaterpostcard.h" #include "llcheckboxctrl.h" #include "llradiogroup.h" +#include "llslurl.h" #include "lltoolfocus.h" #include "lltoolmgr.h" #include "llwebsharing.h" diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp new file mode 100644 index 0000000000..9fe7c7f9dd --- /dev/null +++ b/indra/newview/llfloatersounddevices.cpp @@ -0,0 +1,90 @@ +/** + * @file llfloatersounddevices.cpp + * @author Leyla Farazha + * @brief Sound Preferences used for minimal skin + * +* $LicenseInfo:firstyear=2011&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 "llfloatersounddevices.h" + +#include "llbottomtray.h" +#include "lldraghandle.h" + +#include "llpanelvoicedevicesettings.h" + +// Library includes +#include "indra_constants.h" + +// protected +LLFloaterSoundDevices::LLFloaterSoundDevices(const LLSD& key) +: LLTransientDockableFloater(NULL, false, key) +{ + LLTransientFloaterMgr::getInstance()->addControlView(this); + + // force docked state since this floater doesn't save it between recreations + setDocked(true); +} + +LLFloaterSoundDevices::~LLFloaterSoundDevices() +{ + LLTransientFloaterMgr::getInstance()->removeControlView(this); +} + +// virtual +BOOL LLFloaterSoundDevices::postBuild() +{ + LLTransientDockableFloater::postBuild(); + + LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("flyout_btn"); + setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP)); + + setIsChrome(TRUE); + if (mDragHandle) + mDragHandle->setTitleVisible(TRUE); + updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) + + LLPanelVoiceDeviceSettings* panel = findChild<LLPanelVoiceDeviceSettings>("device_settings_panel"); + if (panel) + { + panel->setUseTuningMode(false); + } + return TRUE; +} + +//virtual +void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/) +{ + LLTransientDockableFloater::setDocked(docked, pop_on_undock); +} + +// virtual +void LLFloaterSoundDevices::setFocus( BOOL b ) +{ + LLTransientDockableFloater::setFocus(b); + + // Force using active floater transparency + // We have to override setFocus() for because selecting an item of the + // combobox causes the floater to lose focus and thus become transparent. + updateTransparency(TT_ACTIVE); +} diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h new file mode 100644 index 0000000000..f09ee3b069 --- /dev/null +++ b/indra/newview/llfloatersounddevices.h @@ -0,0 +1,49 @@ +/** + * @file llfloatersounddevices.h + * @author Leyla Farazha + * @brief Sound Preferences used for minimal skin + * +* $LicenseInfo:firstyear=2011&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_LLFLOATERSOUNDDEVICES_H +#define LL_LLFLOATERSOUNDDEVICES_H + +#include "lltransientdockablefloater.h" + +class LLFloaterSoundDevices : public LLTransientDockableFloater +{ +public: + + LOG_CLASS(LLFloaterSoundDevices); + + LLFloaterSoundDevices(const LLSD& key); + ~LLFloaterSoundDevices(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + /*virtual*/ void setFocus( BOOL b ); +}; + + +#endif //LL_LLFLOATERSOUNDDEVICES_H + diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 0d8601410a..4c9c4cb154 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -35,6 +35,7 @@ #include "llfloateruipreview.h" // Own header // Internal utility +#include "lldiriterator.h" #include "lleventtimer.h" #include "llexternaleditor.h" #include "llrender.h" @@ -481,9 +482,11 @@ BOOL LLFloaterUIPreview::postBuild() std::string language_directory; std::string xui_dir = get_xui_dir(); // directory containing localizations -- don't forget trailing delim mLanguageSelection->removeall(); // clear out anything temporarily in list from XML + + LLDirIterator iter(xui_dir, "*"); while(found) // for every directory { - if((found = gDirUtilp->getNextFileInDir(xui_dir, "*", language_directory))) // get next directory + if((found = iter.next(language_directory))) // get next directory { std::string full_path = xui_dir + language_directory; if(LLFile::isfile(full_path.c_str())) // if it's not a directory, skip it @@ -635,42 +638,51 @@ void LLFloaterUIPreview::refreshList() mFileList->clearRows(); // empty list std::string name; BOOL found = TRUE; + + LLDirIterator floater_iter(getLocalizedDirectory(), "floater_*.xml"); while(found) // for every floater file that matches the pattern { - if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "floater_*.xml", name))) // get next file matching pattern + if((found = floater_iter.next(name))) // get next file matching pattern { addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } found = TRUE; + + LLDirIterator inspect_iter(getLocalizedDirectory(), "inspect_*.xml"); while(found) // for every inspector file that matches the pattern { - if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "inspect_*.xml", name))) // get next file matching pattern + if((found = inspect_iter.next(name))) // get next file matching pattern { addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } found = TRUE; + + LLDirIterator menu_iter(getLocalizedDirectory(), "menu_*.xml"); while(found) // for every menu file that matches the pattern { - if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "menu_*.xml", name))) // get next file matching pattern + if((found = menu_iter.next(name))) // get next file matching pattern { addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } found = TRUE; + + LLDirIterator panel_iter(getLocalizedDirectory(), "panel_*.xml"); while(found) // for every panel file that matches the pattern { - if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "panel_*.xml", name))) // get next file matching pattern + if((found = panel_iter.next(name))) // get next file matching pattern { addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } - found = TRUE; + + LLDirIterator sidepanel_iter(getLocalizedDirectory(), "sidepanel_*.xml"); while(found) // for every sidepanel file that matches the pattern { - if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "sidepanel_*.xml", name))) // get next file matching pattern + if((found = sidepanel_iter.next(name))) // get next file matching pattern { addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index b3b1ce5743..3884b94b60 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -301,18 +301,6 @@ BOOL LLFolderView::canFocusChildren() const return FALSE; } -void LLFolderView::checkTreeResortForModelChanged() -{ - if (mSortOrder & LLInventoryFilter::SO_DATE && !(mSortOrder & LLInventoryFilter::SO_FOLDERS_BY_NAME)) - { - // This is the case where something got added or removed. If we are date sorting - // everything including folders, then we need to rebuild the whole tree. - // Just set to something not SO_DATE to force the folder most resent date resort. - mSortOrder = mSortOrder & ~LLInventoryFilter::SO_DATE; - setSortOrder(mSortOrder | LLInventoryFilter::SO_DATE); - } -} - static LLFastTimer::DeclareTimer FTM_SORT("Sort Inventory"); void LLFolderView::setSortOrder(U32 order) diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 210ba9eb3c..1464a058d8 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -101,7 +101,6 @@ public: // FolderViews default to sort by name. This will change that, // and resort the items if necessary. void setSortOrder(U32 order); - void checkTreeResortForModelChanged(); void setFilterPermMask(PermissionMask filter_perm_mask); void setAllowMultiSelect(BOOL allow) { mAllowMultiSelect = allow; } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 3c36248c1f..e9d1ad3a9e 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1835,7 +1835,7 @@ void LLFolderViewFolder::sortBy(U32 order) return; } - // Propegate this change to sub folders + // Propagate this change to sub folders for (folders_t::iterator iter = mFolders.begin(); iter != mFolders.end();) { diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 2006e094a8..fc941510ab 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -28,6 +28,7 @@ #include "llview.h" #include "lldarray.h" // *TODO: Eliminate, forward declare +#include "lluiimage.h" class LLFontGL; class LLFolderView; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ec3fe48151..38c5ba71bd 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2696,10 +2696,10 @@ void LLIMMgr::inviteToSession( if (voice_invite) { - if ( // if we're rejecting all incoming call requests - gSavedSettings.getBOOL("VoiceCallsRejectAll") + if ( // if we are rejecting group calls + (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && notify_box_type == "VoiceInviteGroup") || // or we're rejecting non-friend voice calls and this isn't a friend - || (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)) + (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)) ) { // silently decline the call diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index f488b2ed1b..39e6f797a2 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -66,10 +66,13 @@ public: FILTERLINK_ONLY_LINKS // only show links }; - // REFACTOR: Change this to an enum. - static const U32 SO_DATE = 1; - static const U32 SO_FOLDERS_BY_NAME = 2; - static const U32 SO_SYSTEM_FOLDERS_TO_TOP = 4; + enum ESortOrderType + { + SO_NAME = 0, // Sort inventory by name + SO_DATE = 0x1, // Sort inventory by date + SO_FOLDERS_BY_NAME = 0x1 << 1, // Force folder sort by name + SO_SYSTEM_FOLDERS_TO_TOP = 0x1 << 2 // Force system folders to be on top + }; LLInventoryFilter(const std::string& name); virtual ~LLInventoryFilter(); diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h index 188fbf1f9b..9fef42c5df 100644 --- a/indra/newview/lllocationhistory.h +++ b/indra/newview/lllocationhistory.h @@ -33,6 +33,7 @@ #include <string> #include <map> #include <boost/function.hpp> +#include <boost/signals2.hpp> class LLSD; /** diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 2df683861a..efc4e23838 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -32,6 +32,7 @@ #include "lltrans.h" #include "llviewercontrol.h" +#include "lldiriterator.h" #include "llinstantmessage.h" #include "llsingleton.h" // for LLSingleton @@ -602,7 +603,8 @@ std::string LLLogChat::oldLogFileName(std::string filename) //LL_INFOS("") << "Checking:" << directory << " for " << pattern << LL_ENDL;/* uncomment if you want to verify step, delete on commit */ std::vector<std::string> allfiles; - while (gDirUtilp->getNextFileInDir(directory, pattern, scanResult)) + LLDirIterator iter(directory, pattern); + while (iter.next(scanResult)) { //LL_INFOS("") << "Found :" << scanResult << LL_ENDL; allfiles.push_back(scanResult); diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 5007f1c17a..b3ad9efeb2 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -68,7 +68,6 @@ LLMediaCtrl::Params::Params() : start_url("start_url"), border_visible("border_visible", true), ignore_ui_scale("ignore_ui_scale", true), - hide_loading("hide_loading", false), decouple_texture_size("decouple_texture_size", false), texture_width("texture_width", 1024), texture_height("texture_height", 1024), @@ -97,8 +96,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mCurrentNavUrl( "" ), mStretchToFill( true ), mMaintainAspectRatio ( true ), - mHideLoading (false), - mHidingInitialLoad (false), mDecoupleTextureSize ( false ), mTextureWidth ( 1024 ), mTextureHeight ( 1024 ), @@ -121,8 +118,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : setBorderVisible(p.border_visible); - mHideLoading = p.hide_loading; - setDecoupleTextureSize(p.decouple_texture_size); setTextureSize(p.texture_width, p.texture_height); @@ -684,11 +679,6 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->clearCache(); mClearCache = false; } - - if(mHideLoading) - { - mHidingInitialLoad = true; - } } else { @@ -756,11 +746,11 @@ void LLMediaCtrl::draw() } } - if(mHidingInitialLoad) - { - // If we're hiding loading, don't draw at all. - draw_media = false; - } +// if(mHidingInitialLoad) +// { +// // If we're hiding loading, don't draw at all. +// draw_media = false; +// } bool background_visible = isBackgroundVisible(); bool background_opaque = isBackgroundOpaque(); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index ff4b812cb0..f2f4586d6c 100644..100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -35,6 +35,7 @@ #include "llappviewer.h" #include "llbufferstream.h" #include "llcurl.h" +#include "lldatapacker.h" #include "llfasttimer.h" #include "llfloatermodelpreview.h" #include "llfloaterperms.h" @@ -58,6 +59,8 @@ #include "llworld.h" #include "material_codes.h" #include "pipeline.h" +#include "llinventorymodel.h" +#include "llfoldertype.h" #ifndef LL_WINDOWS #include "netdb.h" @@ -82,6 +85,8 @@ U32 LLMeshRepository::sPeakKbps = 0; const U32 MAX_TEXTURE_UPLOAD_RETRIES = 5; +void dumpLLSDToFile(const LLSD& content, std::string filename); + std::string header_lod[] = { "lowest_lod", @@ -478,6 +483,46 @@ public: } }; +class LLWholeModelFeeResponder: public LLCurl::Responder +{ + LLMeshUploadThread* mThread; +public: + LLWholeModelFeeResponder(LLMeshUploadThread* thread): + mThread(thread) + { + } + virtual void completed(U32 status, + const std::string& reason, + const LLSD& content) + { + //assert_main_thread(); + llinfos << "completed" << llendl; + mThread->mPendingUploads--; + dumpLLSDToFile(content,"whole_model_response.xml"); + + mThread->mWholeModelUploadURL = content["uploader"].asString(); + } +}; + +class LLWholeModelUploadResponder: public LLCurl::Responder +{ + LLMeshUploadThread* mThread; +public: + LLWholeModelUploadResponder(LLMeshUploadThread* thread): + mThread(thread) + { + } + virtual void completed(U32 status, + const std::string& reason, + const LLSD& content) + { + //assert_main_thread(); + llinfos << "upload completed" << llendl; + mThread->mPendingUploads--; + dumpLLSDToFile(content,"whole_model_upload_response.xml"); + } +}; + LLMeshRepoThread::LLMeshRepoThread() : LLThread("mesh repo", NULL) { @@ -1239,6 +1284,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, mUploadObjectAssetCapability = gAgent.getRegion()->getCapability("UploadObjectAsset"); mNewInventoryCapability = gAgent.getRegion()->getCapability("NewFileAgentInventoryVariablePrice"); + mWholeModelFeeCapability = gAgent.getRegion()->getCapability("NewFileAgentInventory"); mOrigin += gAgent.getAtAxis() * scale.magVec(); } @@ -1330,6 +1376,223 @@ BOOL LLMeshUploadThread::isDiscarded() void LLMeshUploadThread::run() { + if (gSavedSettings.getBOOL("MeshUseWholeModelUpload")) + { + doWholeModelUpload(); + } + else + { + doIterativeUpload(); + } +} + +#if 1 +void dumpLLSDToFile(const LLSD& content, std::string filename) +{ + std::ofstream of(filename.c_str()); + LLSDSerialize::toPrettyXML(content,of); +} +#endif + +void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) +{ + // TODO where do textures go? + + LLSD result; + + LLSD res; + result["folder_id"] = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); + result["asset_type"] = "mesh"; + result["inventory_type"] = "object"; + result["name"] = "your name here"; + result["description"] = "your description here"; + + // TODO "optional" fields from the spec + + res["mesh_list"] = LLSD::emptyArray(); +// TODO Textures + //res["texture_list"] = LLSD::emptyArray(); + S32 mesh_num = 0; + S32 texture_num = 0; + + std::set<LLViewerTexture* > textures; + + for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter) + { + LLMeshUploadData data; + data.mBaseModel = iter->first; + + LLModelInstance& instance = *(iter->second.begin()); + + for (S32 i = 0; i < 5; i++) + { + data.mModel[i] = instance.mLOD[i]; + } + + std::stringstream ostr; + + LLModel::Decomposition& decomp = + data.mModel[LLModel::LOD_PHYSICS].notNull() ? + data.mModel[LLModel::LOD_PHYSICS]->mPhysics : + data.mBaseModel->mPhysics; + + decomp.mBaseHull = mHullMap[data.mBaseModel]; + + LLSD mesh_header = LLModel::writeModel( + ostr, + data.mModel[LLModel::LOD_PHYSICS], + data.mModel[LLModel::LOD_HIGH], + data.mModel[LLModel::LOD_MEDIUM], + data.mModel[LLModel::LOD_LOW], + data.mModel[LLModel::LOD_IMPOSTOR], + decomp, + mUploadSkin, + mUploadJoints); + + data.mAssetData = ostr.str(); + + LLSD mesh_entry; + + LLVector3 pos, scale; + LLQuaternion rot; + LLMatrix4 transformation = instance.mTransform; + decomposeMeshMatrix(transformation,pos,rot,scale); + +#if 0 + mesh_entry["childpos"] = ll_sd_from_vector3(pos); + mesh_entry["childrot"] = ll_sd_from_quaternion(rot); + mesh_entry["scale"] = ll_sd_from_vector3(scale); +#endif + mesh_entry["position"] = ll_sd_from_vector3(LLVector3()); + mesh_entry["rotation"] = ll_sd_from_quaternion(rot); + mesh_entry["scale"] = ll_sd_from_vector3(scale); + + // TODO should be binary. + std::string str = ostr.str(); + mesh_entry["mesh_data"] = LLSD::Binary(str.begin(),str.end()); + + res["mesh_list"][mesh_num] = mesh_entry; + + // TODO how do textures in the list map to textures in the meshes? + if (mUploadTextures) + { + for (std::vector<LLImportMaterial>::iterator material_iter = instance.mMaterial.begin(); + material_iter != instance.mMaterial.end(); ++material_iter) + { + + if (textures.find(material_iter->mDiffuseMap.get()) == textures.end()) + { + textures.insert(material_iter->mDiffuseMap.get()); + + std::stringstream ostr; + if (include_textures) // otherwise data is blank. + { + LLTextureUploadData data(material_iter->mDiffuseMap.get(), material_iter->mDiffuseMapLabel); + if (!data.mTexture->isRawImageValid()) + { + data.mTexture->reloadRawImage(data.mTexture->getDiscardLevel()); + } + + LLPointer<LLImageJ2C> upload_file = + LLViewerTextureList::convertToUploadFile(data.mTexture->getRawImage()); + ostr.write((const char*) upload_file->getData(), upload_file->getDataSize()); + } + LLSD texture_entry; + texture_entry["texture_data"] = ostr.str(); + res["texture_list"][texture_num] = texture_entry; + texture_num++; + } + } + } + + mesh_num++; + } + + result["asset_resources"] = res; +#if 1 + dumpLLSDToFile(result,"whole_model.xml"); +#endif + + dest = result; +} + +void LLMeshUploadThread::doWholeModelUpload() +{ + mCurlRequest = new LLCurlRequest(); + + // Queue up models for hull generation (viewer-side) + for (instance_map::iterator iter = mInstance.begin(); iter != mInstance.end(); ++iter) + { + LLMeshUploadData data; + data.mBaseModel = iter->first; + + LLModelInstance& instance = *(iter->second.begin()); + + for (S32 i = 0; i < 5; i++) + { + data.mModel[i] = instance.mLOD[i]; + } + + //queue up models for hull generation + LLModel* physics = NULL; + + if (data.mModel[LLModel::LOD_PHYSICS].notNull()) + { + physics = data.mModel[LLModel::LOD_PHYSICS]; + } + else if (data.mModel[LLModel::LOD_MEDIUM].notNull()) + { + physics = data.mModel[LLModel::LOD_MEDIUM]; + } + else + { + physics = data.mModel[LLModel::LOD_HIGH]; + } + + if (!physics) + { + llerrs << "WTF?" << llendl; + } + + DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this); + gMeshRepo.mDecompThread->submitRequest(request); + } + + while (!mPhysicsComplete) + { + apr_sleep(100); + } + + bool do_include_textures = false; // not needed for initial cost/validation check. + LLSD model_data; + wholeModelToLLSD(model_data, do_include_textures); + + mPendingUploads++; + LLCurlRequest::headers_t headers; + mCurlRequest->post(mWholeModelFeeCapability, headers, model_data, + new LLWholeModelFeeResponder(this)); + + do + { + mCurlRequest->process(); + } while (mCurlRequest->getQueued() > 0); + + mCurlRequest->post(mWholeModelUploadURL, headers, model_data["asset_resources"], new LLWholeModelUploadResponder(this)); + + do + { + mCurlRequest->process(); + } while (mCurlRequest->getQueued() > 0); + + delete mCurlRequest; + mCurlRequest = NULL; + + // Currently a no-op. + mFinished = true; +} + +void LLMeshUploadThread::doIterativeUpload() +{ if(isDiscarded()) { mFinished = true; @@ -2767,6 +3030,47 @@ void LLMeshUploadThread::createObjects(LLMeshUploadData& data) } } +void LLMeshUploadThread::decomposeMeshMatrix(LLMatrix4& transformation, + LLVector3& result_pos, + LLQuaternion& result_rot, + LLVector3& result_scale) +{ + // check for reflection + BOOL reflected = (transformation.determinant() < 0); + + // compute position + LLVector3 position = LLVector3(0, 0, 0) * transformation; + + // compute scale + LLVector3 x_transformed = LLVector3(1, 0, 0) * transformation - position; + LLVector3 y_transformed = LLVector3(0, 1, 0) * transformation - position; + LLVector3 z_transformed = LLVector3(0, 0, 1) * transformation - position; + F32 x_length = x_transformed.normalize(); + F32 y_length = y_transformed.normalize(); + F32 z_length = z_transformed.normalize(); + LLVector3 scale = LLVector3(x_length, y_length, z_length); + + // adjust for "reflected" geometry + LLVector3 x_transformed_reflected = x_transformed; + if (reflected) + { + x_transformed_reflected *= -1.0; + } + + // compute rotation + LLMatrix3 rotation_matrix; + rotation_matrix.setRows(x_transformed_reflected, y_transformed, z_transformed); + LLQuaternion quat_rotation = rotation_matrix.quaternion(); + quat_rotation.normalize(); // the rotation_matrix might not have been orthoginal. make it so here. + LLVector3 euler_rotation; + quat_rotation.getEulerAngles(&euler_rotation.mV[VX], &euler_rotation.mV[VY], &euler_rotation.mV[VZ]); + + result_pos = position + mOrigin; + result_scale = scale; + result_rot = quat_rotation; +} + + LLSD LLMeshUploadThread::createObject(LLModelInstance& instance) { LLMatrix4 transformation = instance.mTransform; diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 5983a282a2..f859e29c07 100644..100755 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -387,6 +387,8 @@ public: LLHost mHost; std::string mUploadObjectAssetCapability; std::string mNewInventoryCapability; + std::string mWholeModelFeeCapability; + std::string mWholeModelUploadURL; std::queue<LLMeshUploadData> mUploadQ; std::queue<LLMeshUploadData> mConfirmedQ; @@ -420,6 +422,16 @@ public: void preStart(); void discard() ; BOOL isDiscarded(); + + void doWholeModelUpload(); + void doIterativeUpload(); + + void wholeModelToLLSD(LLSD& dest, bool include_textures); + + void decomposeMeshMatrix(LLMatrix4& transformation, + LLVector3& result_pos, + LLQuaternion& result_rot, + LLVector3& result_scale); }; class LLMeshRepository diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 026803584d..2d23753d46 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -31,6 +31,7 @@ #include "llview.h" #include "llmutelist.h" #include "llspeakingindicatormanager.h" +#include "lluiimage.h" class LLTextBox; class LLUICtrlFactory; diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 73c4722b82..d58a1cb663 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -36,6 +36,7 @@ #include "llimview.h" #include "llmenubutton.h" #include "llnotificationsutil.h" +#include "llslurl.h" #include "lltexteditor.h" #include "lltexturectrl.h" #include "lltoggleablemenu.h" diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index ec340dc258..1576ccccdf 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -44,6 +44,7 @@ #include "llnotificationsutil.h" #include "llscrolllistitem.h" #include "llspinctrl.h" +#include "llslurl.h" #include "lltextbox.h" #include "lltexteditor.h" #include "lltexturectrl.h" diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 3dbc637318..fbe331c7ab 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -42,6 +42,7 @@ #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llscrolllistcell.h" +#include "llslurl.h" #include "lltabcontainer.h" #include "lltextbox.h" #include "lltexteditor.h" diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ab031a9dc3..d0810d0772 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -101,58 +101,6 @@ public: } }; -LLLoginRefreshHandler gLoginRefreshHandler; - - -// helper class that trys to download a URL from a web site and calls a method -// on parent class indicating if the web server is working or not -class LLIamHereLogin : public LLHTTPClient::Responder -{ - private: - LLIamHereLogin( LLPanelLogin* parent ) : - mParent( parent ) - {} - - LLPanelLogin* mParent; - - public: - static boost::intrusive_ptr< LLIamHereLogin > build( LLPanelLogin* parent ) - { - return boost::intrusive_ptr< LLIamHereLogin >( new LLIamHereLogin( parent ) ); - }; - - virtual void setParent( LLPanelLogin* parentIn ) - { - mParent = parentIn; - }; - - // We don't actually expect LLSD back, so need to override completedRaw - virtual void completedRaw(U32 status, const std::string& reason, - const LLChannelDescriptors& channels, - const LLIOPipe::buffer_ptr_t& buffer) - { - completed(status, reason, LLSD()); // will call result() or error() - } - - virtual void result( const LLSD& content ) - { - if ( mParent ) - mParent->setSiteIsAlive( true ); - }; - - virtual void error( U32 status, const std::string& reason ) - { - if ( mParent ) - mParent->setSiteIsAlive( false ); - }; -}; - -// this is global and not a class member to keep crud out of the header file -namespace { - boost::intrusive_ptr< LLIamHereLogin > gResponsePtr = 0; -}; - - //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -164,7 +112,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLogoImage(), mCallback(callback), mCallbackData(cb_data), - mHtmlAvailable( TRUE ), mListener(new LLPanelLoginListener(this)) { setBackgroundVisible(FALSE); @@ -194,21 +141,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, buildFromFile( "panel_login.xml"); - // Legacy login web page is hidden under the menu bar. - // Adjust reg-in-client web browser widget to not be hidden. - if (gSavedSettings.getBOOL("RegInClient")) - { - reshape(rect.getWidth(), rect.getHeight() - MENU_BAR_HEIGHT); - } - else - { - reshape(rect.getWidth(), rect.getHeight()); - } + reshape(rect.getWidth(), rect.getHeight()); getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this); // change z sort of clickable text to be behind buttons - //sendChildToBack(getChildView("channel_text")); sendChildToBack(getChildView("forgot_password_text")); if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION) @@ -253,16 +190,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); web_browser->addObserver(this); - // Clear the browser's cache to avoid any potential for the cache messing up the login screen. - web_browser->clearCache(); - reshapeBrowser(); - // kick off a request to grab the url manually - gResponsePtr = LLIamHereLogin::build( this ); - - LLHTTPClient::head( LLGridManager::getInstance()->getLoginPage(), gResponsePtr ); - + loadLoginPage(); + // Show last logged in user favorites in "Start at" combo. addUsersWithFavoritesToUsername(); getChild<LLComboBox>("username_combo")->setTextChangedCallback(boost::bind(&LLPanelLogin::addFavoritesToStartLocation, this)); @@ -345,46 +276,10 @@ void LLPanelLogin::reshapeBrowser() reshape( rect.getWidth(), rect.getHeight(), 1 ); } -void LLPanelLogin::setSiteIsAlive( bool alive ) -{ - LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); - // if the contents of the site was retrieved - if ( alive ) - { - if ( web_browser ) - { - loadLoginPage(); - - // mark as available - mHtmlAvailable = TRUE; - } - } - else - // the site is not available (missing page, server down, other badness) - { - if ( web_browser ) - { - // hide browser control (revealing default one) - web_browser->setVisible( FALSE ); - - // mark as unavailable - mHtmlAvailable = FALSE; - } - } -} - - LLPanelLogin::~LLPanelLogin() { LLPanelLogin::sInstance = NULL; - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - - //// We know we're done with the image, so be rid of it. - //gTextureList.deleteImage( mLogoImage ); - // Controls having keyboard focus by default // must reset it on destroy. (EXT-2748) gFocusMgr.setDefaultKeyboardFocus(NULL); @@ -407,22 +302,13 @@ void LLPanelLogin::draw() S32 width = getRect().getWidth(); S32 height = getRect().getHeight(); - if ( mHtmlAvailable ) - { - if (getChild<LLView>("login_widgets")->getVisible()) - { - // draw a background box in black - gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); - // draw the bottom part of the background image - // just the blue background to the native client UI - mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); - } - } - else + if (getChild<LLView>("login_widgets")->getVisible()) { - // the HTML login page is not available so default to the original screen - S32 offscreen_part = height / 3; - mLogoImage->draw(0, -offscreen_part, width, height+offscreen_part); + // draw a background box in black + gl_rect_2d( 0, height - 264, width, 264, LLColor4::black ); + // draw the bottom part of the background image + // just the blue background to the native client UI + mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight()); }; } glPopMatrix(); @@ -889,20 +775,10 @@ void LLPanelLogin::loadLoginPage() oStr << "&os=" << os_info; curl_free(os_info); - gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid()); - gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor()); LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html"); - - // navigate to the "real" page - if (gSavedSettings.getBOOL("RegInClient")) - { - web_browser->setFocus(TRUE); - login_page = sInstance->getString("reg_in_client_url"); - web_browser->navigateTo(login_page, "text/html"); - } - else + if (web_browser->getCurrentNavUrl() != oStr.str()) { web_browser->navigateTo( oStr.str(), "text/html" ); } @@ -936,10 +812,6 @@ void LLPanelLogin::onClickConnect(void *) { if (sInstance && sInstance->mCallback) { - // tell the responder we're not here anymore - if ( gResponsePtr ) - gResponsePtr->setParent( 0 ); - // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); @@ -1007,24 +879,6 @@ void LLPanelLogin::onClickConnect(void *) } } -/* -// static -bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (0 == option) - { - llinfos << "Going to account creation URL" << llendl; - LLWeb::loadURLExternal( LLNotifications::instance().getGlobalString("CREATE_ACCOUNT_URL")); - } - else - { - sInstance->setFocus(TRUE); - } - return false; -} -*/ - // static void LLPanelLogin::onClickNewAccount(void*) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 9cc5e3456a..11273453ba 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -89,7 +89,6 @@ private: void addUsersWithFavoritesToUsername(); static void onClickConnect(void*); static void onClickNewAccount(void*); -// static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); static void onClickVersion(void*); static void onClickForgotPassword(void*); static void onClickHelp(void*); @@ -114,7 +113,6 @@ private: static LLPanelLogin* sInstance; static BOOL sCapslockDidNotification; - BOOL mHtmlAvailable; }; std::string load_password_from_disk(void); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 85c57b4900..bc4998dd0c 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -139,6 +139,7 @@ BOOL LLPanelMainInventory::postBuild() mActivePanel->getFilter()->markDefault(); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); mActivePanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mActivePanel, _1, _2)); + mResortActivePanel = true; } LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items"); if (recent_items_panel) @@ -528,6 +529,17 @@ void LLPanelMainInventory::draw() { mFilterEditor->setText(mFilterSubString); } + if (mActivePanel && mResortActivePanel) + { + // EXP-756: Force resorting of the list the first time we draw the list: + // In the case of date sorting, we don't have enough information at initialization time + // to correctly sort the folders. Later manual resort doesn't do anything as the order value is + // set correctly. The workaround is to reset the order to alphabetical (or anything) then to the correct order. + U32 order = mActivePanel->getSortOrder(); + mActivePanel->setSortOrder(LLInventoryFilter::SO_NAME); + mActivePanel->setSortOrder(order); + mResortActivePanel = false; + } LLPanel::draw(); updateItemcountText(); } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index c2b78ff9ea..2b2ee1c0c9 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -121,6 +121,7 @@ private: LLTabContainer* mFilterTabs; LLHandle<LLFloater> mFinderHandle; LLInventoryPanel* mActivePanel; + bool mResortActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; std::string mFilterSubString; diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 64af6c2157..204c146f3c 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -33,11 +33,9 @@ #include "lleconomy.h" #include "llerror.h" #include "llfontgl.h" -#include "llmaterialtable.h" #include "llpermissionsflags.h" #include "llstring.h" #include "llvolume.h" -#include "material_codes.h" #include "m3math.h" // project includes @@ -57,7 +55,6 @@ #include "lltool.h" #include "lltoolcomp.h" #include "lltoolmgr.h" -#include "lltrans.h" #include "llui.h" #include "llviewerobject.h" #include "llviewerregion.h" @@ -101,17 +98,6 @@ BOOL LLPanelObject::postBuild() { setMouseOpaque(FALSE); - std::map<std::string, std::string> material_name_map; - material_name_map["Stone"]= LLTrans::getString("Stone"); - material_name_map["Metal"]= LLTrans::getString("Metal"); - material_name_map["Glass"]= LLTrans::getString("Glass"); - material_name_map["Wood"]= LLTrans::getString("Wood"); - material_name_map["Flesh"]= LLTrans::getString("Flesh"); - material_name_map["Plastic"]= LLTrans::getString("Plastic"); - material_name_map["Rubber"]= LLTrans::getString("Rubber"); - material_name_map["Light"]= LLTrans::getString("Light"); - - LLMaterialTable::basic.initTableTransNames(material_name_map); //-------------------------------------------------------- // Top //-------------------------------------------------------- @@ -166,22 +152,6 @@ BOOL LLPanelObject::postBuild() //-------------------------------------------------------- - // material type popup - mComboMaterial = getChild<LLComboBox>("material"); - childSetCommitCallback("material",onCommitMaterial,this); - mComboMaterial->removeall(); - - for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin(); - iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter) - { - LLMaterialInfo* minfop = *iter; - if (minfop->mMCode != LL_MCODE_LIGHT) - { - mComboMaterial->add(minfop->mName); - } - } - mComboMaterialItemCount = mComboMaterial->getItemCount(); - // Base Type mComboBaseType = getChild<LLComboBox>("comboBaseType"); childSetCommitCallback("comboBaseType",onCommitParametric,this); @@ -309,7 +279,6 @@ BOOL LLPanelObject::postBuild() LLPanelObject::LLPanelObject() : LLPanel(), - mComboMaterialItemCount(0), mIsPhysical(FALSE), mIsTemporary(FALSE), mIsPhantom(FALSE), @@ -527,43 +496,6 @@ void LLPanelObject::getState( ) mCheckCastShadows->setEnabled( roots_selected==1 && editable ); #endif - // Update material part - // slightly inefficient - materials are unique per object, not per TE - U8 material_code = 0; - struct f : public LLSelectedTEGetFunctor<U8> - { - U8 get(LLViewerObject* object, S32 te) - { - return object->getMaterial(); - } - } func; - bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code ); - std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright"); - if (editable && single_volume && material_same) - { - mComboMaterial->setEnabled( TRUE ); - if (material_code == LL_MCODE_LIGHT) - { - if (mComboMaterial->getItemCount() == mComboMaterialItemCount) - { - mComboMaterial->add(LEGACY_FULLBRIGHT_DESC); - } - mComboMaterial->setSimple(LEGACY_FULLBRIGHT_DESC); - } - else - { - if (mComboMaterial->getItemCount() != mComboMaterialItemCount) - { - mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC); - } - - mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code))); - } - } - else - { - mComboMaterial->setEnabled( FALSE ); - } //---------------------------------------------------------------------------- S32 selected_item = MI_BOX; @@ -1245,25 +1177,6 @@ void LLPanelObject::sendCastShadows() } // static -void LLPanelObject::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) -{ - //LLPanelObject* self = (LLPanelObject*) userdata; - LLComboBox* box = (LLComboBox*) ctrl; - - if (box) - { - // apply the currently selected material to the object - const std::string& material_name = box->getSimple(); - std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright"); - if (material_name != LEGACY_FULLBRIGHT_DESC) - { - U8 material_code = LLMaterialTable::basic.getMCode(material_name); - LLSelectMgr::getInstance()->selectionSetMaterial(material_code); - } - } -} - -// static void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata ) { LLPanelObject* self = (LLPanelObject*) userdata; @@ -1937,7 +1850,6 @@ void LLPanelObject::clearCtrls() mCheckCastShadows->set(FALSE); mCheckCastShadows->setEnabled( FALSE ); #endif - mComboMaterial ->setEnabled( FALSE ); // Disable text labels mLabelPosition ->setEnabled( FALSE ); mLabelSize ->setEnabled( FALSE ); diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index e2f2a4400d..475dfdaedb 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -66,7 +66,6 @@ public: static void onCommitPhantom( LLUICtrl* ctrl, void* userdata); static void onCommitCastShadows( LLUICtrl* ctrl, void* userdata); static void onCommitPhysics( LLUICtrl* ctrl, void* userdata); - static void onCommitMaterial( LLUICtrl* ctrl, void* userdata); static void onCommitParametric(LLUICtrl* ctrl, void* userdata); @@ -94,10 +93,6 @@ protected: void getVolumeParams(LLVolumeParams& volume_params); protected: - S32 mComboMaterialItemCount; - - LLComboBox* mComboMaterial; - // Per-object options LLComboBox* mComboBaseType; diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 00ac34efa5..46262832dc 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -91,11 +91,18 @@ public: LLParcelHandler() : LLCommandHandler("parcel", UNTRUSTED_THROTTLE) { } bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) - { + { if (params.size() < 2) { return false; } + + if (!LLUI::sSettingGroups["config"]->getBOOL("EnablePlaceProfile")) + { + LLNotificationsUtil::add("NoPlaceInfo", LLSD(), LLSD(), std::string("SwitchToStandardSkinAndQuit")); + return true; + } + LLUUID parcel_id; if (!parcel_id.set(params[0], FALSE)) { diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index aef870d352..dc87bd0077 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -51,6 +51,7 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); mDevicesUpdated = FALSE; + mUseTuningMode = true; // grab "live" mic volume level mMicVolume = gSavedSettings.getF32("AudioLevelMic"); @@ -96,7 +97,7 @@ void LLPanelVoiceDeviceSettings::draw() // let user know that volume indicator is not yet available bool is_in_tuning_mode = LLVoiceClient::getInstance()->inTuningMode(); - getChildView("wait_text")->setVisible( !is_in_tuning_mode); + getChildView("wait_text")->setVisible( !is_in_tuning_mode && mUseTuningMode); LLPanel::draw(); @@ -220,23 +221,7 @@ void LLPanelVoiceDeviceSettings::refresh() iter != LLVoiceClient::getInstance()->getCaptureDevices().end(); iter++) { - // Lets try to localize some system device names. EXT-8375 - std::string device_name = *iter; - LLStringUtil::toLower(device_name); //compare in low case - if ("default system device" == device_name) - { - device_name = getString(device_name); - } - else if ("no device" == device_name) - { - device_name = getString(device_name); - } - else - { - // restore original value - device_name = *iter; - } - mCtrlInputDevices->add(device_name, ADD_BOTTOM ); + mCtrlInputDevices->add( *iter, ADD_BOTTOM ); } if(!mCtrlInputDevices->setSimple(mInputDevice)) @@ -253,23 +238,7 @@ void LLPanelVoiceDeviceSettings::refresh() for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin(); iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++) { - // Lets try to localize some system device names. EXT-8375 - std::string device_name = *iter; - LLStringUtil::toLower(device_name); //compare in low case - if ("default system device" == device_name) - { - device_name = getString(device_name); - } - else if ("no device" == device_name) - { - device_name = getString(device_name); - } - else - { - // restore original value - device_name = *iter; - } - mCtrlOutputDevices->add(device_name, ADD_BOTTOM ); + mCtrlOutputDevices->add( *iter, ADD_BOTTOM ); } if(!mCtrlOutputDevices->setSimple(mOutputDevice)) @@ -292,14 +261,20 @@ void LLPanelVoiceDeviceSettings::initialize() LLVoiceClient::getInstance()->refreshDeviceLists(); // put voice client in "tuning" mode - LLVoiceClient::getInstance()->tuningStart(); - LLVoiceChannel::suspend(); + if (mUseTuningMode) + { + LLVoiceClient::getInstance()->tuningStart(); + LLVoiceChannel::suspend(); + } } void LLPanelVoiceDeviceSettings::cleanup() { - LLVoiceClient::getInstance()->tuningStop(); - LLVoiceChannel::resume(); + if (mUseTuningMode) + { + LLVoiceClient::getInstance()->tuningStop(); + LLVoiceChannel::resume(); + } } void LLPanelVoiceDeviceSettings::onCommitInputDevice() @@ -316,6 +291,6 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice() if(LLVoiceClient::getInstance()) { LLVoiceClient::getInstance()->setRenderDevice( - getChild<LLComboBox>("voice_input_device")->getValue().asString()); + getChild<LLComboBox>("voice_output_device")->getValue().asString()); } } diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h index 636b8b9948..d09476d469 100644 --- a/indra/newview/llpanelvoicedevicesettings.h +++ b/indra/newview/llpanelvoicedevicesettings.h @@ -45,6 +45,8 @@ public: void cleanup(); /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); + + void setUseTuningMode(bool use) { mUseTuningMode = use; }; protected: void onCommitInputDevice(); @@ -56,6 +58,7 @@ protected: class LLComboBox *mCtrlInputDevices; class LLComboBox *mCtrlOutputDevices; BOOL mDevicesUpdated; + bool mUseTuningMode; }; #endif // LL_LLPANELVOICEDEVICESETTINGS_H diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index c443814c89..ebddaa90bc 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -59,6 +59,7 @@ #include "lltool.h" #include "lltoolcomp.h" #include "lltoolmgr.h" +#include "lltrans.h" #include "llui.h" #include "llviewerobject.h" #include "llviewerregion.h" @@ -156,6 +157,34 @@ BOOL LLPanelVolume::postBuild() mSpinPhysicsRestitution = getChild<LLSpinCtrl>("Physics Restitution"); mSpinPhysicsRestitution->setCommitCallback(boost::bind(&LLPanelVolume::sendPhysicsRestitution, this, _1, mSpinPhysicsRestitution)); } + + std::map<std::string, std::string> material_name_map; + material_name_map["Stone"]= LLTrans::getString("Stone"); + material_name_map["Metal"]= LLTrans::getString("Metal"); + material_name_map["Glass"]= LLTrans::getString("Glass"); + material_name_map["Wood"]= LLTrans::getString("Wood"); + material_name_map["Flesh"]= LLTrans::getString("Flesh"); + material_name_map["Plastic"]= LLTrans::getString("Plastic"); + material_name_map["Rubber"]= LLTrans::getString("Rubber"); + material_name_map["Light"]= LLTrans::getString("Light"); + + LLMaterialTable::basic.initTableTransNames(material_name_map); + + // material type popup + mComboMaterial = getChild<LLComboBox>("material"); + childSetCommitCallback("material",onCommitMaterial,this); + mComboMaterial->removeall(); + + for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin(); + iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter) + { + LLMaterialInfo* minfop = *iter; + if (minfop->mMCode != LL_MCODE_LIGHT) + { + mComboMaterial->add(minfop->mName); + } + } + mComboMaterialItemCount = mComboMaterial->getItemCount(); // Start with everyone disabled clearCtrls(); @@ -164,7 +193,8 @@ BOOL LLPanelVolume::postBuild() } LLPanelVolume::LLPanelVolume() - : LLPanel() + : LLPanel(), + mComboMaterialItemCount(0) { setMouseOpaque(FALSE); @@ -379,6 +409,46 @@ void LLPanelVolume::getState( ) getChildView("FlexForceZ")->setEnabled(false); } + // Material properties + + // Update material part + // slightly inefficient - materials are unique per object, not per TE + U8 material_code = 0; + struct f : public LLSelectedTEGetFunctor<U8> + { + U8 get(LLViewerObject* object, S32 te) + { + return object->getMaterial(); + } + } func; + bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code ); + std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright"); + if (editable && single_volume && material_same) + { + mComboMaterial->setEnabled( TRUE ); + if (material_code == LL_MCODE_LIGHT) + { + if (mComboMaterial->getItemCount() == mComboMaterialItemCount) + { + mComboMaterial->add(LEGACY_FULLBRIGHT_DESC); + } + mComboMaterial->setSimple(LEGACY_FULLBRIGHT_DESC); + } + else + { + if (mComboMaterial->getItemCount() != mComboMaterialItemCount) + { + mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC); + } + + mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code))); + } + } + else + { + mComboMaterial->setEnabled( FALSE ); + } + // Physics properties mSpinPhysicsGravity->set(objectp->getPhysicsGravity()); @@ -467,7 +537,6 @@ void LLPanelVolume::refresh() getChildView("label physicsshapetype")->setVisible(enable_mesh); getChildView("Physics Shape Type Combo Ctrl")->setVisible(enable_mesh); getChildView("Physics Gravity")->setVisible(enable_mesh); - getChildView("Physics Material Override")->setVisible(enable_mesh); getChildView("Physics Friction")->setVisible(enable_mesh); getChildView("Physics Density")->setVisible(enable_mesh); getChildView("Physics Restitution")->setVisible(enable_mesh); @@ -522,6 +591,8 @@ void LLPanelVolume::clearCtrls() mSpinPhysicsFriction->setEnabled(FALSE); mSpinPhysicsDensity->setEnabled(FALSE); mSpinPhysicsRestitution->setEnabled(FALSE); + + mComboMaterial->setEnabled( FALSE ); } // @@ -674,6 +745,25 @@ void LLPanelVolume::onLightSelectTexture(const LLSD& data) } // static +void LLPanelVolume::onCommitMaterial( LLUICtrl* ctrl, void* userdata ) +{ + //LLPanelObject* self = (LLPanelObject*) userdata; + LLComboBox* box = (LLComboBox*) ctrl; + + if (box) + { + // apply the currently selected material to the object + const std::string& material_name = box->getSimple(); + std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright"); + if (material_name != LEGACY_FULLBRIGHT_DESC) + { + U8 material_code = LLMaterialTable::basic.getMCode(material_name); + LLSelectMgr::getInstance()->selectionSetMaterial(material_code); + } + } +} + +// static void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata ) { LLPanelVolume* self = (LLPanelVolume*) userdata; diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h index 776a2c1f4a..0ef47db0d9 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -63,8 +63,8 @@ public: static void onCommitLight( LLUICtrl* ctrl, void* userdata); static void onCommitIsFlexible( LLUICtrl* ctrl, void* userdata); static void onCommitFlexible( LLUICtrl* ctrl, void* userdata); - static void onCommitPhysicsParam( LLUICtrl* ctrl, void* userdata); + static void onCommitMaterial( LLUICtrl* ctrl, void* userdata); void onLightCancelColor(const LLSD& data); void onLightSelectColor(const LLSD& data); @@ -104,6 +104,10 @@ protected: LLSpinCtrl* mSpinForce[3]; */ + S32 mComboMaterialItemCount; + LLComboBox* mComboMaterial; + + LLColor4 mLightSavedColor; LLUUID mLightSavedTexture; LLPointer<LLViewerObject> mObject; diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp index 4b2c569cc3..450f9b2be7 100644 --- a/indra/newview/llpolymesh.cpp +++ b/indra/newview/llpolymesh.cpp @@ -770,7 +770,7 @@ LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_ int nverts = mSharedData->mNumVertices; int nfloats = nverts * (2*4 + 3*3 + 2 + 4); //use 16 byte aligned vertex data to make LLPolyMesh SSE friendly - mVertexData = (F32*) malloc(nfloats*4); + mVertexData = (F32*) ll_aligned_malloc_16(nfloats*4); int offset = 0; mCoords = (LLVector4*)(mVertexData + offset); offset += 4*nverts; mNormals = (LLVector4*)(mVertexData + offset); offset += 4*nverts; @@ -799,7 +799,7 @@ LLPolyMesh::~LLPolyMesh() mJointRenderData[i] = NULL; } - free(mVertexData); + ll_aligned_free_16(mVertexData); } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 8e5beb33ce..9f5c55bad1 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -34,6 +34,7 @@ #include "llassetuploadresponders.h" #include "llcheckboxctrl.h" #include "llcombobox.h" +#include "lldatapacker.h" #include "lldelayedgestureerror.h" #include "llfloaterreg.h" #include "llgesturemgr.h" diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9b264b81c7..8fa4065fa6 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1997,7 +1997,7 @@ void LLSelectMgr::selectionSetPhysicsType(U8 type) if (object->permModify()) { object->setPhysicsShapeType(mType); - object->updateFlags(); + object->updateFlags(TRUE); } return true; } @@ -2016,7 +2016,7 @@ void LLSelectMgr::selectionSetFriction(F32 friction) if (object->permModify()) { object->setPhysicsFriction(mFriction); - object->updateFlags(); + object->updateFlags(TRUE); } return true; } @@ -2035,7 +2035,7 @@ void LLSelectMgr::selectionSetGravity(F32 gravity ) if (object->permModify()) { object->setPhysicsGravity(mGravity); - object->updateFlags(); + object->updateFlags(TRUE); } return true; } @@ -2054,7 +2054,7 @@ void LLSelectMgr::selectionSetDensity(F32 density ) if (object->permModify()) { object->setPhysicsDensity(mDensity); - object->updateFlags(); + object->updateFlags(TRUE); } return true; } @@ -2073,7 +2073,7 @@ void LLSelectMgr::selectionSetRestitution(F32 restitution) if (object->permModify()) { object->setPhysicsRestitution(mRestitution); - object->updateFlags(); + object->updateFlags(TRUE); } return true; } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index c8c6858b81..fbd2f7ca83 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -39,6 +39,7 @@ #include "llinventoryobserver.h" #include "lllineeditor.h" #include "llradiogroup.h" +#include "llslurl.h" #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewerobjectlist.h" diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index e4c2293938..631b244785 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -127,8 +127,6 @@ protected: void undock(LLFloater* floater_tab); LLSideTray* getSideTray(); - - void onFloaterClose(LLSD::Boolean app_quitting); public: virtual ~LLSideTrayTab(); @@ -146,7 +144,7 @@ public: void onOpen (const LLSD& key); - void toggleTabDocked(); + void toggleTabDocked(bool toggle_floater = true); void setDocked(bool dock); bool isDocked() const; @@ -160,7 +158,6 @@ private: std::string mDescription; LLView* mMainPanel; - boost::signals2::connection mFloaterCloseConn; }; LLSideTrayTab::LLSideTrayTab(const Params& p) @@ -196,8 +193,8 @@ BOOL LLSideTrayTab::postBuild() title_panel->getChild<LLTextBox>(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle); - getChild<LLButton>("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this)); - getChild<LLButton>("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::toggleTabDocked, this)); + getChild<LLButton>("undock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, false)); + getChild<LLButton>("dock")->setCommitCallback(boost::bind(&LLSideTrayTab::setDocked, this, true)); return true; } @@ -253,14 +250,16 @@ LLSideTray* LLSideTrayTab::getSideTray() return side_tray; } -void LLSideTrayTab::toggleTabDocked() +void LLSideTrayTab::toggleTabDocked(bool toggle_floater /* = true */) { + // *FIX: Calling this method twice per frame would crash the viewer. + std::string tab_name = getName(); LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); if (!floater_tab) return; - bool docking = LLFloater::isShown(floater_tab); + bool docking = !isDocked(); // Hide the "Tear Off" button when a tab gets undocked // and show "Dock" button instead. @@ -278,7 +277,10 @@ void LLSideTrayTab::toggleTabDocked() // Open/close the floater *after* we reparent the tab panel, // so that it doesn't receive redundant visibility change notifications. - LLFloaterReg::toggleInstance("side_bar_tab", tab_name); + if (toggle_floater) + { + LLFloaterReg::toggleInstance("side_bar_tab", tab_name); + } } // Same as toggleTabDocked() apart from making sure that we do exactly what we want. @@ -298,18 +300,6 @@ bool LLSideTrayTab::isDocked() const return dynamic_cast<LLSideTray*>(getParent()) != NULL; } -void LLSideTrayTab::onFloaterClose(LLSD::Boolean app_quitting) -{ - // If user presses Ctrl-Shift-W, handle that gracefully by docking all - // undocked tabs before their floaters get destroyed (STORM-1016). - - // Don't dock on quit for the current dock state to be correctly saved. - if (app_quitting) return; - - lldebugs << "Forcibly docking tab " << getName() << llendl; - setDocked(true); -} - BOOL LLSideTrayTab::handleScrollWheel(S32 x, S32 y, S32 clicks) { // Let children handle the event @@ -333,7 +323,6 @@ void LLSideTrayTab::dock(LLFloater* floater_tab) return; } - mFloaterCloseConn.disconnect(); setRect(side_tray->getLocalRect()); reshape(getRect().getWidth(), getRect().getHeight()); @@ -382,7 +371,6 @@ void LLSideTrayTab::undock(LLFloater* floater_tab) } floater_tab->addChild(this); - mFloaterCloseConn = floater_tab->setCloseCallback(boost::bind(&LLSideTrayTab::onFloaterClose, this, _2)); floater_tab->setTitle(mTabTitle); floater_tab->setName(getName()); @@ -510,7 +498,7 @@ public: LLSideTrayTab* tab = side_tray->getTab(getName()); if (!tab) return FALSE; - tab->toggleTabDocked(); + tab->setDocked(false); LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab->getName()); if (!floater_tab) return FALSE; @@ -681,7 +669,7 @@ LLPanel* LLSideTray::openChildPanel(LLSideTrayTab* tab, const std::string& panel if (tab_attached && LLUI::sSettingGroups["config"]->getBOOL("OpenSidePanelsInFloaters")) { - tab->toggleTabDocked(); + tab->setDocked(false); tab_attached = false; } @@ -1102,7 +1090,7 @@ void LLSideTray::detachTabs() if (!is_visible) continue; llassert(isTabAttached(tab->getName())); - tab->toggleTabDocked(); + tab->setDocked(false); } } @@ -1354,8 +1342,9 @@ bool LLSideTray::isPanelActive(const std::string& panel_name) return (panel->getName() == panel_name); } -void LLSideTray::setTabDocked(const std::string& tab_name, bool dock) +void LLSideTray::setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater /* = true*/) { + // Lookup tab by name. LLSideTrayTab* tab = getTab(tab_name); if (!tab) { // not a docked tab, look through detached tabs @@ -1372,20 +1361,12 @@ void LLSideTray::setTabDocked(const std::string& tab_name, bool dock) } - if (tab) - { - bool tab_attached = isTabAttached(tab_name); - LLFloater* floater_tab = LLFloaterReg::getInstance("side_bar_tab", tab_name); - if (!floater_tab) return; + llassert(tab != NULL); - if (dock && !tab_attached) - { - tab->dock(floater_tab); - } - else if (!dock && tab_attached) - { - tab->undock(floater_tab); - } + // Toggle its dock state. + if (tab && tab->isDocked() != dock) + { + tab->toggleTabDocked(toggle_floater); } } diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 46765bfbcc..24882411f4 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -121,7 +121,7 @@ public: LLPanel* getActivePanel (); bool isPanelActive (const std::string& panel_name); - void setTabDocked(const std::string& tab_name, bool dock); + void setTabDocked(const std::string& tab_name, bool dock, bool toggle_floater = true); /* * get the panel of given type T (don't show it or do anything else with it) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 65f7d299bc..fa329eb0ae 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1742,8 +1742,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32 mSlopRatio = 0.25f; mInfiniteFarClip = FALSE; - LLGLNamePool::registerPool(&sQueryPool); - LLVector4a center, size; center.splat(0.f); size.splat(1.f); @@ -3169,11 +3167,11 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume) LLConvexDecomposition::getInstance()->generateSingleHullMeshFromMesh( &mesh, &res ); //copy res into phys_volume - phys_volume->mHullPoints = (LLVector4a*) malloc(sizeof(LLVector4a)*res.mNumVertices); + phys_volume->mHullPoints = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*res.mNumVertices); phys_volume->mNumHullPoints = res.mNumVertices; S32 idx_size = (res.mNumTriangles*3*2+0xF) & ~0xF; - phys_volume->mHullIndices = (U16*) malloc(idx_size); + phys_volume->mHullIndices = (U16*) ll_aligned_malloc_16(idx_size); phys_volume->mNumHullIndices = res.mNumTriangles*3; const F32* v = res.mVertexBase; diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp index d52e0a6c86..d3e96f8dfb 100644 --- a/indra/newview/llspeakbutton.cpp +++ b/indra/newview/llspeakbutton.cpp @@ -54,26 +54,6 @@ LLSpeakButton::Params::Params() // See widgets/talk_button.xml } -void LLSpeakButton::draw() -{ - // LLVoiceClient::getInstance() is the authoritative global source of info regarding our open-mic state, we merely reflect that state. - bool openmic = LLVoiceClient::getInstance()->getUserPTTState(); - bool voiceenabled = LLVoiceClient::getInstance()->voiceEnabled(); - mSpeakBtn->setToggleState(openmic && voiceenabled); - mOutputMonitor->setIsMuted(!voiceenabled); - LLUICtrl::draw(); -} -void LLSpeakButton::setSpeakBtnEnabled(bool enabled) -{ - LLButton* speak_btn = getChild<LLButton>("speak_btn"); - speak_btn->setEnabled(enabled); -} -void LLSpeakButton::setFlyoutBtnEnabled(bool enabled) -{ - LLButton* show_btn = getChild<LLBottomtrayButton>("speak_flyout_btn"); - show_btn->setEnabled(enabled); -} - LLSpeakButton::LLSpeakButton(const Params& p) : LLUICtrl(p) , mOutputMonitor(NULL) diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h index 2fdf80c1f2..7db01112ef 100644 --- a/indra/newview/llspeakbutton.h +++ b/indra/newview/llspeakbutton.h @@ -53,12 +53,7 @@ public: }; /*virtual*/ ~LLSpeakButton(); - /*virtual*/ void draw(); - // methods for enabling/disabling right and left parts of speak button separately(EXT-4648) - void setSpeakBtnEnabled(bool enabled); - void setFlyoutBtnEnabled(bool enabled); - // *HACK: Need to put tooltips in a translatable location, // the panel that contains this button. void setSpeakToolTip(const std::string& msg); diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 09918c28d8..d23d2b3abd 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -35,7 +35,6 @@ #include "llagentwearables.h" #include "llappearancemgr.h" #include "lldictionary.h" -//#include "llfirstuse.h" #include "llfloaterreg.h" #include "llfloatertools.h" #include "llgesturemgr.h" diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 06e0d17b8c..9ec4d33036 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -688,6 +688,15 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) return LLTool::handleMouseUp(x, y, mask); } +void LLToolPie::stopClickToWalk() +{ + mPick.mPosGlobal = gAgent.getPositionGlobal(); + handle_go_to(); + if(mAutoPilotDestination) + { + mAutoPilotDestination->markDead(); + } +} BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) { diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 22359a6db8..d7c79ee223 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -67,6 +67,7 @@ public: LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; } void resetSelection(); void blockClickToWalk() { mBlockClickToWalk = true; } + void stopClickToWalk(); static void selectionPropertiesReceived(); diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index e7a0d17c3a..e06fe7bda0 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -29,6 +29,8 @@ // newview includes #include "llagent.h" // gAgent +#include "llslurl.h" +#include "lluicolor.h" #include "lluicolortable.h" #include "llviewercontrol.h" // gSavedSettings #include "llviewerregion.h" diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 11686740f7..a1c2c926af 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -92,6 +92,7 @@ #include "llfloatersettingsdebug.h" #include "llfloatersidetraytab.h" #include "llfloatersnapshot.h" +#include "llfloatersounddevices.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" #include "llfloatertestlistview.h" @@ -266,6 +267,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>); LLFloaterReg::add("side_bar_tab", "floater_side_bar_tab.xml", &LLFloaterReg::build<LLFloaterSideTrayTab>); + LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>); LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>); diff --git a/indra/newview/llviewerkeyboard.h b/indra/newview/llviewerkeyboard.h index 925244e89b..ca73212ed1 100644 --- a/indra/newview/llviewerkeyboard.h +++ b/indra/newview/llviewerkeyboard.h @@ -28,6 +28,7 @@ #define LL_LLVIEWERKEYBOARD_H #include "llkeyboard.h" // For EKeystate +#include "llinitparam.h" const S32 MAX_NAMED_FUNCTIONS = 100; const S32 MAX_KEY_BINDINGS = 128; // was 60 diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9d2b2f38c5..79c6c8db75 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -54,6 +54,7 @@ #include "llfilepicker.h" #include "llnotifications.h" #include "lldir.h" +#include "lldiriterator.h" #include "llevent.h" // LLSimpleListener #include "llnotificationsutil.h" #include "lluuid.h" @@ -1154,7 +1155,8 @@ void LLViewerMedia::clearAllCookies() } // the hard part: iterate over all user directories and delete the cookie file from each one - while(gDirUtilp->getNextFileInDir(base_dir, "*_*", filename)) + LLDirIterator dir_iter(base_dir, "*_*"); + while (dir_iter.next(filename)) { target = base_dir; target += filename; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1764db48a2..8cfe91203a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -37,6 +37,7 @@ // newview includes #include "llagent.h" +#include "llagentaccess.h" #include "llagentcamera.h" #include "llagentwearables.h" #include "llagentpilot.h" @@ -5618,6 +5619,14 @@ class LLToggleHelp : public view_listener_t } }; +class LLToggleSpeak : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLVoiceClient::getInstance()->toggleUserPTTState(); + return true; + } +}; class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8214,6 +8223,7 @@ void initialize_menus() commit.add("BuyCurrency", boost::bind(&handle_buy_currency)); view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLToggleHelp(), "ToggleHelp"); + view_listener_t::addMenu(new LLToggleSpeak(), "ToggleSpeak"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleAgentProfile(), "ToggleAgentProfile"); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9c13a96b81..8b80e567b8 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -344,6 +344,11 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data) { LLViewerRegion *regionp = LLWorld::getInstance()->getRegion(mesgsys->getSender()); + if(!regionp) + { + llwarns << "Invalid region for layer data." << llendl; + return; + } S32 size; S8 type; @@ -2208,7 +2213,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) name = clean_name_from_im(name, dialog); BOOL is_busy = gAgent.getBusy(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat); + BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) + // object IMs contain sender object id in session_id (STORM-1209) + || dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id); BOOL is_linden = LLMuteList::getInstance()->isLinden(name); BOOL is_owned_by_me = FALSE; BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true; @@ -5366,6 +5373,12 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) { // notification was specified using the new mechanism, so we can just handle it here std::string notificationID; + msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
+ if (!LLNotifications::getInstance()->templateExists(notificationID))
+ {
+ return false;
+ } + std::string llsdRaw; LLSD llsdBlock; msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); @@ -5522,14 +5535,19 @@ void process_alert_core(const std::string& message, BOOL modal) } else { - LLSD args; - std::string new_msg =LLNotifications::instance().getGlobalString(message); + // Hack fix for EXP-623 (blame fix on RN :)) to avoid a sim deploy + const std::string AUTOPILOT_CANCELED_MSG("Autopilot canceled"); + if (message.find(AUTOPILOT_CANCELED_MSG) == std::string::npos ) + { + LLSD args; + std::string new_msg =LLNotifications::instance().getGlobalString(message); - std::string localized_msg; - bool is_message_localized = LLTrans::findString(localized_msg, new_msg); + std::string localized_msg; + bool is_message_localized = LLTrans::findString(localized_msg, new_msg); - args["MESSAGE"] = is_message_localized ? localized_msg : new_msg; - LLNotificationsUtil::add("SystemMessageTip", args); + args["MESSAGE"] = is_message_localized ? localized_msg : new_msg; + LLNotificationsUtil::add("SystemMessageTip", args); + } } } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 6d493bfcd5..f5fee662e6 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5282,7 +5282,7 @@ bool LLViewerObject::specialHoverCursor() const || (mClickAction != 0); } -void LLViewerObject::updateFlags() +void LLViewerObject::updateFlags(BOOL physics_changed) { LLViewerRegion* regionp = getRegion(); if(!regionp) return; @@ -5295,12 +5295,15 @@ void LLViewerObject::updateFlags() gMessageSystem->addBOOL("IsTemporary", flagTemporaryOnRez() ); gMessageSystem->addBOOL("IsPhantom", flagPhantom() ); gMessageSystem->addBOOL("CastsShadows", flagCastShadows() ); - gMessageSystem->nextBlock("ExtraPhysics"); - gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() ); - gMessageSystem->addF32("Density", getPhysicsDensity() ); - gMessageSystem->addF32("Friction", getPhysicsFriction() ); - gMessageSystem->addF32("Restitution", getPhysicsRestitution() ); - gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() ); + if (physics_changed) + { + gMessageSystem->nextBlock("ExtraPhysics"); + gMessageSystem->addU8("PhysicsShapeType", getPhysicsShapeType() ); + gMessageSystem->addF32("Density", getPhysicsDensity() ); + gMessageSystem->addF32("Friction", getPhysicsFriction() ); + gMessageSystem->addF32("Restitution", getPhysicsRestitution() ); + gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() ); + } gMessageSystem->sendReliable( regionp->getHost() ); } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index e417343bec..21198f7dd1 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -488,7 +488,7 @@ public: void setRegion(LLViewerRegion *regionp); virtual void updateRegion(LLViewerRegion *regionp); - void updateFlags(); + void updateFlags(BOOL physics_changed = FALSE); BOOL setFlags(U32 flag, BOOL state); void setPhysicsShapeType(U8 type); void setPhysicsGravity(F32 gravity); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index e84e4a859a..5ae4e872f3 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -42,6 +42,7 @@ // Viewer includes #include "llagent.h" +#include "llagentaccess.h" #include "llviewerwindow.h" #include "llviewercontrol.h" //#include "llfirstuse.h" @@ -54,6 +55,7 @@ #include "llresmgr.h" #include "llsdutil.h" #include "llsdutil_math.h" +#include "llslurl.h" #include "llstatusbar.h" #include "llui.h" #include "llviewertexture.h" @@ -2200,7 +2202,10 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const = parcelOwner == (forGroup ? gAgent.getGroupID() : gAgent.getID()); bool isAuthorized - = (authorizeBuyer.isNull() || (gAgent.getID() == authorizeBuyer)); + = (authorizeBuyer.isNull()
+ || (gAgent.getID() == authorizeBuyer)
+ || (gAgent.hasPowerInGroup(authorizeBuyer,GP_LAND_DEED)
+ && gAgent.hasPowerInGroup(authorizeBuyer,GP_LAND_SET_SALE_INFO))); return isForSale && !isOwner && isAuthorized && isEmpowered; } diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index ab07adce5d..45c9b3e91f 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -99,8 +99,6 @@ #include "llcoord.h" #include "llcoordframe.h" #include "llcrc.h" -#include "llinterp.h" -#include "llperlin.h" #include "llplane.h" #include "llquantize.h" #include "llrand.h" @@ -109,7 +107,6 @@ #include "m3math.h" #include "m4math.h" #include "llquaternion.h" -#include "raytrace.h" #include "v2math.h" #include "v3color.h" #include "v3dmath.h" @@ -117,16 +114,12 @@ #include "v4color.h" #include "v4coloru.h" #include "v4math.h" -////#include "vmath.h" #include "xform.h" // Library includes from llvfs #include "lldir.h" - -// Library includes from llmessage project +
+// Library includes from llmessage project
#include "llcachename.h" -// llxuixml -#include "llinitparam.h" - #endif diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 84d092c5d5..f835351c04 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -46,6 +46,7 @@ #include "llagentcamera.h" #include "llcallingcard.h" #include "llcaphttpsender.h" +#include "llcapabilitylistener.h" #include "llcommandhandler.h" #include "lldir.h" #include "lleventpoll.h" @@ -76,6 +77,71 @@ const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region const S16 MAX_MAP_DIST = 10; +typedef std::map<std::string, std::string> CapabilityMap; + +class LLViewerRegionImpl { +public: + LLViewerRegionImpl(LLViewerRegion * region, LLHost const & host) + : mHost(host), + mCompositionp(NULL), + mEventPoll(NULL), + // I'd prefer to set the LLCapabilityListener name to match the region + // name -- it's disappointing that's not available at construction time. + // We could instead store an LLCapabilityListener*, making + // setRegionNameAndZone() replace the instance. Would that pose + // consistency problems? Can we even request a capability before calling + // setRegionNameAndZone()? + // For testability -- the new Michael Feathers paradigm -- + // LLCapabilityListener binds all the globals it expects to need at + // construction time. + mCapabilityListener(host.getString(), gMessageSystem, *region, + gAgent.getID(), gAgent.getSessionID()) + { + } + + // The surfaces and other layers + LLSurface* mLandp; + + // Region geometry data + LLVector3d mOriginGlobal; // Location of southwest corner of region (meters) + LLVector3d mCenterGlobal; // Location of center in world space (meters) + LLHost mHost; + + // The unique ID for this region. + LLUUID mRegionID; + + // region/estate owner - usually null. + LLUUID mOwnerID; + + // Network statistics for the region's circuit... + LLTimer mLastNetUpdate; + + // Misc + LLVLComposition *mCompositionp; // Composition layer for the surface + + LLVOCacheEntry::vocache_entry_map_t mCacheMap; + // time? + // LRU info? + + // Cache ID is unique per-region, across renames, moving locations, + // etc. + LLUUID mCacheID; + + CapabilityMap mCapabilities; + + LLEventPoll* mEventPoll; + + /// Post an event to this LLCapabilityListener to invoke a capability message on + /// this LLViewerRegion's server + /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities) + LLCapabilityListener mCapabilityListener; + + //spatial partitions for objects in this region + std::vector<LLSpatialPartition*> mObjectPartition; + + LLHTTPClient::ResponderPtr mHttpResponderPtr ; +}; + // support for secondlife:///app/region/{REGION} SLapps // N.B. this is defined to work exactly like the classic secondlife://{REGION} // However, the later syntax cannot support spaces in the region name because @@ -191,15 +257,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, const U32 grids_per_region_edge, const U32 grids_per_patch_edge, const F32 region_width_meters) -: mCenterGlobal(), +: mImpl(new LLViewerRegionImpl(this, host)), mHandle(handle), - mHost( host ), mTimeDilation(1.0f), mName(""), mZoning(""), - mOwnerID(), mIsEstateManager(FALSE), - mCompositionp(NULL), mRegionFlags( REGION_FLAGS_DEFAULT ), mSimAccess( SIM_ACCESS_MIN ), mBillableFactor(1.0), @@ -212,37 +275,27 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mHttpUrl(""), mCacheLoaded(FALSE), mCacheDirty(FALSE), - mCacheID(), - mEventPoll(NULL), mReleaseNotesRequested(FALSE), - // I'd prefer to set the LLCapabilityListener name to match the region - // name -- it's disappointing that's not available at construction time. - // We could instead store an LLCapabilityListener*, making - // setRegionNameAndZone() replace the instance. Would that pose - // consistency problems? Can we even request a capability before calling - // setRegionNameAndZone()? - // For testability -- the new Michael Feathers paradigm -- - // LLCapabilityListener binds all the globals it expects to need at - // construction time. - mCapabilityListener(host.getString(), gMessageSystem, *this, - gAgent.getID(), gAgent.getSessionID()), mCapabilitiesReceived(false) { mWidth = region_width_meters; - mOriginGlobal = from_region_handle(handle); + mImpl->mOriginGlobal = from_region_handle(handle); updateRenderMatrix(); - mLandp = new LLSurface('l', NULL); + mImpl->mLandp = new LLSurface('l', NULL); // Create the composition layer for the surface - mCompositionp = new LLVLComposition(mLandp, grids_per_region_edge, region_width_meters/grids_per_region_edge); - mCompositionp->setSurface(mLandp); + mImpl->mCompositionp = + new LLVLComposition(mImpl->mLandp, + grids_per_region_edge, + region_width_meters / grids_per_region_edge); + mImpl->mCompositionp->setSurface(mImpl->mLandp); // Create the surfaces - mLandp->setRegion(this); - mLandp->create(grids_per_region_edge, + mImpl->mLandp->setRegion(this); + mImpl->mLandp->create(grids_per_region_edge, grids_per_patch_edge, - mOriginGlobal, + mImpl->mOriginGlobal, mWidth); mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters); @@ -255,24 +308,24 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, //create object partitions //MUST MATCH declaration of eObjectPartitions - mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD - mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN - mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER - mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER - mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE - mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE - mObjectPartition.push_back(new LLCloudPartition()); //PARTITION_CLOUD - mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS - mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME - mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE - mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE - mObjectPartition.push_back(NULL); //PARTITION_NONE + mImpl->mObjectPartition.push_back(new LLHUDPartition()); //PARTITION_HUD + mImpl->mObjectPartition.push_back(new LLTerrainPartition()); //PARTITION_TERRAIN + mImpl->mObjectPartition.push_back(new LLVoidWaterPartition()); //PARTITION_VOIDWATER + mImpl->mObjectPartition.push_back(new LLWaterPartition()); //PARTITION_WATER + mImpl->mObjectPartition.push_back(new LLTreePartition()); //PARTITION_TREE + mImpl->mObjectPartition.push_back(new LLParticlePartition()); //PARTITION_PARTICLE + mImpl->mObjectPartition.push_back(new LLCloudPartition()); //PARTITION_CLOUD + mImpl->mObjectPartition.push_back(new LLGrassPartition()); //PARTITION_GRASS + mImpl->mObjectPartition.push_back(new LLVolumePartition()); //PARTITION_VOLUME + mImpl->mObjectPartition.push_back(new LLBridgePartition()); //PARTITION_BRIDGE + mImpl->mObjectPartition.push_back(new LLHUDParticlePartition());//PARTITION_HUD_PARTICLE + mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE } void LLViewerRegion::initStats() { - mLastNetUpdate.reset(); + mImpl->mLastNetUpdate.reset(); mPacketsIn = 0; mBitsIn = 0; mLastBitsIn = 0; @@ -287,9 +340,9 @@ void LLViewerRegion::initStats() LLViewerRegion::~LLViewerRegion() { - if(mHttpResponderPtr) + if(mImpl->mHttpResponderPtr) { - (static_cast<BaseCapabilitiesComplete*>(mHttpResponderPtr.get()))->setRegion(NULL) ; + (static_cast<BaseCapabilitiesComplete*>(mImpl->mHttpResponderPtr.get()))->setRegion(NULL) ; } gVLManager.cleanupData(this); @@ -301,21 +354,44 @@ LLViewerRegion::~LLViewerRegion() gObjectList.killObjects(this); - delete mCompositionp; + delete mImpl->mCompositionp; delete mParcelOverlay; - delete mLandp; - delete mEventPoll; - LLHTTPSender::clearSender(mHost); + delete mImpl->mLandp; + delete mImpl->mEventPoll; + LLHTTPSender::clearSender(mImpl->mHost); saveObjectCache(); - std::for_each(mObjectPartition.begin(), mObjectPartition.end(), DeletePointer()); + std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer()); + + delete mImpl; + mImpl = NULL; +} + +LLEventPump& LLViewerRegion::getCapAPI() const +{ + return mImpl->mCapabilityListener.getCapAPI(); } /*virtual*/ const LLHost& LLViewerRegion::getHost() const { - return mHost; + return mImpl->mHost; +} + +LLSurface & LLViewerRegion::getLand() const +{ + return *mImpl->mLandp; +} + +const LLUUID& LLViewerRegion::getRegionID() const +{ + return mImpl->mRegionID; +} + +void LLViewerRegion::setRegionID(const LLUUID& region_id) +{ + mImpl->mRegionID = region_id; } void LLViewerRegion::loadObjectCache() @@ -330,7 +406,7 @@ void LLViewerRegion::loadObjectCache() if(LLVOCache::hasInstance()) { - LLVOCache::getInstance()->readFromCache(mHandle, mCacheID, mCacheMap) ; + LLVOCache::getInstance()->readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap) ; } } @@ -342,32 +418,32 @@ void LLViewerRegion::saveObjectCache() return; } - if (mCacheMap.empty()) + if (mImpl->mCacheMap.empty()) { return; } if(LLVOCache::hasInstance()) { - LLVOCache::getInstance()->writeToCache(mHandle, mCacheID, mCacheMap, mCacheDirty) ; + LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty) ; mCacheDirty = FALSE; } - for(LLVOCacheEntry::vocache_entry_map_t::iterator iter = mCacheMap.begin(); iter != mCacheMap.end(); ++iter) + for(LLVOCacheEntry::vocache_entry_map_t::iterator iter = mImpl->mCacheMap.begin(); iter != mImpl->mCacheMap.end(); ++iter) { delete iter->second; } - mCacheMap.clear(); + mImpl->mCacheMap.clear(); } void LLViewerRegion::sendMessage() { - gMessageSystem->sendMessage(mHost); + gMessageSystem->sendMessage(mImpl->mHost); } void LLViewerRegion::sendReliableMessage() { - gMessageSystem->sendReliable(mHost); + gMessageSystem->sendReliable(mImpl->mHost); } void LLViewerRegion::setFlags(BOOL b, U32 flags) @@ -384,12 +460,12 @@ void LLViewerRegion::setFlags(BOOL b, U32 flags) void LLViewerRegion::setWaterHeight(F32 water_level) { - mLandp->setWaterHeight(water_level); + mImpl->mLandp->setWaterHeight(water_level); } F32 LLViewerRegion::getWaterHeight() const { - return mLandp->getWaterHeight(); + return mImpl->mLandp->getWaterHeight(); } BOOL LLViewerRegion::isVoiceEnabled() const @@ -405,9 +481,9 @@ void LLViewerRegion::setRegionFlags(U32 flags) void LLViewerRegion::setOriginGlobal(const LLVector3d &origin_global) { - mOriginGlobal = origin_global; + mImpl->mOriginGlobal = origin_global; updateRenderMatrix(); - mLandp->setOriginGlobal(origin_global); + mImpl->mLandp->setOriginGlobal(origin_global); mWind.setOriginGlobal(origin_global); mCloudLayer.setOriginGlobal(origin_global); calculateCenterGlobal(); @@ -423,16 +499,34 @@ void LLViewerRegion::setTimeDilation(F32 time_dilation) mTimeDilation = time_dilation; } +const LLVector3d & LLViewerRegion::getOriginGlobal() const +{ + return mImpl->mOriginGlobal; +} LLVector3 LLViewerRegion::getOriginAgent() const { - return gAgent.getPosAgentFromGlobal(mOriginGlobal); + return gAgent.getPosAgentFromGlobal(mImpl->mOriginGlobal); } +const LLVector3d & LLViewerRegion::getCenterGlobal() const +{ + return mImpl->mCenterGlobal; +} LLVector3 LLViewerRegion::getCenterAgent() const { - return gAgent.getPosAgentFromGlobal(mCenterGlobal); + return gAgent.getPosAgentFromGlobal(mImpl->mCenterGlobal); +} + +void LLViewerRegion::setOwner(const LLUUID& owner_id) +{ + mImpl->mOwnerID = owner_id; +} + +const LLUUID& LLViewerRegion::getOwner() const +{ + return mImpl->mOwnerID; } void LLViewerRegion::setRegionNameAndZone (const std::string& name_zone) @@ -557,7 +651,10 @@ void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**) LLFloaterReporter::processRegionInfo(msg); } - +void LLViewerRegion::setCacheID(const LLUUID& id) +{ + mImpl->mCacheID = id; +} S32 LLViewerRegion::renderPropertyLines() { @@ -585,7 +682,7 @@ 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 = mLandp->idleUpdate(max_update_time); + BOOL did_update = mImpl->mLandp->idleUpdate(max_update_time); if (mParcelOverlay) { @@ -600,7 +697,7 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time) // As above, but forcibly do the update. void LLViewerRegion::forceUpdate() { - mLandp->idleUpdate(0.f); + mImpl->mLandp->idleUpdate(0.f); if (mParcelOverlay) { @@ -610,17 +707,21 @@ void LLViewerRegion::forceUpdate() void LLViewerRegion::connectNeighbor(LLViewerRegion *neighborp, U32 direction) { - mLandp->connectNeighbor(neighborp->mLandp, direction); + mImpl->mLandp->connectNeighbor(neighborp->mImpl->mLandp, direction); mCloudLayer.connectNeighbor(&(neighborp->mCloudLayer), direction); } void LLViewerRegion::disconnectAllNeighbors() { - mLandp->disconnectAllNeighbors(); + mImpl->mLandp->disconnectAllNeighbors(); mCloudLayer.disconnectAllNeighbors(); } +LLVLComposition * LLViewerRegion::getComposition() const +{ + return mImpl->mCompositionp; +} F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const { @@ -714,10 +815,10 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const void LLViewerRegion::calculateCenterGlobal() { - mCenterGlobal = mOriginGlobal; - mCenterGlobal.mdV[VX] += 0.5 * mWidth; - mCenterGlobal.mdV[VY] += 0.5 * mWidth; - mCenterGlobal.mdV[VZ] = 0.5*mLandp->getMinZ() + mLandp->getMaxZ(); + mImpl->mCenterGlobal = mImpl->mOriginGlobal; + mImpl->mCenterGlobal.mdV[VX] += 0.5 * mWidth; + mImpl->mCenterGlobal.mdV[VY] += 0.5 * mWidth; + mImpl->mCenterGlobal.mdV[VZ] = 0.5 * mImpl->mLandp->getMinZ() + mImpl->mLandp->getMaxZ(); } void LLViewerRegion::calculateCameraDistance() @@ -728,7 +829,7 @@ void LLViewerRegion::calculateCameraDistance() std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) { s << "{ "; - s << region.mHost; + s << region.mImpl->mHost; s << " mOriginGlobal = " << region.getOriginGlobal()<< "\n"; std::string name(region.getName()), zone(region.getZoning()); if (! name.empty()) @@ -748,9 +849,9 @@ std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) void LLViewerRegion::updateNetStats() { - F32 dt = mLastNetUpdate.getElapsedTimeAndResetF32(); + F32 dt = mImpl->mLastNetUpdate.getElapsedTimeAndResetF32(); - LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mHost); + LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mImpl->mHost); if (!cdp) { mAlive = false; @@ -779,10 +880,10 @@ void LLViewerRegion::updateNetStats() U32 LLViewerRegion::getPacketsLost() const { - LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mHost); + LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mImpl->mHost); if (!cdp) { - llinfos << "LLViewerRegion::getPacketsLost couldn't find circuit for " << mHost << llendl; + llinfos << "LLViewerRegion::getPacketsLost couldn't find circuit for " << mImpl->mHost << llendl; return 0; } else @@ -791,6 +892,16 @@ U32 LLViewerRegion::getPacketsLost() const } } +void LLViewerRegion::setHttpResponderPtrNULL() +{ + mImpl->mHttpResponderPtr = NULL; +} + +const LLHTTPClient::ResponderPtr LLViewerRegion::getHttpResponderPtr() const +{ + return mImpl->mHttpResponderPtr; +} + BOOL LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const { LLVector3 pos_region = getPosRegionFromGlobal(point_global); @@ -817,7 +928,7 @@ BOOL LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const LLVector3 LLViewerRegion::getPosRegionFromGlobal(const LLVector3d &point_global) const { LLVector3 pos_region; - pos_region.setVec(point_global - mOriginGlobal); + pos_region.setVec(point_global - mImpl->mOriginGlobal); return pos_region; } @@ -825,7 +936,7 @@ LLVector3d LLViewerRegion::getPosGlobalFromRegion(const LLVector3 &pos_region) c { LLVector3d pos_region_d; pos_region_d.setVec(pos_region); - return pos_region_d + mOriginGlobal; + return pos_region_d + mImpl->mOriginGlobal; } LLVector3 LLViewerRegion::getPosAgentFromRegion(const LLVector3 &pos_region) const @@ -842,7 +953,7 @@ LLVector3 LLViewerRegion::getPosRegionFromAgent(const LLVector3 &pos_agent) cons F32 LLViewerRegion::getLandHeightRegion(const LLVector3& region_pos) { - return mLandp->resolveHeightRegion( region_pos ); + return mImpl->mLandp->resolveHeightRegion( region_pos ); } bool LLViewerRegion::isAlive() @@ -994,7 +1105,7 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg) // treat the target specially for the map if(i == target_index) { - LLVector3d global_pos(mOriginGlobal); + LLVector3d global_pos(mImpl->mOriginGlobal); global_pos.mdV[VX] += (F64)(x_pos); global_pos.mdV[VY] += (F64)(y_pos); global_pos.mdV[VZ] += (F64)(z_pos) * 4.0; @@ -1034,7 +1145,7 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec U32 local_id = objectp->getLocalID(); U32 crc = objectp->getCRC(); - LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL); + LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL); if (entry) { @@ -1047,10 +1158,10 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec } // Update the cache entry - mCacheMap.erase(local_id); + mImpl->mCacheMap.erase(local_id); delete entry; entry = new LLVOCacheEntry(local_id, crc, dp); - mCacheMap[local_id] = entry; + mImpl->mCacheMap[local_id] = entry; return CACHE_UPDATE_CHANGED; } @@ -1058,15 +1169,15 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec // Create new entry and add to map eCacheUpdateResult result = CACHE_UPDATE_ADDED; - if (mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES) + if (mImpl->mCacheMap.size() > MAX_OBJECT_CACHE_ENTRIES) { - mCacheMap.erase(mCacheMap.begin()); + mImpl->mCacheMap.erase(mImpl->mCacheMap.begin()); result = CACHE_UPDATE_REPLACED; } entry = new LLVOCacheEntry(local_id, crc, dp); - mCacheMap[local_id] = entry; + mImpl->mCacheMap[local_id] = entry; return result; } @@ -1076,34 +1187,32 @@ LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type) { //llassert(mCacheLoaded); This assert failes often, changing to early-out -- davep, 2010/10/18 - if (mCacheLoaded) - { - LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL); + LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL); - if (entry) + if (entry) + { + // we've seen this object before + if (entry->getCRC() == crc) { - // we've seen this object before - if (entry->getCRC() == crc) - { - // Record a hit - entry->recordHit(); - cache_miss_type = CACHE_MISS_TYPE_NONE; - return entry->getDP(crc); - } - else - { - // llinfos << "CRC miss for " << local_id << llendl; - cache_miss_type = CACHE_MISS_TYPE_CRC; - mCacheMissCRC.put(local_id); - } + // Record a hit + entry->recordHit(); + cache_miss_type = CACHE_MISS_TYPE_NONE; + return entry->getDP(crc); } else { - // llinfos << "Cache miss for " << local_id << llendl; - cache_miss_type = CACHE_MISS_TYPE_FULL; - mCacheMissFull.put(local_id); + // llinfos << "CRC miss for " << local_id << llendl; + cache_miss_type = CACHE_MISS_TYPE_CRC; + mCacheMissCRC.put(local_id); } } + else + { + // llinfos << "Cache miss for " << local_id << llendl; + cache_miss_type = CACHE_MISS_TYPE_FULL; + mCacheMissFull.put(local_id); + } + return NULL; } @@ -1206,7 +1315,7 @@ void LLViewerRegion::dumpCache() } LLVOCacheEntry *entry; - for(LLVOCacheEntry::vocache_entry_map_t::iterator iter = mCacheMap.begin(); iter != mCacheMap.end(); ++iter) + for(LLVOCacheEntry::vocache_entry_map_t::iterator iter = mImpl->mCacheMap.begin(); iter != mImpl->mCacheMap.end(); ++iter) { entry = iter->second ; @@ -1220,7 +1329,7 @@ void LLViewerRegion::dumpCache() change_bin[changes]++; } - llinfos << "Count " << mCacheMap.size() << llendl; + llinfos << "Count " << mImpl->mCacheMap.size() << llendl; for (i = 0; i < BINS; i++) { llinfos << "Hits " << i << " " << hit_bin[i] << llendl; @@ -1363,10 +1472,10 @@ void LLViewerRegion::setSeedCapability(const std::string& url) return; } - delete mEventPoll; - mEventPoll = NULL; + delete mImpl->mEventPoll; + mImpl->mEventPoll = NULL; - mCapabilities.clear(); + mImpl->mCapabilities.clear(); setCapability("Seed", url); LLSD capabilityNames = LLSD::emptyArray(); @@ -1441,25 +1550,25 @@ void LLViewerRegion::setSeedCapability(const std::string& url) llinfos << "posting to seed " << url << llendl; - mHttpResponderPtr = BaseCapabilitiesComplete::build(this) ; - LLHTTPClient::post(url, capabilityNames, mHttpResponderPtr); + mImpl->mHttpResponderPtr = BaseCapabilitiesComplete::build(this) ; + LLHTTPClient::post(url, capabilityNames, mImpl->mHttpResponderPtr); } void LLViewerRegion::setCapability(const std::string& name, const std::string& url) { if(name == "EventQueueGet") { - delete mEventPoll; - mEventPoll = NULL; - mEventPoll = new LLEventPoll(url, getHost()); + delete mImpl->mEventPoll; + mImpl->mEventPoll = NULL; + mImpl->mEventPoll = new LLEventPoll(url, getHost()); } else if(name == "UntrustedSimulatorMessage") { - LLHTTPSender::setSender(mHost, new LLCapHTTPSender(url)); + LLHTTPSender::setSender(mImpl->mHost, new LLCapHTTPSender(url)); } else { - mCapabilities[name] = url; + mImpl->mCapabilities[name] = url; if(name == "GetTexture") { mHttpUrl = url ; @@ -1474,8 +1583,8 @@ bool LLViewerRegion::isSpecialCapabilityName(const std::string &name) std::string LLViewerRegion::getCapability(const std::string& name) const { - CapabilityMap::const_iterator iter = mCapabilities.find(name); - if(iter == mCapabilities.end()) + CapabilityMap::const_iterator iter = mImpl->mCapabilities.find(name); + if(iter == mImpl->mCapabilities.end()) { return ""; } @@ -1497,7 +1606,7 @@ void LLViewerRegion::logActiveCapabilities() const { int count = 0; CapabilityMap::const_iterator iter; - for (iter = mCapabilities.begin(); iter != mCapabilities.end(); iter++, count++) + for (iter = mImpl->mCapabilities.begin(); iter != mImpl->mCapabilities.end(); ++iter, ++count) { if (!iter->second.empty()) { @@ -1509,9 +1618,9 @@ void LLViewerRegion::logActiveCapabilities() const LLSpatialPartition* LLViewerRegion::getSpatialPartition(U32 type) { - if (type < mObjectPartition.size()) + if (type < mImpl->mObjectPartition.size()) { - return mObjectPartition[type]; + return mImpl->mObjectPartition[type]; } return NULL; } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index dd40b876cd..9c5b85b77f 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -33,20 +33,16 @@ #include "lldarray.h" #include "llwind.h" -#include "llbbox.h" #include "llcloud.h" #include "llstat.h" #include "v3dmath.h" -#include "llhost.h" #include "llstring.h" #include "llregionflags.h" #include "lluuid.h" -#include "lldatapacker.h" -#include "llvocache.h" #include "llweb.h" #include "llcapabilityprovider.h" -#include "llcapabilitylistener.h" #include "m4math.h" // LLMatrix4 +#include "llhttpclient.h" // Surface id's #define LAND 1 @@ -65,6 +61,13 @@ class LLVOCache; class LLVOCacheEntry; class LLSpatialPartition; class LLEventPump; +class LLCapabilityListener; +class LLDataPacker; +class LLDataPackerBinaryBuffer; +class LLHost; +class LLBBox; + +class LLViewerRegionImpl; class LLViewerRegion: public LLCapabilityProvider // implements this interface { @@ -159,19 +162,19 @@ public: F32 getTimeDilation() const { return mTimeDilation; } // Origin height is at zero. - const LLVector3d &getOriginGlobal() const { return mOriginGlobal; } + const LLVector3d &getOriginGlobal() const; LLVector3 getOriginAgent() const; // Center is at the height of the water table. - const LLVector3d &getCenterGlobal() const { return mCenterGlobal; } + const LLVector3d &getCenterGlobal() const; LLVector3 getCenterAgent() const; void setRegionNameAndZone(const std::string& name_and_zone); const std::string& getName() const { return mName; } const std::string& getZoning() const { return mZoning; } - void setOwner(const LLUUID& owner_id) { mOwnerID = owner_id; } - const LLUUID& getOwner() const { return mOwnerID; } + void setOwner(const LLUUID& owner_id); + const LLUUID& getOwner() const; // Is the current agent on the estate manager list for this region? void setIsEstateManager(BOOL b) { mIsEstateManager = b; } @@ -206,7 +209,7 @@ public: // can process the message. static void processRegionInfo(LLMessageSystem* msg, void**); - void setCacheID(const LLUUID& id) { mCacheID = id; } + void setCacheID(const LLUUID& id); F32 getWidth() const { return mWidth; } @@ -222,8 +225,8 @@ public: U32 getPacketsLost() const; - void setHttpResponderPtrNULL() {mHttpResponderPtr = NULL ;} - const LLHTTPClient::ResponderPtr getHttpResponderPtr() const {return mHttpResponderPtr ;} + void setHttpResponderPtrNULL(); + const LLHTTPClient::ResponderPtr getHttpResponderPtr() const; // Get/set named capability URLs for this region. void setSeedCapability(const std::string& url); @@ -238,21 +241,19 @@ public: static bool isSpecialCapabilityName(const std::string &name); void logActiveCapabilities() const; - /// Capability-request exception - typedef LLCapabilityListener::ArgError ArgError; /// Get LLEventPump on which we listen for capability requests /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities) - LLEventPump& getCapAPI() { return mCapabilityListener.getCapAPI(); } + LLEventPump& getCapAPI() const; /// implements LLCapabilityProvider /*virtual*/ const LLHost& getHost() const; const U64 &getHandle() const { return mHandle; } - LLSurface &getLand() const { return *mLandp; } + LLSurface &getLand() const; // set and get the region id - const LLUUID& getRegionID() const { return mRegionID; } - void setRegionID(const LLUUID& region_id) { mRegionID = region_id; } + const LLUUID& getRegionID() const; + void setRegionID(const LLUUID& region_id); BOOL pointInRegionGlobal(const LLVector3d &point_global) const; LLVector3 getPosRegionFromGlobal(const LLVector3d &point_global) const; @@ -260,7 +261,7 @@ public: LLVector3 getPosAgentFromRegion(const LLVector3 ®ion_pos) const; LLVector3d getPosGlobalFromRegion(const LLVector3 &offset) const; - LLVLComposition *getComposition() const { return mCompositionp; } + LLVLComposition *getComposition() const; F32 getCompositionXY(const S32 x, const S32 y) const; BOOL isOwnedSelf(const LLVector3& pos); @@ -347,34 +348,19 @@ public: LLDynamicArray<LLUUID> mMapAvatarIDs; private: - // The surfaces and other layers - LLSurface* mLandp; + LLViewerRegionImpl * mImpl; - // Region geometry data - LLVector3d mOriginGlobal; // Location of southwest corner of region (meters) - LLVector3d mCenterGlobal; // Location of center in world space (meters) F32 mWidth; // Width of region on a side (meters) - U64 mHandle; - LLHost mHost; - - // The unique ID for this region. - LLUUID mRegionID; - F32 mTimeDilation; // time dilation of physics simulation on simulator // simulator name std::string mName; std::string mZoning; - // region/estate owner - usually null. - LLUUID mOwnerID; - // Is this agent on the estate managers list for this region? BOOL mIsEstateManager; - // Network statistics for the region's circuit... - LLTimer mLastNetUpdate; U32 mPacketsIn; U32 mBitsIn; U32 mLastBitsIn; @@ -386,9 +372,6 @@ private: U32 mPingDelay; F32 mDeltaTime; // Time since last measurement of lastPackets, Bits, etc - // Misc - LLVLComposition *mCompositionp; // Composition layer for the surface - U32 mRegionFlags; // includes damage flags U8 mSimAccess; F32 mBillableFactor; @@ -398,46 +381,24 @@ private: // Information for Homestead / CR-53 S32 mClassID; S32 mCPURatio; + std::string mColoName; std::string mProductSKU; std::string mProductName; std::string mHttpUrl ; - // Maps local ids to cache entries. // Regions can have order 10,000 objects, so assume // a structure of size 2^14 = 16,000 BOOL mCacheLoaded; BOOL mCacheDirty; - LLVOCacheEntry::vocache_entry_map_t mCacheMap; + LLDynamicArray<U32> mCacheMissFull; LLDynamicArray<U32> mCacheMissCRC; - // time? - // LRU info? - // Cache ID is unique per-region, across renames, moving locations, - // etc. - LLUUID mCacheID; - - typedef std::map<std::string, std::string> CapabilityMap; - CapabilityMap mCapabilities; - - LLEventPoll* mEventPoll; - - /// Post an event to this LLCapabilityListener to invoke a capability message on - /// this LLViewerRegion's server - /// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities) - LLCapabilityListener mCapabilityListener; - -private: bool mAlive; // can become false if circuit disconnects bool mCapabilitiesReceived; - //spatial partitions for objects in this region - std::vector<LLSpatialPartition*> mObjectPartition; - - LLHTTPClient::ResponderPtr mHttpResponderPtr ; - BOOL mReleaseNotesRequested; }; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index e81ee72c05..3e85802ba6 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1051,7 +1051,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() { gDeferredMultiLightProgram.mName = "Deferred MultiLight Shader"; gDeferredMultiLightProgram.mShaderFiles.clear(); - gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/pointLightV.glsl", GL_VERTEX_SHADER_ARB)); + gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightV.glsl", GL_VERTEX_SHADER_ARB)); gDeferredMultiLightProgram.mShaderFiles.push_back(make_pair("deferred/multiPointLightF.glsl", GL_FRAGMENT_SHADER_ARB)); gDeferredMultiLightProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED]; success = gDeferredMultiLightProgram.createShader(NULL, NULL); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 7a10dfc414..d9ff931575 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -76,18 +76,23 @@ LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); LLViewerTextureList gTextureList; static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); +U32 LLViewerTextureList::sRenderThreadID = 0 ; /////////////////////////////////////////////////////////////////////////////// LLViewerTextureList::LLViewerTextureList() : mForceResetTextureStats(FALSE), mUpdateStats(FALSE), mMaxResidentTexMemInMegaBytes(0), - mMaxTotalTextureMemInMegaBytes(0) + mMaxTotalTextureMemInMegaBytes(0), + mInitialized(FALSE) { } void LLViewerTextureList::init() { + sRenderThreadID = LLThread::currentID() ; + + mInitialized = TRUE ; sNumImages = 0; mMaxResidentTexMemInMegaBytes = 0; mMaxTotalTextureMemInMegaBytes = 0 ; @@ -105,6 +110,10 @@ void LLViewerTextureList::doPreloadImages() { LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL; + llassert_always(mInitialized) ;
+ llassert_always(mImageList.empty()) ;
+ llassert_always(mUUIDMap.empty()) ; + // Set the "missing asset" image LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI); @@ -300,6 +309,7 @@ void LLViewerTextureList::destroyGL(BOOL save_state) void LLViewerTextureList::restoreGL() { + llassert_always(mInitialized) ; LLImageGL::restoreGL(); } @@ -477,8 +487,10 @@ LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id) return iter->second; } -void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) +void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image, U32 thread_id) { + llassert_always(mInitialized) ; + llassert_always(sRenderThreadID == thread_id); llassert(image); if (image->isInImageList()) { @@ -492,8 +504,10 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) image->setInImageList(TRUE) ; } -void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) +void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id) { + llassert_always(mInitialized) ; + llassert_always(sRenderThreadID == thread_id); llassert(image); if (!image->isInImageList()) { @@ -690,9 +704,9 @@ void LLViewerTextureList::updateImagesDecodePriorities() if ((decode_priority_test < old_priority_test * .8f) || (decode_priority_test > old_priority_test * 1.25f)) { - removeImageFromList(imagep); + removeImageFromList(imagep, sRenderThreadID); imagep->setDecodePriority(decode_priority); - addImageToList(imagep); + addImageToList(imagep, sRenderThreadID); } update_counter--; } @@ -769,9 +783,8 @@ void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep) imagep->processTextureStats(); F32 decode_priority = LLViewerFetchedTexture::maxDecodePriority() ; imagep->setDecodePriority(decode_priority); - mImageList.insert(imagep); - imagep->setInImageList(TRUE) ; - + addImageToList(imagep); + return ; } @@ -864,7 +877,9 @@ void LLViewerTextureList::updateImagesUpdateStats() void LLViewerTextureList::decodeAllImages(F32 max_time) { LLTimer timer; - + + llassert_always(sRenderThreadID == LLThread::currentID()); + // Update texture stats and priorities std::vector<LLPointer<LLViewerFetchedTexture> > image_list; for (image_priority_list_t::iterator iter = mImageList.begin(); @@ -882,8 +897,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) imagep->processTextureStats(); F32 decode_priority = imagep->calcDecodePriority(); imagep->setDecodePriority(decode_priority); - mImageList.insert(imagep); - imagep->setInImageList(TRUE) ; + addImageToList(imagep); } image_list.clear(); @@ -932,16 +946,19 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer<LLImageFormatted> image = LLImageFormatted::createFromType(codec); if (image.isNull()) { + image->setLastError("Couldn't open the image to be uploaded."); return FALSE; } if (!image->load(filename)) { + image->setLastError("Couldn't load the image to be uploaded."); return FALSE; } // Decompress or expand it in a raw image structure LLPointer<LLImageRaw> raw_image = new LLImageRaw; if (!image->decode(raw_image, 0.0f)) { + image->setLastError("Couldn't decode the image to be uploaded."); return FALSE; } // Check the image constraints @@ -952,8 +969,15 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, } // Convert to j2c (JPEG2000) and save the file locally LLPointer<LLImageJ2C> compressedImage = convertToUploadFile(raw_image); + if (compressedImage.isNull()) + { + image->setLastError("Couldn't convert the image to jpeg2000."); + llinfos << "Couldn't convert to j2c, file : " << filename << llendl; + return FALSE; + } if (!compressedImage->save(out_filename)) { + image->setLastError("Couldn't create the jpeg2000 image for upload."); llinfos << "Couldn't create output file : " << out_filename << llendl; return FALSE; } @@ -961,6 +985,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; if (!integrity_test->loadAndValidate( out_filename )) { + image->setLastError("The created jpeg2000 image is corrupt."); llinfos << "Image file : " << out_filename << " is corrupt" << llendl; return FALSE; } @@ -978,7 +1003,25 @@ LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImage (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) compressedImage->setReversible(TRUE); - compressedImage->encode(raw_image, 0.0f); + + if (gSavedSettings.getBOOL("Jpeg2000AdvancedCompression")) + { + // This test option will create jpeg2000 images with precincts for each level, RPCL ordering + // and PLT markers. The block size is also optionally modifiable. + // Note: the images hence created are compatible with older versions of the viewer. + // Read the blocks and precincts size settings + S32 block_size = gSavedSettings.getS32("Jpeg2000BlocksSize"); + S32 precinct_size = gSavedSettings.getS32("Jpeg2000PrecinctsSize"); + llinfos << "Advanced JPEG2000 Compression: precinct = " << precinct_size << ", block = " << block_size << llendl; + compressedImage->initEncode(*raw_image, block_size, precinct_size, 0); + } + + if (!compressedImage->encode(raw_image, 0.0f)) + { + llinfos << "convertToUploadFile : encode returns with error!!" << llendl; + // Clear up the pointer so we don't leak that one + compressedImage = NULL; + } return compressedImage; } diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index d508ce1ac6..d02b6be6b5 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -83,6 +83,7 @@ public: void dump(); void destroyGL(BOOL save_state = TRUE); void restoreGL(); + BOOL isInitialized() const {return mInitialized;} LLViewerFetchedTexture *findImage(const LLUUID &image_id); @@ -120,8 +121,8 @@ private: void addImage(LLViewerFetchedTexture *image); void deleteImage(LLViewerFetchedTexture *image); - void addImageToList(LLViewerFetchedTexture *image); - void removeImageFromList(LLViewerFetchedTexture *image); + void addImageToList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID()); + void removeImageFromList(LLViewerFetchedTexture *image, U32 thread_id = LLThread::currentID()); LLViewerFetchedTexture * getImage(const LLUUID &image_id, BOOL usemipmap = TRUE, @@ -187,6 +188,7 @@ private: // simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads; + BOOL mInitialized ; BOOL mUpdateStats; S32 mMaxResidentTexMemInMegaBytes; S32 mMaxTotalTextureMemInMegaBytes; @@ -206,30 +208,33 @@ public: private: static S32 sNumImages; static void (*sUUIDCallback)(void**, const LLUUID &); + + //debug use + static U32 sRenderThreadID; }; class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList> { public: // LLImageProviderInterface - /*virtual*/ LLUIImagePtr getUIImageByID(const LLUUID& id, S32 priority); - /*virtual*/ LLUIImagePtr getUIImage(const std::string& name, S32 priority); + /*virtual*/ LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority); + /*virtual*/ LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority); void cleanUp(); bool initFromFile(); - LLUIImagePtr preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect); + LLPointer<LLUIImage> preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect); static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); private: - LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, + LLPointer<LLUIImage> loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); - LLUIImagePtr loadUIImageByID(const LLUUID& id, + LLPointer<LLUIImage> loadUIImageByID(const LLUUID& id, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); - LLUIImagePtr loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); + LLPointer<LLUIImage> loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); struct LLUIImageLoadData diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8af90622ec..6fe79c2e85 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -79,6 +79,7 @@ #include "lltooltip.h" #include "llmediaentry.h" #include "llurldispatcher.h" +#include "raytrace.h" // newview includes #include "llagent.h" @@ -236,17 +237,12 @@ BOOL gDisplayCameraPos = FALSE; BOOL gDisplayFOV = FALSE; BOOL gDisplayBadge = FALSE; -S32 CHAT_BAR_HEIGHT = 28; -S32 OVERLAY_BAR_HEIGHT = 20; - -const U8 NO_FACE = 255; +static const U8 NO_FACE = 255; BOOL gQuietSnapshot = FALSE; const F32 MIN_AFK_TIME = 2.f; // minimum time after setting away state before coming back -const F32 MAX_FAST_FRAME_TIME = 0.5f; -const F32 FAST_FRAME_INCREMENT = 0.1f; -const F32 MIN_DISPLAY_SCALE = 0.75f; +static const F32 MIN_DISPLAY_SCALE = 0.75f; std::string LLViewerWindow::sSnapshotBaseName; std::string LLViewerWindow::sSnapshotDir; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 62822c0b34..df6928aa1d 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -38,13 +38,12 @@ #include "v3dmath.h" #include "v2math.h" +#include "llcursortypes.h" #include "llwindowcallbacks.h" #include "lltimer.h" #include "llstat.h" #include "llmousehandler.h" -#include "llcursortypes.h" #include "llhandle.h" -#include "llimage.h" #include <boost/function.hpp> #include <boost/signals2.hpp> @@ -59,6 +58,7 @@ class LLTool; class LLVelocityBar; class LLPanel; class LLImageRaw; +class LLImageFormatted; class LLHUDIcon; class LLWindow; class LLRootView; @@ -467,12 +467,6 @@ private: LLPointer<LLViewerObject> mDragHoveredObject; }; -void toggle_flying(void*); -void toggle_first_person(); -void toggle_build(void*); -void reset_viewer_state_on_sim(void); -void update_saved_window_size(const std::string& control,S32 delta_width, S32 delta_height); - // // Globals // @@ -491,8 +485,6 @@ extern S32 gDebugRaycastFaceHit; extern LLVector3 gDebugRaycastStart; extern LLVector3 gDebugRaycastEnd; -extern S32 CHAT_BAR_HEIGHT; - extern BOOL gDisplayCameraPos; extern BOOL gDisplayWindInfo; extern BOOL gDisplayFOV; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 1f6d686a86..ec2b5a4c98 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -38,9 +38,9 @@ #include <ctype.h> #include "llaudioengine.h" -#include "llcachename.h" #include "noise.h" #include "sound_ids.h" +#include "raytrace.h" #include "llagent.h" // Get state values from here #include "llagentcamera.h" diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index a71539266d..bd12328a6b 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -412,6 +412,7 @@ void LLVoiceChannel::doSetState(const EState& new_state) { EState old_state = mState; mState = new_state; + if (!mStateChangedCallback.empty()) mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent); } @@ -846,8 +847,13 @@ void LLVoiceChannelP2P::activate() // otherwise answering the call else { - LLVoiceClient::getInstance()->answerInvite(mSessionHandle); - + if (!LLVoiceClient::getInstance()->answerInvite(mSessionHandle)) + { + mCallEndedByAgent = false; + mSessionHandle.clear(); + handleError(ERROR_UNKNOWN); + return; + } // using the session handle invalidates it. Clear it out here so we can't reuse it by accident. mSessionHandle.clear(); } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 288d335e1d..6396bc042d 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -304,7 +304,7 @@ void LLSkyTex::createGLImage(S32 which) void LLSkyTex::bindTexture(BOOL curr) { - gGL.getTexUnit(0)->bind(mTexture[getWhich(curr)]); + gGL.getTexUnit(0)->bind(mTexture[getWhich(curr)], true); } /*************************************** diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index e6f2b19e07..8946d4e0b6 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -50,6 +50,7 @@ #include "pipeline.h" #include "llspatialpartition.h" #include "llnotificationsutil.h" +#include "raytrace.h" extern LLPipeline gPipeline; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 9d2887d2e8..e9a8c9b80a 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -72,7 +72,9 @@ #include "llmeshrepository.h" #include "llagent.h" #include "llviewermediafocus.h" +#include "lldatapacker.h" #include "llvoavatar.h" +#include "llvocache.h" const S32 MIN_QUIET_FRAMES_COALESCE = 30; const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 4b3a9a4dc3..67bb965f99 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -33,6 +33,7 @@ #include "pipeline.h" #include "llsky.h" +#include "lldiriterator.h" #include "llfloaterreg.h" #include "llsliderctrl.h" #include "llspinctrl.h" @@ -87,11 +88,12 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name) std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", "")); LL_DEBUGS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL; - bool found = true; + bool found = true; + LLDirIterator app_settings_iter(path_name, "*.xml"); while(found) { std::string name; - found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name); + found = app_settings_iter.next(name); if(found) { @@ -113,11 +115,12 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name) std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", "")); LL_DEBUGS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL; - found = true; + found = true; + LLDirIterator user_settings_iter(path_name2, "*.xml"); while(found) { std::string name; - found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name); + found = user_settings_iter.next(name); if(found) { name=name.erase(name.length()-4); diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index e5f52dfc97..848efcbb49 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -31,6 +31,7 @@ #include "pipeline.h" #include "llsky.h" +#include "lldiriterator.h" #include "llfloaterreg.h" #include "llsliderctrl.h" #include "llspinctrl.h" @@ -100,11 +101,12 @@ void LLWLParamManager::loadPresets(const std::string& file_name) std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "")); LL_DEBUGS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; - bool found = true; + bool found = true; + LLDirIterator app_settings_iter(path_name, "*.xml"); while(found) { std::string name; - found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name); + found = app_settings_iter.next(name); if(found) { @@ -126,11 +128,12 @@ void LLWLParamManager::loadPresets(const std::string& file_name) std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", "")); LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL; - found = true; + found = true; + LLDirIterator user_settings_iter(path_name2, "*.xml"); while(found) { std::string name; - found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name); + found = user_settings_iter.next(name); if(found) { name=name.erase(name.length()-4); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 23594e74b6..ec24b02934 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -50,6 +50,7 @@ #include "llviewerstats.h" #include "llvlcomposition.h" #include "llvoavatar.h" +#include "llvocache.h" #include "llvowater.h" #include "message.h" #include "pipeline.h" diff --git a/indra/newview/skins/default/xui/da/floater_tos.xml b/indra/newview/skins/default/xui/da/floater_tos.xml index 760f60c996..af9ee0bd06 100644 --- a/indra/newview/skins/default/xui/da/floater_tos.xml +++ b/indra/newview/skins/default/xui/da/floater_tos.xml @@ -4,7 +4,7 @@ http://secondlife.com/app/tos/ </floater.string> <floater.string name="loading_url"> - data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Henter %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E </floater.string> <button label="Fortsæt" label_selected="Fortsæt" name="Continue"/> <button label="Annullér" label_selected="Annullér" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index a3c4897ee1..30b54d3eb2 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -748,6 +748,7 @@ Prøv venligst igen senere. [OLD_NAME] ([SLID]) er nu kendt som [NEW_NAME]. </notification> <notification name="OfferTeleport"> + Tilbyd en teleport til din position med følgende besked? <form name="form"> <input name="message"> Mød mig i [REGION] diff --git a/indra/newview/skins/default/xui/de/floater_tos.xml b/indra/newview/skins/default/xui/de/floater_tos.xml index 1f3ef2f0b4..ba329371f8 100644 --- a/indra/newview/skins/default/xui/de/floater_tos.xml +++ b/indra/newview/skins/default/xui/de/floater_tos.xml @@ -4,7 +4,7 @@ http://secondlife.com/app/tos/ </floater.string> <floater.string name="loading_url"> - data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Wird geladen %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3EServicebedingungen%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E </floater.string> <button label="Weiter" label_selected="Weiter" name="Continue"/> <button label="Abbrechen" label_selected="Abbrechen" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 967cb28476..a8b3ce9c28 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -139,21 +139,20 @@ Thank you to the following Residents for helping to ensure that this is the best word_wrap="true"> 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion APR Copyright (C) 2000-2004 The Apache Software Foundation - Collada DOM Copyright 2005 Sony Computer Entertainment Inc. +Collada DOM Copyright 2005 Sony Computer Entertainment Inc. cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc. expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd. FreeType Copyright (C) 1996-2002, The FreeType Project (www.freetype.org). GL Copyright (C) 1999-2004 Brian Paul. - GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia. +GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia. google-perftools Copyright (c) 2005, Google Inc. Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited. jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW) jpeglib Copyright (C) 1991-1998, Thomas G. Lane. ogg/vorbis Copyright (C) 2001, Xiphophorus OpenSSL Copyright (C) 1998-2002 The OpenSSL Project. - PCRE Copyright (c) 1997-2008 University of Cambridge -Pth Copyright (C) 1999-2006 Ralf S. Engelschall <rse@gnu.org> +PCRE Copyright (c) 1997-2008 University of Cambridge SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) xmlrpc-epi Copyright (C) 2000 Epinions, Inc. diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml index d08c3e7078..85535c2078 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -23,7 +23,7 @@ <string name="simplifying">Simplifying...</string> - <text left="15" bottom="25" follows="top|left" height="15" name="name_label"> + <text left="15" bottom="25" follows="top|left" height="15" max_length_bytes="64" name="name_label"> Name: </text> <line_editor bottom_delta="20" follows="top|left|right" height="19" @@ -219,7 +219,7 @@ <text left="10" top_pad="35" follows="top|left" width="240" height="15"> Generate Normals </text> - <text left="35" top_pad="5" follows="top|left" width="100" height="15"> + <text left="35" top_pad="5" follows="top|left" width="100" height="15" name="crease_label"> Crease Angle: </text> <spinner follows="top|left" left_pad="5" min_val="0" max_val="180" value="75" width="60" height="20" name="crease_angle"/> diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index 92d57b20be..47b2e5fd79 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -572,9 +572,9 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se bg_opaque_color="DkGray2" background_visible="true" background_opaque="true"> - <text top="25" left="30" text_color="White" font="SansSerifSmallBold" width="300" height="4">Performance</text> + <text top="15" left="20" text_color="White" font="SansSerifSmallBold" width="110" height="30" wrap="true" halign="center">Higher Performance</text> <text top="45" left="10" halign="center" width="130" word_wrap="true" font="SansSerifSmall" height="80">Faster rendering but less detailed; lowers Resource (prim) cost.</text> - <text top="25" left="390" text_color="White" font="SansSerifSmallBold" width="300" height="4">Accuracy</text> + <text top="15" left="372" text_color="White" font="SansSerifSmallBold" width="90" height="30" wrap="true" halign="center">Higher Accuracy</text> <text top="45" left="360" halign="center" width="130" word_wrap="true" font="SansSerifSmall" height="80">More detailed model but slower; increases Resource (prim) cost.</text> <slider diff --git a/indra/newview/skins/default/xui/en/floater_postcard.xml b/indra/newview/skins/default/xui/en/floater_postcard.xml index b4ecedd981..8da35e9d7f 100644 --- a/indra/newview/skins/default/xui/en/floater_postcard.xml +++ b/indra/newview/skins/default/xui/en/floater_postcard.xml @@ -36,6 +36,7 @@ Recipient's Email: </text> <line_editor + control_name="LastPostcardRecipient" follows="left|top" height="20" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index a17cf8eea8..9f6199fada 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -120,14 +120,14 @@ font.style="BOLD" name="key_label" top_pad="10" - width="150"> + width="130"> Shortcut Key: </text> <combo_box height="20" label="None" layout="topleft" - left_delta="154" + left_delta="135" name="modifier_combo" top_delta="-4" width="55" /> diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml index d1db5c17ba..ce96ea232e 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml @@ -20,5 +20,6 @@ parse_highlights="true" read_only="true" width="420" + track_bottom="true" word_wrap="true" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 857932e51a..e413228ddc 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -11,7 +11,7 @@ save_rect="true" save_visibility="true" title="SNAPSHOT PREVIEW" - width="215"> + width="245"> <floater.string name="unknown"> unknown diff --git a/indra/newview/skins/default/xui/en/floater_sound_devices.xml b/indra/newview/skins/default/xui/en/floater_sound_devices.xml new file mode 100644 index 0000000000..304987c3d5 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_sound_devices.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater + border_visible="false" + border="false" + legacy_header_height="18" + can_minimize="true" + can_resize="false" + can_close="false" + save_dock_state="true" + save_visibility="true" + save_rect="true" + single_instance="true" + bevel_style="in" + height="164" + layout="topleft" + name="floater_sound_devices" + title="Sound Devices" + width="315"> + <panel + layout="topleft" + follows="all" + filename="panel_sound_devices.xml" + name="device_settings_panel" + width="400" + left="2" + top="26" + class="panel_voice_device_settings"/> + <text + name="voice_label" + top="136" + left="12" + height="14" + width="80" + layout="topleft" + >Voice Chat</text> + <check_box + layout="topleft" + control_name="EnableVoiceChat" + follows="bottom|left" + top="138" + left="80" + name="enable_voice" + width="100" + height="14" + label="Enabled" + /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 380eeae403..40bf7bfed7 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1608,41 +1608,6 @@ even though the user gets a free copy. name="Sculpted" value="Sculpted" /> </combo_box> - <combo_box - height="19" - layout="topleft" - name="material" - top_pad="5" - width="150"> - <combo_box.item - label="Stone" - name="Stone" - value="Stone" /> - <combo_box.item - label="Metal" - name="Metal" - value="Metal" /> - <combo_box.item - label="Glass" - name="Glass" - value="Glass" /> - <combo_box.item - label="Wood" - name="Wood" - value="Wood" /> - <combo_box.item - label="Flesh" - name="Flesh" - value="Flesh" /> - <combo_box.item - label="Plastic" - name="Plastic" - value="Plastic" /> - <combo_box.item - label="Rubber" - name="Rubber" - value="Rubber" /> - </combo_box> <text type="string" length="1" @@ -1943,26 +1908,26 @@ even though the user gets a free copy. <spinner follows="left|top" height="19" - increment="0.025" + increment="0.02" initial_value="0" label="B" label_width="10" layout="topleft" left_delta="0" - max_val="0.95" + max_val="0.98" name="Path Limit Begin" top_pad="3" width="68" /> <spinner follows="left|top" height="19" - increment="0.025" + increment="0.02" initial_value="1" label="E" label_width="10" layout="topleft" left_pad="10" - min_val="0.05" + min_val="0.02" name="Path Limit End" top_delta="0" width="68" /> @@ -2426,6 +2391,41 @@ even though the user gets a free copy. name="Physics Shape Type Combo Ctrl" tool_tip="Choose the physics shape type" width="108"/> + <combo_box + height="19" + layout="topleft" + name="material" + top_pad="5" + width="150"> + <combo_box.item + label="Stone" + name="Stone" + value="Stone" /> + <combo_box.item + label="Metal" + name="Metal" + value="Metal" /> + <combo_box.item + label="Glass" + name="Glass" + value="Glass" /> + <combo_box.item + label="Wood" + name="Wood" + value="Wood" /> + <combo_box.item + label="Flesh" + name="Flesh" + value="Flesh" /> + <combo_box.item + label="Plastic" + name="Plastic" + value="Plastic" /> + <combo_box.item + label="Rubber" + name="Rubber" + value="Rubber" /> + </combo_box> <spinner follows="left|top" @@ -2441,16 +2441,6 @@ even though the user gets a free copy. top_pad="10" width="132" /> - <check_box - height="19" - label="Override material" - layout="topleft" - left_delta="0" - name="Physics Material Override" - tool_tip="Override Material" - top_pad="10" - width="132" /> - <spinner follows="left|top" height="19" diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index e5ae0b950a..3ead67ca57 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -8,12 +8,6 @@ tab_stop="false" name="main_view" width="1024"> - <panel top="0" - follows="all" - height="768" - mouse_opaque="false" - name="login_panel_holder" - width="1024"/> <layout_stack border_size="0" follows="all" mouse_opaque="false" @@ -133,7 +127,14 @@ user_resize="false" visible="false" width="333"/> - </layout_stack> + </layout_stack> + <panel top="0" + follows="all" + height="500" + mouse_opaque="false" + name="login_panel_holder" + width="1024"/> + <panel follows="all" height="500" left="0" @@ -171,6 +172,7 @@ top="0" width="1024" visible="false"/> + <view mouse_opaque="false" follows="all" name="menu_bar_holder" 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 484af63097..b36b82ebd8 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -42,7 +42,7 @@ <menu_item_call.on_enable function="File.EnableUpload" /> </menu_item_call> - <menu_item_call + <menu_item_call label="Model..." layout="topleft" name="Upload Model"> @@ -54,6 +54,18 @@ <menu_item_call.on_visible function="File.VisibleUploadModel"/> </menu_item_call> + <menu_item_call + label="Model Wizard..." + layout="topleft" + name="Upload Model Wizard"> + <menu_item_call.on_click + function="Floater.Show" + parameter="upload_model_wizard" /> + <menu_item_call.on_enable + function="File.EnableUploadModel" /> + <menu_item_call.on_visible + function="File.VisibleUploadModel"/> + </menu_item_call> <menu_item_call label="Bulk (L$[COST] per file)..." layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 4bfb140d12..e8d5c97bbf 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2768,7 +2768,7 @@ <menu_item_call label="Web Content Browser" name="Web Content Browser" - shortcut="control|alt|W"> + shortcut="control|shift|Z"> <menu_item_call.on_click function="Advanced.WebContentTest" parameter="http://google.com"/> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 2335ab3c11..b3b9e7f502 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6836,6 +6836,34 @@ Deed to group failed. <notification icon="notifytip.tga" + name="ReleaseLandThrottled" + type="notifytip"> +The parcel [PARCEL_NAME] can not be abandoned at this time. + <tag>fail</tag> + </notification> + + <notification + icon="notifytip.tga" + name="ReleasedLandWithReclaim" + type="notifytip"> +The [AREA] m² parcel '[PARCEL_NAME]' has been released. + +You will have [RECLAIM_PERIOD] hours to reclaim for L$0 before it is set for sale to anyone. + <tag>fail</tag> + </notification> + + <notification + icon="notifytip.tga" + name="ReleasedLandNoReclaim" + type="notifytip"> +The [AREA] m² parcel '[PARCEL_NAME]' has been released. + +It is now available for purchase by anyone. + <tag>fail</tag> + </notification> + + <notification + icon="notifytip.tga" name="AvatarRezNotification" type="notifytip"> ( [EXISTENCE] seconds alive ) @@ -7164,6 +7192,20 @@ The site at '<nolink>[HOST_NAME]</nolink>' in realm ' </notification> <notification + name="NoPlaceInfo" + label="" + type="alertmodal" + unique="true"> + <tag>fail</tag> + <tag>confirm</tag> + Viewing place profile is only available in Advanced mode. Would you like to quit and change modes? The mode selector can be found on the login screen. + <usetemplate + name="okcancelbuttons" + yestext="Quit" + notext="Don't Quit"/> + </notification> + + <notification name="NoPicks" label="" type="alertmodal" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index a6e5e7a219..c8f8d07701 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -47,13 +47,13 @@ mouse_opaque="false" name="chat_bar_layout_panel" user_resize="true" - width="250" > + width="310" > <panel name="chat_bar" filename="panel_nearby_chat_bar.xml" left="0" height="28" - width="248" + width="308" top="0" mouse_opaque="false" follows="left|right" @@ -341,7 +341,7 @@ Disabled for now. height="28" layout="topleft" min_height="28" - min_width="62" + min_width="52" mouse_opaque="false" name="mini_map_btn_panel" user_resize="false" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 404537e1f2..cdc462109c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -150,7 +150,7 @@ top_pad="20" left="30" height="10" - width="180"> + width="400"> Enable incoming chat popups: </text> <check_box diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index f89494da72..e374c89f21 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -479,163 +479,12 @@ width="190"> </button> <panel - background_visible="false" - bg_alpha_color="DkGray" + layout="topleft" + filename="panel_sound_devices.xml" visiblity_control="ShowDeviceSettings" - border="false" - follows="top|left" - height="100" - label="Device Settings" - layout="topleft" - left_delta="-2" name="device_settings_panel" - class="panel_voice_device_settings" - width="470" - top_pad="0"> - <panel.string - name="default_text"> - Default - </panel.string> - <panel.string - name="default system device"> - Default system device - </panel.string> - <panel.string - name="no device"> - No device - </panel.string> - <icon - height="18" - image_name="Microphone_On" - left_delta="4" - name="microphone_icon" - mouse_opaque="false" - top="7" - visible="true" - width="18" /> - <text - type="string" - length="1" - font.style="BOLD" - follows="left|top" - height="16" - layout="topleft" - left_pad="3" - name="Input" - width="70"> - Input - </text> - <combo_box - height="23" - control_name="VoiceInputAudioDevice" - layout="topleft" - left_pad="0" - max_chars="128" - name="voice_input_device" - top_delta="-5" - width="200" /> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left_delta="-70" - name="My volume label" - top_pad="4" - width="200"> - My volume: - </text> - <slider_bar - control_name="AudioLevelMic" - follows="left|top" - height="17" - increment="0.025" - initial_value="1.0" - layout="topleft" - left_delta="-6" - max_val="2" - name="mic_volume_slider" - tool_tip="Change the volume using this slider" - top_pad="-1" - width="220" /> - <text - type="string" - text_color="EmphasisColor" - length="1" - follows="left|top" - height="18" - layout="topleft" - left_pad="5" - name="wait_text" - top_delta="-1" - width="110"> - Please wait - </text> - <locate - height="20" - layout="topleft" - left_delta="0" - name="bar0" - top_delta="-2" - width="20" /> - <locate - height="20" - layout="topleft" - left_pad="5" - name="bar1" - top_delta="0" - width="20" /> - <locate - height="20" - layout="topleft" - left_pad="5" - name="bar2" - top_delta="0" - width="20" /> - <locate - height="20" - layout="topleft" - left_pad="5" - name="bar3" - top_delta="0" - width="20" /> - <locate - height="20" - layout="topleft" - left_pad="5" - name="bar4" - top_delta="0" - width="20" /> - <icon - height="18" - image_name="Parcel_Voice_Light" - left="5" - name="speaker_icon" - mouse_opaque="false" - top_pad="3" - visible="true" - width="22" /> - <text - font.style="BOLD" - type="string" - length="1" - follows="left|top" - height="15" - layout="topleft" - left_pad="0" - name="Output" - width="70"> - Output - </text> - <combo_box - control_name="VoiceOutputAudioDevice" - height="23" - layout="topleft" - left_pad="0" - max_chars="128" - name="voice_output_device" - top_delta="-3" - width="200" /> - </panel> + top="314" + width="345" + left="18" + class="panel_voice_device_settings"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index e0d9f3f714..3f9195d092 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -134,6 +134,7 @@ top="190" width="80" /> <check_box + visible="FALSE" height="20" label="Allow Mesh Objects" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_sound_devices.xml b/indra/newview/skins/default/xui/en/panel_sound_devices.xml new file mode 100644 index 0000000000..ccae7c5350 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_sound_devices.xml @@ -0,0 +1,155 @@ +<panel + background_visible="false" + bg_alpha_color="DkGray" + follows="all" + height="200" + label="Device Settings" + layout="topleft" + name="device_settings_panel" + width="360"> + <panel.string + name="default_text"> + Default + </panel.string> + <icon + height="18" + image_name="Microphone_On" + left_delta="4" + name="microphone_icon" + mouse_opaque="false" + top="7" + layout="topleft" + visible="true" + width="18" /> + <text + type="string" + length="1" + font.style="BOLD" + follows="left|top" + height="16" + layout="topleft" + left_pad="3" + name="Input" + width="70"> + Input + </text> + <combo_box + height="23" + control_name="VoiceInputAudioDevice" + follows="left|top" + layout="topleft" + left_pad="0" + max_chars="128" + name="voice_input_device" + top_delta="-5" + width="200" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left_delta="-70" + name="My volume label" + top_pad="4" + width="200"> + My volume: + </text> + <slider_bar + control_name="AudioLevelMic" + follows="top|right|left" + height="17" + increment="0.025" + initial_value="1.0" + layout="topleft" + left_delta="-6" + max_val="2" + name="mic_volume_slider" + tool_tip="Change the volume using this slider" + top_pad="-1" + width="220" /> + <text + type="string" + text_color="EmphasisColor" + length="1" + follows="right|top" + height="18" + layout="topleft" + left_pad="5" + name="wait_text" + top_delta="-1" + width="110"> + Please wait + </text> + <locate + follows="right|top" + height="20" + layout="topleft" + left_delta="0" + name="bar0" + top_delta="-2" + width="20" /> + <locate + follows="right|top" + height="20" + layout="topleft" + left_pad="5" + name="bar1" + top_delta="0" + width="20" /> + <locate + follows="right|top" + height="20" + layout="topleft" + left_pad="5" + name="bar2" + top_delta="0" + width="20" /> + <locate + follows="right|top" + height="20" + layout="topleft" + left_pad="5" + name="bar3" + top_delta="0" + width="20" /> + <locate + follows="right|top" + height="20" + layout="topleft" + left_pad="5" + name="bar4" + top_delta="0" + width="20" /> + <icon + height="18" + image_name="Parcel_Voice_Light" + left="5" + name="speaker_icon" + mouse_opaque="false" + top_pad="3" + visible="true" + width="22" /> + <text + font.style="BOLD" + type="string" + length="1" + follows="left|top" + height="15" + layout="topleft" + left_pad="0" + name="Output" + width="70"> + Output + </text> + <combo_box + control_name="VoiceOutputAudioDevice" + height="23" + follows="left|top" + layout="topleft" + left_pad="0" + max_chars="128" + name="voice_output_device" + top_delta="-3" + width="200" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml index 99807d4717..d27c14f4e7 100644 --- a/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml +++ b/indra/newview/skins/default/xui/en/widgets/chiclet_im_p2p.xml @@ -21,6 +21,7 @@ width="20" /> <chiclet_im_p2p.avatar_icon bottom="3" + color="white" follows="left|top|bottom" height="20" left="2" diff --git a/indra/newview/skins/default/xui/es/floater_preview_gesture.xml b/indra/newview/skins/default/xui/es/floater_preview_gesture.xml index c58eb227aa..bd13262dcd 100644 --- a/indra/newview/skins/default/xui/es/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/es/floater_preview_gesture.xml @@ -30,15 +30,15 @@ <text name="trigger_label"> Palabra clave: </text> - <text left="208" name="replace_text" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave 'hola' por 'qué tal', se cambiará en el chat 'Quise decir hola' por 'Quise decir qué tal' en cuanto realice el gesto."> + <text name="replace_text" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave 'hola' por 'qué tal', se cambiará en el chat 'Quise decir hola' por 'Quise decir qué tal' en cuanto realice el gesto."> Reemplazar por: </text> <line_editor name="replace_editor" tool_tip="Reemplaza la/s palabra/s clave con estas palabras. Por ejemplo, si cambia la palabra clave 'hola' por 'qué tal', se cambiará en el chat 'Quise decir hola' por 'Quise decir qué tal' en cuanto realice el gesto."/> <text name="key_label"> Atajo de teclado: </text> - <combo_box label="Ninguno" left="116" name="modifier_combo" width="76"/> - <combo_box label="Ninguno" left_delta="80" name="key_combo" width="76"/> + <combo_box label="Ninguno" name="modifier_combo" width="76"/> + <combo_box label="Ninguno" name="key_combo" width="50"/> <text name="library_label"> Biblioteca: </text> @@ -55,20 +55,20 @@ <button label="Arriba" name="up_btn"/> <button label="Abajo" name="down_btn"/> <button label="Quitar" name="delete_btn"/> - <text left="230" name="options_text" width="200"> + <text name="options_text" width="200"> (opciones) </text> <radio_group name="animation_trigger_type"> <radio_item label="Empezar" name="start"/> <radio_item label="Parar" name="stop"/> </radio_group> - <check_box bottom_delta="34" label="hasta que las animaciones estén hechas" name="wait_anim_check"/> - <check_box bottom_delta="-30" label="tiempo en segundos:" name="wait_time_check"/> - <line_editor left_delta="130" name="wait_time_editor"/> + <check_box label="hasta que las animaciones estén hechas" name="wait_anim_check"/> + <check_box label="tiempo en segundos:" name="wait_time_check"/> + <line_editor name="wait_time_editor"/> <text name="help_label"> Todos los pasos suceden a la vez, a menos que añadas pasos de espera. </text> - <check_box label="Disponible" left="130" name="active_check" tool_tip="Los gestos disponibles pueden realizarse escribiendo en el chat su frase clave o pulsando su tecla de acceso rápido. Generalmente, los gestos pasan a no disponibles cuando hay un conflicto de teclas."/> - <button label="Vista previa" name="preview_btn" width="85"/> + <check_box label="Disponible" name="active_check" tool_tip="Los gestos disponibles pueden realizarse escribiendo en el chat su frase clave o pulsando su tecla de acceso rápido. Generalmente, los gestos pasan a no disponibles cuando hay un conflicto de teclas."/> + <button label="Vista previa" name="preview_btn" width="82"/> <button label="Guardar" name="save_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_tos.xml b/indra/newview/skins/default/xui/es/floater_tos.xml index f4a0897d73..89092201d9 100644 --- a/indra/newview/skins/default/xui/es/floater_tos.xml +++ b/indra/newview/skins/default/xui/es/floater_tos.xml @@ -4,7 +4,7 @@ http://secondlife.com/app/tos/ </floater.string> <floater.string name="loading_url"> - data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Cargando %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3Elas%20Condiciones%20del%20servicio%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E </floater.string> <button label="Continuar" label_selected="Continuar" name="Continue"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/es/menu_favorites.xml b/indra/newview/skins/default/xui/es/menu_favorites.xml index c8a7858ddb..85210d5c49 100644 --- a/indra/newview/skins/default/xui/es/menu_favorites.xml +++ b/indra/newview/skins/default/xui/es/menu_favorites.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> - <menu_item_call label="Teleportarse" name="Teleport To Landmark"/> + <menu_item_call label="Teleportar" name="Teleport To Landmark"/> <menu_item_call label="Ver/Editar el hito" name="Landmark Open"/> <menu_item_call label="Copiar la SLurl" name="Copy slurl"/> <menu_item_call label="Mostrar en el mapa" name="Show On Map"/> diff --git a/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml index bee4c61da2..82fc8ddd39 100644 --- a/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_inspect_avatar_gear.xml @@ -4,7 +4,7 @@ <menu_item_call label="Añadir como amigo" name="add_friend"/> <menu_item_call label="MI" name="im"/> <menu_item_call label="Llamada" name="call"/> - <menu_item_call label="Teleportarse" name="teleport"/> + <menu_item_call label="Teleportar" name="teleport"/> <menu_item_call label="Invitar al grupo" name="invite_to_group"/> <menu_item_call label="Ignorar" name="block"/> <menu_item_call label="Designorar" name="unblock"/> diff --git a/indra/newview/skins/default/xui/es/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/es/menu_teleport_history_item.xml index ed33c55aca..c482907812 100644 --- a/indra/newview/skins/default/xui/es/menu_teleport_history_item.xml +++ b/indra/newview/skins/default/xui/es/menu_teleport_history_item.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Teleport History Item Context Menu"> - <menu_item_call label="Teleportarse" name="Teleport"/> + <menu_item_call label="Teleportar" name="Teleport"/> <menu_item_call label="Más información" name="More Information"/> <menu_item_call label="Copiar al portapapeles" name="CopyToClipboard"/> </context_menu> diff --git a/indra/newview/skins/default/xui/es/panel_region_terrain.xml b/indra/newview/skins/default/xui/es/panel_region_terrain.xml index 903b826a0b..98b10e4895 100644 --- a/indra/newview/skins/default/xui/es/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/es/panel_region_terrain.xml @@ -8,7 +8,7 @@ </text> <spinner label="Nivel del agua" name="water_height_spin"/> <button label="?" name="water_height_help"/> - <spinner label="Límite de elevación del terreno" name="terrain_raise_spin"/> + <spinner label="Límite de elevación del terreno" name="terrain_raise_spin"/> <button label="?" name="terrain_raise_help"/> <spinner label="Límite de bajada del terreno" name="terrain_lower_spin" bottom_delta="-34"/> <button label="?" name="terrain_lower_help"/> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index 75126e74c5..5a913c4c9d 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -3588,6 +3588,9 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. <string name="conference-title-incoming"> Conferencia con [AGENT_NAME] </string> + <string name="inventory_item_offered-im"> + Ofrecido el item del inventario + </string> <string name="no_session_message"> (La sesión de MI no existe) </string> diff --git a/indra/newview/skins/default/xui/fr/floater_tos.xml b/indra/newview/skins/default/xui/fr/floater_tos.xml index 8a2a1e1d25..6d58cf77ca 100644 --- a/indra/newview/skins/default/xui/fr/floater_tos.xml +++ b/indra/newview/skins/default/xui/fr/floater_tos.xml @@ -4,7 +4,7 @@ http://secondlife.com/app/tos/ </floater.string> <floater.string name="loading_url"> - data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Chargement %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3Eles%20Conditions%20d%27utilisation%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E </floater.string> <button label="Continuer" label_selected="Continuer" name="Continue"/> <button label="Annuler" label_selected="Annuler" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/it/floater_preview_gesture.xml b/indra/newview/skins/default/xui/it/floater_preview_gesture.xml index 7e29db6336..2172b9848b 100644 --- a/indra/newview/skins/default/xui/it/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/it/floater_preview_gesture.xml @@ -34,10 +34,10 @@ Sostituisci con: </text> <line_editor name="replace_editor" tool_tip="Sostituisci le parole chiave con questi termini. Per esempio, sostituire la parola chiave 'salve' con 'ciao' modificherà la chat 'Volevo solo dire salve' in 'Volevo solo dire ciao' e avvierà la gesture!"/> - <text name="key_label"> + <text name="key_label" width="147"> Scorciatoia da tastiera: </text> - <combo_box label="Nessuno" name="modifier_combo" /> + <combo_box left_delta="150" label="Nessuno" name="modifier_combo" /> <combo_box label="Nessuno" name="key_combo" /> <text name="library_label"> Libreria: diff --git a/indra/newview/skins/default/xui/pl/floater_tos.xml b/indra/newview/skins/default/xui/pl/floater_tos.xml index bb2de773f0..8cdf267f4b 100644 --- a/indra/newview/skins/default/xui/pl/floater_tos.xml +++ b/indra/newview/skins/default/xui/pl/floater_tos.xml @@ -4,7 +4,7 @@ http://secondlife.com/app/tos/ </floater.string> <floater.string name="loading_url"> - data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Loading %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Ładowanie %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3EWarunki%20Serwisu%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E </floater.string> <button label="Kontynuuj" label_selected="Kontynuuj" name="Continue"/> <button label="Anuluj" label_selected="Anuluj" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/pt/floater_pay.xml b/indra/newview/skins/default/xui/pt/floater_pay.xml index 26d5710c4a..8094ad376c 100644 --- a/indra/newview/skins/default/xui/pt/floater_pay.xml +++ b/indra/newview/skins/default/xui/pt/floater_pay.xml @@ -6,18 +6,18 @@ <string name="payee_resident"> Pagar residente </string> - <text left="5" name="payee_label" width="110"> + <text left="5" name="payee_label"> Pagar: </text> <icon name="icon_person" tool_tip="Pessoa"/> - <text left="115" name="payee_name"> + <text name="payee_name"> Test Name That Is Extremely Long To Check Clipping </text> - <button label="L$1" label_selected="L$1" left="112" name="fastpay 1"/> + <button label="L$1" label_selected="L$1" name="fastpay 1"/> <button label="L$5" label_selected="L$5" name="fastpay 5"/> - <button label="L$10" label_selected="L$10" left="112" name="fastpay 10"/> + <button label="L$10" label_selected="L$10" name="fastpay 10"/> <button label="L$20" label_selected="L$20" name="fastpay 20"/> - <text left="4" name="amount text"> + <text name="amount text"> Outro valor: </text> <button label="Pagar" label_selected="Pagar" name="pay btn"/> diff --git a/indra/newview/skins/default/xui/pt/floater_tos.xml b/indra/newview/skins/default/xui/pt/floater_tos.xml index 2675979783..c4954cb61f 100644 --- a/indra/newview/skins/default/xui/pt/floater_tos.xml +++ b/indra/newview/skins/default/xui/pt/floater_tos.xml @@ -4,7 +4,7 @@ http://secondlife.com/app/tos/ </floater.string> <floater.string name="loading_url"> - data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Carregando %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETerms%20of%20Service%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E + data:text/html,%3Chtml%3E%3Chead%3E%3C/head%3E%3Cbody text=%22000000%22%3E%3Ch2%3E Carregando %3Ca%20target%3D%22_external%22%20href%3D%22http%3A//secondlife.com/app/tos/%22%3ETermos%20de%20Serviço%3C/a%3E...%3C/h2%3E %3C/body%3E %3C/html%3E </floater.string> <button label="Continuar" label_selected="Continuar" name="Continue"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index 4adfe8e37f..0786a62f13 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -2730,7 +2730,7 @@ O botão será exibido quando houver espaço suficente. Selecione os residentes com quem compartilhar. </notification> <notification name="ShareItemsConfirmation"> - Tem certeza de que quer compartilhar os items abaixo? + Tem certeza de que quer compartilhar os itens abaixo? <nolink>[ITEMS]</nolink> diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml index 6466f42c75..1dbbcafb0e 100644 --- a/indra/newview/skins/default/xui/pt/strings.xml +++ b/indra/newview/skins/default/xui/pt/strings.xml @@ -3587,6 +3587,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="conference-title-incoming"> Conversa com [AGENT_NAME] </string> + <string name="inventory_item_offered-im"> + Oferta de item de inventário + </string> <string name="no_session_message"> (Sessão de MI inexistente) </string> diff --git a/indra/newview/skins/default/xui/zh/panel_login.xml b/indra/newview/skins/default/xui/zh/panel_login.xml new file mode 100644 index 0000000000..9d094ff731 --- /dev/null +++ b/indra/newview/skins/default/xui/zh/panel_login.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="panel_login"> + <layout_stack name="login_widgets"> + <layout_panel name="login"> + <text name="username_text"> + 使用者名稱: + </text> + <text name="password_text"> + 密碼: + </text> + <check_box label="記住密碼" name="remember_check"/> + <button label="登入" name="connect_btn"/> + <text name="mode_selection_text"> + 模式: + </text> + <combo_box name="mode_combo" tool_tip="選擇一個登入模式"> + <combo_box.item label="基礎" name="Basic"/> + <combo_box.item label="進階" name="Advanced"/> + </combo_box> + <text name="start_location_text"> + 開始地點: + </text> + <combo_box name="start_location_combo"> + <combo_box.item label="上一次的地點" name="MyLastLocation"/> + <combo_box.item label="我的家" name="MyHome"/> + <combo_box.item label="<輸入區域名>" name="Typeregionname"/> + </combo_box> + </layout_panel> + <layout_panel name="links"> + <text name="create_new_account_text"> + 註冊 + </text> + <text name="forgot_password_text"> + 忘記使用者名稱或密碼? + </text> + <text name="login_help"> + 如何登入? + </text> + </layout_panel> + </layout_stack> +</panel> diff --git a/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png Binary files differnew file mode 100644 index 0000000000..b6e9eef891 --- /dev/null +++ b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Off.png diff --git a/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png Binary files differnew file mode 100644 index 0000000000..687cb7fb53 --- /dev/null +++ b/indra/newview/skins/minimal/textures/bottomtray/Speak_Btn_Selected_Press.png diff --git a/indra/newview/skins/minimal/textures/textures.xml b/indra/newview/skins/minimal/textures/textures.xml index b4848a0619..e3ed01721a 100644 --- a/indra/newview/skins/minimal/textures/textures.xml +++ b/indra/newview/skins/minimal/textures/textures.xml @@ -6,4 +6,6 @@ <texture name="bottomtray_close_off" file_name="bottomtray/close_off.png" preload="true" /> <texture name="bottomtray_close_over" file_name="bottomtray/close_over.png" preload="true" /> <texture name="bottomtray_close_press" file_name="bottomtray/close_press.png" preload="true" /> -</textures> + <texture name="Speak_Btn_Off" file_name="bottomtray/Speak_Btn_Off.png" preload="true" scale.left="4" scale.top="16" scale.right="8" scale.bottom="4" /> + <texture name="Speak_Btn_Selected_Press" file_name="bottomtray/Speak_Btn_Selected_Press.png" preload="true" scale.left="4" scale.top="16" scale.right="8" scale.bottom="4" /> + </textures> diff --git a/indra/newview/skins/minimal/xui/en/main_view.xml b/indra/newview/skins/minimal/xui/en/main_view.xml index 45ba785c1f..6e8ad9adaf 100644 --- a/indra/newview/skins/minimal/xui/en/main_view.xml +++ b/indra/newview/skins/minimal/xui/en/main_view.xml @@ -8,13 +8,13 @@ tab_stop="false" name="main_view" width="1024"> - <panel top="0" - follows="all" - height="768" - mouse_opaque="false" - name="login_panel_holder" - width="1024"/> - + <panel top="0" + follows="all" + height="768" + mouse_opaque="false" + name="login_panel_holder" + width="1024"/> + <layout_stack border_size="0" follows="all" mouse_opaque="false" @@ -96,6 +96,7 @@ name="stand_stop_flying_container" visible="false" width="500"/> + <panel follows="all" height="500" left="0" diff --git a/indra/newview/skins/minimal/xui/en/menu_attachment_other.xml b/indra/newview/skins/minimal/xui/en/menu_attachment_other.xml index b55e677276..80cf365c46 100644 --- a/indra/newview/skins/minimal/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/minimal/xui/en/menu_attachment_other.xml @@ -25,6 +25,14 @@ <menu_item_call.on_click function="Avatar.SendIM" /> </menu_item_call> + <menu_item_call + label="Call" + name="Call"> + <menu_item_call.on_click + function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableCall" /> + </menu_item_call> <menu_item_separator /> <menu_item_call enabled="false" diff --git a/indra/newview/skins/minimal/xui/en/menu_avatar_other.xml b/indra/newview/skins/minimal/xui/en/menu_avatar_other.xml index b76629f401..2c81b5a778 100644 --- a/indra/newview/skins/minimal/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/minimal/xui/en/menu_avatar_other.xml @@ -25,6 +25,14 @@ <menu_item_call.on_click function="Avatar.SendIM" /> </menu_item_call> + <menu_item_call + label="Call" + name="Call"> + <menu_item_call.on_click + function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableCall" /> + </menu_item_call> <menu_item_separator /> <menu_item_call enabled="false" diff --git a/indra/newview/skins/minimal/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/minimal/xui/en/menu_inspect_avatar_gear.xml index 5a4a059781..a11e367d66 100644 --- a/indra/newview/skins/minimal/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/minimal/xui/en/menu_inspect_avatar_gear.xml @@ -27,6 +27,15 @@ function="InspectAvatar.IM"/> </menu_item_call> <menu_item_call + label="Call" + enabled="true" + name="call"> + <menu_item_call.on_click + function="InspectAvatar.Call"/> + <menu_item_call.on_enable + function="InspectAvatar.Gear.EnableCall"/> + </menu_item_call> + <menu_item_call label="Teleport" name="teleport"> <menu_item_call.on_click diff --git a/indra/newview/skins/minimal/xui/en/menu_people_nearby.xml b/indra/newview/skins/minimal/xui/en/menu_people_nearby.xml index 3d64133f54..1840ebd491 100644 --- a/indra/newview/skins/minimal/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/minimal/xui/en/menu_people_nearby.xml @@ -36,6 +36,16 @@ <menu_item_call.on_click function="Avatar.IM" /> </menu_item_call> + <menu_item_call + label="Call" + layout="topleft" + name="Call"> + <menu_item_call.on_click + function="Avatar.Call" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_call" /> + </menu_item_call> <menu_item_check label="Block/Unblock" layout="topleft" diff --git a/indra/newview/skins/minimal/xui/en/notification_visibility.xml b/indra/newview/skins/minimal/xui/en/notification_visibility.xml index 616b544847..bdd3c3d4a4 100644 --- a/indra/newview/skins/minimal/xui/en/notification_visibility.xml +++ b/indra/newview/skins/minimal/xui/en/notification_visibility.xml @@ -1,12 +1,9 @@ <?xml version="1.0" ?> <notification_visibility> - <respond name="VoiceInviteP2P" response="Decline"/> - <respond name="VoiceInviteAdHoc" response="Decline"/> <respond name="VoiceInviteGroup" response="Decline"/> <!-- group and voice are disabled features --> <hide tag="group"/> - <hide tag="voice"/> <!-- no spammy scripts --> <!-- <hide name="ScriptDialog"/> --> @@ -16,6 +13,7 @@ <hide name="FirstInventory"/> <hide name="HintSidePanel"/> <hide name="HintMove"/> + <hide name="HintSpeak"/> <hide name="HintDisplayName"/> <hide name="HintInventory"/> <hide name="HintLindenDollar"/> diff --git a/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml index 5730adab8a..39d1a90850 100644 --- a/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/minimal/xui/en/panel_adhoc_control_panel.xml @@ -42,5 +42,40 @@ show_speaking_indicator="false" width="147" /> </layout_panel> + <layout_panel + auto_resize="false" + follows="top|left|right" + height="25" + layout="topleft" + min_height="25" + width="130" + name="call_btn_panel" + user_resize="false" + visible="false"> + <button + follows="all" + height="20" + label="Call" + name="call_btn" + width="130" + top="5" /> + </layout_panel> + <layout_panel + auto_resize="false" + follows="top|left|right" + height="25" + layout="topleft" + min_height="25" + width="130" + name="end_call_btn_panel" + user_resize="false" + visible="false"> + <button + follows="all" + height="20" + label="Leave Call" + name="end_call_btn" + top="5"/> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml index e0c0bd13d9..d722c54081 100644 --- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml @@ -47,7 +47,7 @@ mouse_opaque="false" name="chat_bar_layout_panel" user_resize="true" - width="308" > + width="312" > <panel name="chat_bar" filename="panel_nearby_chat_bar.xml" @@ -61,6 +61,79 @@ </layout_panel> <layout_panel auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="35" + mouse_opaque="false" + name="speak_panel" + top_delta="0" + user_resize="false" + width="85"> + <button + follows="left|right" + height="23" + layout="topleft" + label="Speak" + left="0" + name="speak_btn" + tool_tip="Turn your microphone on and off" + pad_right="30" + halign="center" + use_ellipses="true" + tab_stop="true" + is_toggle="true" + image_selected="Speak_Btn_Selected_Press" + image_unselected="Speak_Btn_Off" + image_pressed="Speak_Btn_Selected_Press" + image_pressed_selected="Speak_Btn_Selected_Press" + top="5" + width="85"> + + <commit_callback + function="ToggleSpeak" + parameter="f1_help" /> + </button> + </layout_panel> + + <layout_panel + auto_resize="false" + follows="left|right" + height="28" + layout="topleft" + min_height="28" + min_width="20" + mouse_opaque="false" + name="speak_flyout_panel" + top_delta="0" + user_resize="false" + width="26"> + <button + follows="left|right" + width="20" + top="5" + left="0" + height="23" + name="flyout_btn" + label="" + tab_stop="false" + tool_tip="Change your sound preferences" + is_toggle="true" + image_disabled="ComboButton_UpOff" + image_unselected="ComboButton_UpOff" + image_selected="ComboButton_On" + image_pressed="ComboButton_UpSelected" + image_pressed_selected="ComboButton_Selected"> + <init_callback + function="Button.SetDockableFloaterToggle" + parameter="sound_devices" /> + </button> + + </layout_panel> + + <layout_panel + auto_resize="false" follows="right" height="28" layout="topleft" @@ -70,7 +143,7 @@ name="gesture_panel" top_delta="0" user_resize="false" - width="85"> + width="88"> <gesture_combo_list follows="left|right" height="23" @@ -80,7 +153,7 @@ view_all="false" left="0" name="Gesture" - tool_tip="Shows/hides gestures" + tool_tip="Make your avatar do things" top="5" width="82"> <combo_button @@ -101,7 +174,7 @@ mouse_opaque="false" name="cam_panel" user_resize="false" - width="83"> + width="86"> <bottomtray_button can_drag="false" follows="left|right" @@ -114,7 +187,7 @@ layout="topleft" left="0" name="camera_btn" - tool_tip="Shows/hides camera controls" + tool_tip="Control your camera angle" top="5" use_ellipses="true" width="80"> @@ -128,15 +201,15 @@ follows="left|right" height="28" layout="topleft" - min_width="17" - name="splitter_panel" + min_width="8" + name="splitter_panel_1" user_resize="false" - width="17"> + width="8"> <icon follows="left|bottom" height="18" width="2" - left="6" + left="0" image_name="Button_Separator" name="separator" top="7"/> @@ -149,9 +222,9 @@ min_height="28" min_width="83" mouse_opaque="false" - name="avatar_and_destinations_panel" + name="destinations_panel" user_resize="false" - width="103"> + width="106"> <bottomtray_button can_drag="false" follows="left|right" @@ -163,7 +236,7 @@ layout="topleft" left="0" name="destination_btn" - tool_tip="Shows destinations window" + tool_tip="Travel through Second Life" top="5" is_toggle="true" use_ellipses="true" @@ -180,9 +253,9 @@ min_height="28" min_width="73" mouse_opaque="false" - name="avatar_and_destinations_panel" + name="avatar_panel" user_resize="false" - width="103"> + width="106"> <bottomtray_button can_drag="false" follows="left|right" @@ -196,6 +269,7 @@ name="avatar_btn" top="5" is_toggle="true" + tool_tip="Change your appearance" use_ellipses="true" width="100"> <bottomtray_button.commit_callback @@ -207,15 +281,15 @@ follows="left|right" height="28" layout="topleft" - min_width="17" - name="splitter_panel" + min_width="8" + name="splitter_panel_2" user_resize="false" - width="17"> + width="8"> <icon follows="left|bottom" height="18" width="2" - left="6" + left="0" image_name="Button_Separator" name="separator" top="7"/> @@ -231,7 +305,7 @@ name="people_panel" top_delta="0" user_resize="false" - width="105"> + width="106"> <bottomtray_button can_drag="false" follows="left|right" @@ -243,7 +317,7 @@ layout="topleft" left="0" name="show_people_button" - tool_tip="Shows people window" + tool_tip="Find people in Second Life" top="5" is_toggle="true" use_ellipses="true" @@ -264,7 +338,7 @@ name="profile_panel" top_delta="0" user_resize="false" - width="105"> + width="106"> <bottomtray_button can_drag="false" follows="left|right" @@ -276,7 +350,7 @@ layout="topleft" left="0" name="show_profile_btn" - tool_tip="Shows profile window" + tool_tip="View and edit your Profile" is_toggle="true" top="5" use_ellipses="true" @@ -297,7 +371,7 @@ name="howto_panel" top_delta="0" user_resize="false" - width="105"> + width="106"> <bottomtray_button can_drag="false" follows="left|right" @@ -309,7 +383,7 @@ layout="topleft" left="0" name="show_help_btn" - tool_tip="Open Second Life How To topics" + tool_tip="View Second Life help info" is_toggle="true" top="5" use_ellipses="true" diff --git a/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml b/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml index c3f46f11e0..be13bc1bb7 100644 --- a/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/minimal/xui/en/panel_im_control_panel.xml @@ -78,6 +78,39 @@ width="140" /> </layout_panel> <layout_panel + auto_resize="false" + follows="top|left|right" + height="25" + layout="topleft" + min_height="25" + width="140" + name="call_btn_panel" + user_resize="false"> + <button + follows="left|top|right" + height="23" + label="Call" + name="call_btn" + width="140" /> + </layout_panel> + <layout_panel + auto_resize="false" + follows="top|left|right" + height="25" + layout="topleft" + min_height="25" + width="140" + name="end_call_btn_panel" + user_resize="false" + visible="false"> + <button + follows="left|top|right" + height="23" + label="End Call" + name="end_call_btn" + width="140" /> + </layout_panel> + <layout_panel mouse_opaque="false" auto_resize="true" follows="top|left" diff --git a/indra/newview/skins/minimal/xui/en/panel_people.xml b/indra/newview/skins/minimal/xui/en/panel_people.xml index 4a72653d76..76baacb091 100644 --- a/indra/newview/skins/minimal/xui/en/panel_people.xml +++ b/indra/newview/skins/minimal/xui/en/panel_people.xml @@ -452,6 +452,27 @@ Looking for people to hang out with? Try the Destinations button below. name="chat_btn_lp" user_resize="false" auto_resize="true" + width="52"> + <button + follows="bottom|left|right" + left="1" + height="23" + label="Call" + layout="topleft" + name="call_btn" + tool_tip="Call this Resident" + top="0" + width="51" /> + </layout_panel> + + <layout_panel + follows="bottom|left|right" + height="23" + layout="bottomleft" + left_pad="3" + name="chat_btn_lp" + user_resize="false" + auto_resize="true" width="77"> <button follows="bottom|left|right" diff --git a/indra/newview/skins/minimal/xui/es/menu_favorites.xml b/indra/newview/skins/minimal/xui/es/menu_favorites.xml index c8a7858ddb..85210d5c49 100644 --- a/indra/newview/skins/minimal/xui/es/menu_favorites.xml +++ b/indra/newview/skins/minimal/xui/es/menu_favorites.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <menu name="Popup"> - <menu_item_call label="Teleportarse" name="Teleport To Landmark"/> + <menu_item_call label="Teleportar" name="Teleport To Landmark"/> <menu_item_call label="Ver/Editar el hito" name="Landmark Open"/> <menu_item_call label="Copiar la SLurl" name="Copy slurl"/> <menu_item_call label="Mostrar en el mapa" name="Show On Map"/> diff --git a/indra/newview/skins/minimal/xui/es/menu_inspect_avatar_gear.xml b/indra/newview/skins/minimal/xui/es/menu_inspect_avatar_gear.xml index ebe33cea11..b4b964d096 100644 --- a/indra/newview/skins/minimal/xui/es/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/minimal/xui/es/menu_inspect_avatar_gear.xml @@ -3,7 +3,7 @@ <menu_item_call label="Ver el perfil" name="view_profile"/> <menu_item_call label="Añadir como amigo" name="add_friend"/> <menu_item_call label="MI" name="im"/> - <menu_item_call label="Teleportarse" name="teleport"/> + <menu_item_call label="Teleportar" name="teleport"/> <menu_item_call label="Ignorar" name="block"/> <menu_item_call label="Designorar" name="unblock"/> <menu_item_call label="Denunciar" name="report"/> diff --git a/indra/newview/skins/minimal/xui/es/menu_teleport_history_item.xml b/indra/newview/skins/minimal/xui/es/menu_teleport_history_item.xml index ed33c55aca..c482907812 100644 --- a/indra/newview/skins/minimal/xui/es/menu_teleport_history_item.xml +++ b/indra/newview/skins/minimal/xui/es/menu_teleport_history_item.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Teleport History Item Context Menu"> - <menu_item_call label="Teleportarse" name="Teleport"/> + <menu_item_call label="Teleportar" name="Teleport"/> <menu_item_call label="Más información" name="More Information"/> <menu_item_call label="Copiar al portapapeles" name="CopyToClipboard"/> </context_menu> diff --git a/indra/newview/tests/llremoteparcelrequest_test.cpp b/indra/newview/tests/llremoteparcelrequest_test.cpp index 9a6e08ee84..ed66066b0a 100644 --- a/indra/newview/tests/llremoteparcelrequest_test.cpp +++ b/indra/newview/tests/llremoteparcelrequest_test.cpp @@ -35,7 +35,6 @@ #include "llurlentry.h" namespace { - LLControlGroup s_saved_settings("dummy_settings"); const LLUUID TEST_PARCEL_ID("11111111-1111-1111-1111-111111111111"); } @@ -64,13 +63,12 @@ LLMessageSystem * gMessageSystem; char const* const _PREHASH_AgentID = 0; // never dereferenced during this test char const* const _PREHASH_AgentData = 0; // never dereferenced during this test LLAgent gAgent; -LLAgent::LLAgent() : mAgentAccess(s_saved_settings) { } +LLAgent::LLAgent() : mAgentAccess(NULL) { } LLAgent::~LLAgent() { } void LLAgent::sendReliableMessage(void) { } LLUUID gAgentSessionID; LLUUID gAgentID; LLUIColor::LLUIColor(void) { } -LLAgentAccess::LLAgentAccess(LLControlGroup & settings) : mSavedSettings(settings) { } LLControlGroup::LLControlGroup(std::string const & name) : LLInstanceTracker<LLControlGroup, std::string>(name) { } LLControlGroup::~LLControlGroup(void) { } void LLUrlEntryParcel::processParcelInfo(const LLUrlEntryParcel::LLParcelData& parcel_data) { } diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index b425b50c8b..710881d811 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -73,11 +73,9 @@ static void substitute_string(std::string &input, const std::string &search, con } #include "../llagent.h" -LLAgent::LLAgent() : mAgentAccess(gSavedSettings) { } +LLAgent::LLAgent() : mAgentAccess(NULL) { } LLAgent::~LLAgent() { } bool LLAgent::isGodlike() const { return FALSE; } -LLAgentAccess::LLAgentAccess(LLControlGroup& settings) : mSavedSettings(settings) { } -LLUIColor::LLUIColor() {} LLAgent gAgent; diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp index 4d5df1043e..711c2a3d51 100644 --- a/indra/newview/tests/llxmlrpclistener_test.cpp +++ b/indra/newview/tests/llxmlrpclistener_test.cpp @@ -40,8 +40,10 @@ #include "llevents.h" #include "lleventfilter.h" #include "llsd.h" +#include "llhost.h" #include "llcontrol.h" #include "tests/wrapllerrs.h" +#include "tests/commtest.h" LLControlGroup gSavedSettings("Global"); @@ -54,7 +56,8 @@ namespace tut { data(): pumps(LLEventPumps::instance()), - uri("http://127.0.0.1:8000") + uri(std::string("http://") + + LLHost("127.0.0.1", commtest_data::getport("PORT")).getString()) { // These variables are required by machinery used by // LLXMLRPCTransaction. The values reflect reality for this test @@ -145,7 +148,7 @@ namespace tut pumps.obtain("LLXMLRPCTransaction").post(request); // Set the timer F32 timeout(10); - watchdog.eventAfter(timeout, LLSD().insert("timeout", 0)); + watchdog.eventAfter(timeout, LLSD().with("timeout", 0)); // and pump "mainloop" until we get something, whether from // LLXMLRPCListener or from the watchdog filter. LLTimer timer; @@ -182,7 +185,7 @@ namespace tut pumps.obtain("LLXMLRPCTransaction").post(request); // Set the timer F32 timeout(10); - watchdog.eventAfter(timeout, LLSD().insert("timeout", 0)); + watchdog.eventAfter(timeout, LLSD().with("timeout", 0)); // and pump "mainloop" until we get something, whether from // LLXMLRPCListener or from the watchdog filter. LLTimer timer; @@ -218,7 +221,7 @@ namespace tut pumps.obtain("LLXMLRPCTransaction").post(request); // Set the timer F32 timeout(10); - watchdog.eventAfter(timeout, LLSD().insert("timeout", 0)); + watchdog.eventAfter(timeout, LLSD().with("timeout", 0)); // and pump "mainloop" until we get something, whether from // LLXMLRPCListener or from the watchdog filter. LLTimer timer; diff --git a/indra/newview/tests/test_llxmlrpc_peer.py b/indra/newview/tests/test_llxmlrpc_peer.py index 1c7204a6b6..281b72a058 100644 --- a/indra/newview/tests/test_llxmlrpc_peer.py +++ b/indra/newview/tests/test_llxmlrpc_peer.py @@ -37,7 +37,7 @@ from SimpleXMLRPCServer import SimpleXMLRPCServer mydir = os.path.dirname(__file__) # expected to be .../indra/newview/tests/ sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) sys.path.insert(1, os.path.join(mydir, os.pardir, os.pardir, "llmessage", "tests")) -from testrunner import run, debug +from testrunner import freeport, run, debug class TestServer(SimpleXMLRPCServer): def _dispatch(self, method, params): @@ -66,11 +66,16 @@ class TestServer(SimpleXMLRPCServer): # Suppress error output as well pass -class ServerRunner(Thread): - def run(self): - server = TestServer(('127.0.0.1', 8000)) - debug("Starting XMLRPC server...\n") - server.serve_forever() - if __name__ == "__main__": - sys.exit(run(server=ServerRunner(name="xmlrpc"), *sys.argv[1:])) + # Instantiate a TestServer on the first free port in the specified port + # range. Doing this inline is better than in a daemon thread: if it blows + # up here, we'll get a traceback. If it blew up in some other thread, the + # traceback would get eaten and we'd run the subject test program anyway. + xmlrpcd, port = freeport(xrange(8000, 8020), + lambda port: TestServer(('127.0.0.1', port))) + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["PORT"] = str(port) + sys.exit(run(server=Thread(name="xmlrpc", target=xmlrpcd.serve_forever), *sys.argv[1:])) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index a04b4a9ca0..8aa94616d6 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -114,6 +114,16 @@ class ViewerManifest(LLManifest): # Files in the newview/ directory self.path("gpu_table.txt") + # The summary.json file gets left in the base checkout dir by + # build.sh. It's only created for a build.sh build, therefore we + # have to check whether it exists. :-P + summary_json = "summary.json" + summary_json_path = os.path.join(os.pardir, os.pardir, summary_json) + if os.path.exists(os.path.join(self.get_src_prefix(), summary_json_path)): + self.path(summary_json_path, summary_json) + else: + print "No %s" % os.path.join(self.get_src_prefix(), summary_json_path) + def login_channel(self): """Channel reported for login and upgrade purposes ONLY; used for A/B testing""" diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index fe64926da6..7720619df3 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -9,13 +9,11 @@ endif(LL_TESTS) include(LLCommon) include(LLMath) include(LLXML) -include(Pth) include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLMATH_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} - ${PTH_INCLUDE_DIRS} ) set(login_SOURCE_FILES @@ -42,7 +40,6 @@ target_link_libraries(lllogin ${LLCOMMON_LIBRARIES} ${LLMATH_LIBRARIES} ${LLXML_LIBRARIES} - ${PTH_LIBRARIES} ) if(LL_TESTS) @@ -50,11 +47,5 @@ if(LL_TESTS) lllogin.cpp ) - set_source_files_properties( - lllogin.cpp - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${PTH_LIBRARIES}" - ) - LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}") endif(LL_TESTS) diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp index 88ab5a2284..e19d5724f1 100644 --- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp +++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp @@ -59,12 +59,6 @@ class LLDir_Mock : public LLDir return 0; } - BOOL getNextFileInDir(const std::string &dirname, - const std::string &mask, - std::string &fname) - { - return false; - } void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) {} |