This commit is contained in:
Lirusaito
2013-03-08 02:57:48 -05:00
1970 changed files with 661 additions and 4900 deletions

View File

@@ -70,10 +70,6 @@ if(STANDALONE)
add_subdirectory(${LIBS_OPEN_PREFIX}llqtwebkit)
endif(STANDALONE)
if (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE)
add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu)
endif (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE)
#add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
@@ -81,73 +77,43 @@ if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
add_custom_target(viewer)
if (VIEWER)
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
# viewer plugins directory
add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
# viewer plugins directory
add_subdirectory(${LIBS_OPEN_PREFIX}plugins)
# llplugin testbed code (is this the right way to include it?)
#if (NOT LINUX)
# add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
#endif (NOT LINUX)
# llplugin testbed code (is this the right way to include it?)
#if (NOT LINUX)
# add_subdirectory(${VIEWER_PREFIX}test_apps/llplugintest)
#endif (NOT LINUX)
if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
add_dependencies(viewer linux-crash-logger-strip-target)
elseif (DARWIN)
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
add_dependencies(viewer mac-crash-logger)
#add_dependencies(viewer mac-updater)
elseif (WINDOWS)
add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
if (EXISTS ${VIEWER_DIR}win_setup)
add_subdirectory(${VIEWER_DIR}win_setup)
endif (EXISTS ${VIEWER_DIR}win_setup)
add_subdirectory(${VIEWER_PREFIX}win_updater)
add_dependencies(viewer windows-updater)
add_dependencies(viewer windows-crash-logger)
elseif (SOLARIS)
add_subdirectory(solaris_crash_logger)
add_dependencies(viewer solaris-crash-logger)
endif (LINUX)
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
add_subdirectory(${VIEWER_PREFIX}newview)
add_dependencies(viewer secondlife-bin)
endif (VIEWER)
# Linux builds the viewer and server in 2 separate projects
# In order for ./develop.py build server to work on linux,
# the viewer project needs a server target.
# This is not true for mac and windows.
if (LINUX)
add_custom_target(server)
if (LINUX)
add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
add_dependencies(viewer linux-crash-logger-strip-target)
elseif (DARWIN)
#add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
#add_subdirectory(${VIEWER_PREFIX}mac_updater)
add_dependencies(viewer mac-crash-logger)
#add_dependencies(viewer mac-updater)
elseif (WINDOWS)
add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
if (EXISTS ${VIEWER_DIR}win_setup)
add_subdirectory(${VIEWER_DIR}win_setup)
endif (EXISTS ${VIEWER_DIR}win_setup)
add_subdirectory(${VIEWER_PREFIX}win_updater)
add_dependencies(viewer windows-updater)
add_dependencies(viewer windows-crash-logger)
elseif (SOLARIS)
add_subdirectory(solaris_crash_logger)
add_dependencies(viewer solaris-crash-logger)
endif (LINUX)
if (SERVER)
if (NOT LINUX)
add_custom_target(server)
endif (NOT LINUX)
include(${SERVER_PREFIX}Server.cmake)
endif (SERVER)
# Windows builds include tools like VFS tool
if (SERVER)
if (WINDOWS)
add_subdirectory(${SERVER_PREFIX}tools)
endif (WINDOWS)
endif (SERVER)
# Configure prebuilt binary download. This must be done last so that
# all subdirectories have a chance to list the packages they need.
# We need scp for proprietary downloads.
if(INSTALL_PROPRIETARY)
include(FindSCP)
endif(INSTALL_PROPRIETARY)
add_subdirectory(${VIEWER_PREFIX}newview/statemachine)
add_subdirectory(${VIEWER_PREFIX}newview)
add_dependencies(viewer secondlife-bin)
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
# packages in the PREBUILT property of the 'prepare' target.

View File

@@ -2,6 +2,9 @@
#
# Compilation options shared by all Second Life components.
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables)
@@ -309,8 +312,6 @@ else (STANDALONE)
endif (STANDALONE)
if(1 EQUAL 1)
add_definitions(-DOPENSIM_RULES=1)
add_definitions(-DMESH_ENABLED=1)
add_definitions(-DENABLE_CLASSIC_CLOUDS=1)
if (NOT "$ENV{SHY_MOD}" STREQUAL "")
add_definitions(-DSHY_MOD=1)
@@ -331,3 +332,5 @@ MARK_AS_ADVANCED(
CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE
)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)

View File

@@ -21,8 +21,6 @@ else (STANDALONE)
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libapriconv-1.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libapriconv-1.lib
)
# Doesn't need to link with iconv.dll
set(APRICONV_LIBRARIES "")
set(APRUTIL_LIBRARIES
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libaprutil-1.lib ${APRICONV_LIBRARIES}
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.lib ${APRICONV_LIBRARIES}
@@ -44,7 +42,7 @@ else (STANDALONE)
endif (WINDOWS)
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1)
if (LINUX AND VIEWER)
if (LINUX)
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
endif (LINUX AND VIEWER)
endif (LINUX)
endif (STANDALONE)

View File

@@ -15,20 +15,8 @@ else (STANDALONE)
if (WINDOWS)
set(BOOST_VERSION 1_45)
# SNOW-788
# 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc
# The precompiled boost libs for VC71 use a different suffix to VS80 and VS90
# This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate
# boost libs are avaiable - RC.
if (MSVC71)
set(BOOST_OPTIM_SUFFIX mt-s)
set(BOOST_DEBUG_SUFFIX mt-sgd)
else (MSVC71)
set(BOOST_OPTIM_SUFFIX mt)
set(BOOST_DEBUG_SUFFIX mt-gd)
endif (MSVC71)
set(BOOST_OPTIM_SUFFIX mt)
set(BOOST_DEBUG_SUFFIX mt-gd)
set(Boost_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}

View File

@@ -8,79 +8,96 @@ set(cmake_SOURCE_FILES
CMakeLists.txt
00-Common.cmake
AIStateMachine.cmake
APR.cmake
Audio.cmake
BasicPluginBase.cmake
BerkeleyDB.cmake
Boost.cmake
BuildVersion.cmake
CARes.cmake
CURL.cmake
CMakeCopyIfDifferent.cmake
CURL.cmake
Colladadom.cmake
ConfigurePkgConfig.cmake
CopyBackToSource.cmake
CopyWinLibs.cmake
CSharpMacros.cmake
Cwdebug.cmake
DBusGlib.cmake
DirectX.cmake
DownloadPrebuilt.cmake.in
ELFIO.cmake
EXPAT.cmake
ExamplePlugin.cmake
FMOD.cmake
FMODEX.cmake
FindAPR.cmake
FindBerkeleyDB.cmake
FindCARes.cmake
FindColladadom.cmake
FindELFIO.cmake
FindGLOD.cmake
FindGooglePerfTools.cmake
FindHunSpell.cmake
FindMT.cmake
FindJsonCpp.cmake
FindLLQtWebkit.cmake
FindNDOF.cmake
FindOpenJPEG.cmake
FindTut.cmake
FindXmlRpcEpi.cmake
FMOD.cmake
FMODEX.cmake
FreeType.cmake
GLOD.cmake
GStreamer010Plugin.cmake
Glui.cmake
Glut.cmake
GooglePerfTools.cmake
Hunspell.cmake
JPEG.cmake
JsonCpp.cmake
LLAddBuildTest.cmake
LLAppearance.cmake
LLAudio.cmake
LLCharacter.cmake
LLCommon.cmake
LLCrashLogger.cmake
LLDatabase.cmake
LLImage.cmake
LLImageJ2COJ.cmake
LLInventory.cmake
LLKDU.cmake
LLMath.cmake
LLMessage.cmake
LLPhysicsExtensions.cmake
LLPlugin.cmake
LLPrimitive.cmake
LLPhysicsExtensions.cmake
LLQtWebkit.cmake
LLRender.cmake
LLScene.cmake
LLUI.cmake
LLVFS.cmake
LLWindow.cmake
LLXML.cmake
# LScript.cmake
LScript.cmake
Linking.cmake
MediaPluginBase.cmake
NDOF.cmake
OPENAL.cmake
OpenGL.cmake
OpenJPEG.cmake
OpenSSL.cmake
PNG.cmake
Python.cmake
PluginAPI.cmake
Prebuilt.cmake
PulseAudio.cmake
Python.cmake
Qt4.cmake
QuickTimePlugin.cmake
RunBuildTest.cmake
StateMachine.cmake
TemplateCheck.cmake
Tut.cmake
UI.cmake
UnixInstall.cmake
Variables.cmake
ViewerMiscLibs.cmake
WebKitLibPlugin.cmake
XmlRpcEpi.cmake
ZLIB.cmake
)
@@ -92,10 +109,6 @@ set(master_SOURCE_FILES
../develop.py
)
if (SERVER)
list(APPEND master_SOURCE_FILES ../Server.cmake)
endif (SERVER)
source_group("Master Rules" FILES ${master_SOURCE_FILES})
set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES}

View File

@@ -1,142 +0,0 @@
# - This is a support module for easy Mono/C# handling with CMake
# It defines the following macros:
#
# ADD_CS_LIBRARY (<target> <source>)
# ADD_CS_EXECUTABLE (<target> <source>)
# INSTALL_GAC (<target>)
#
# Note that the order of the arguments is important.
#
# You can optionally set the variable CS_FLAGS to tell the macros whether
# to pass additional flags to the compiler. This is particularly useful to
# set assembly references, unsafe code, etc... These flags are always reset
# after the target was added so you don't have to care about that.
#
# copyright (c) 2007 Arno Rehn arno@arnorehn.de
#
# Redistribution and use is allowed according to the terms of the GPL license.
# ----- support macros -----
MACRO(GET_CS_LIBRARY_TARGET_DIR)
IF (NOT LIBRARY_OUTPUT_PATH)
SET(CS_LIBRARY_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
ELSE (NOT LIBRARY_OUTPUT_PATH)
SET(CS_LIBRARY_TARGET_DIR ${LIBRARY_OUTPUT_PATH})
ENDIF (NOT LIBRARY_OUTPUT_PATH)
ENDMACRO(GET_CS_LIBRARY_TARGET_DIR)
MACRO(GET_CS_EXECUTABLE_TARGET_DIR)
IF (NOT EXECUTABLE_OUTPUT_PATH)
SET(CS_EXECUTABLE_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
ELSE (NOT EXECUTABLE_OUTPUT_PATH)
SET(CS_EXECUTABLE_TARGET_DIR ${EXECUTABLE_OUTPUT_PATH})
ENDIF (NOT EXECUTABLE_OUTPUT_PATH)
ENDMACRO(GET_CS_EXECUTABLE_TARGET_DIR)
MACRO(MAKE_PROPER_FILE_LIST)
FOREACH(file ${ARGN})
# first assume it's a relative path
FILE(GLOB globbed ${CMAKE_CURRENT_SOURCE_DIR}/${file})
IF(globbed)
FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${file} native)
ELSE(globbed)
FILE(TO_NATIVE_PATH ${file} native)
ENDIF(globbed)
SET(proper_file_list ${proper_file_list} ${native})
SET(native "")
ENDFOREACH(file)
ENDMACRO(MAKE_PROPER_FILE_LIST)
# ----- end support macros -----
MACRO(ADD_CS_LIBRARY target)
GET_CS_LIBRARY_TARGET_DIR()
SET(target_DLL "${CS_LIBRARY_TARGET_DIR}/${target}.dll")
MAKE_PROPER_FILE_LIST(${ARGN})
FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_DLL})
SET(target_KEY "${CMAKE_CURRENT_SOURCE_DIR}/${target}.key")
SET(target_CS_FLAGS "${CS_FLAGS}")
IF(${target}_CS_FLAGS)
LIST(APPEND target_CS_FLAGS ${${target}_CS_FLAGS})
ENDIF(${target}_CS_FLAGS)
IF(EXISTS ${target_KEY})
LIST(APPEND target_CS_FLAGS -keyfile:${target_KEY})
ENDIF(EXISTS ${target_KEY})
FOREACH(ref ${${target}_REFS})
SET(ref_DLL ${CMAKE_CURRENT_BINARY_DIR}/${ref}.dll)
IF(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref_DLL})
ELSE(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref})
ENDIF(EXISTS ${ref_DLL})
ENDFOREACH(ref ${${target}_REFS})
ADD_CUSTOM_COMMAND (OUTPUT ${target_DLL}
COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_DLL} -target:library ${proper_file_list}
MAIN_DEPENDENCY ${proper_file_list}
DEPENDS ${ARGN}
COMMENT "Building ${relative_path}")
ADD_CUSTOM_TARGET (${target} ALL DEPENDS ${target_DLL})
FOREACH(ref ${${target}_REFS})
GET_TARGET_PROPERTY(is_target ${ref} TYPE)
IF(is_target)
ADD_DEPENDENCIES(${target} ${ref})
ENDIF(is_target)
ENDFOREACH(ref ${${target}_REFS})
SET(relative_path "")
SET(proper_file_list "")
ENDMACRO(ADD_CS_LIBRARY)
MACRO(ADD_CS_EXECUTABLE target)
GET_CS_EXECUTABLE_TARGET_DIR()
# Seems like cmake doesn't like the ".exe" ending for custom commands.
# If we call it ${target}.exe, 'make' will later complain about a missing rule.
# Create a fake target instead.
SET(target_EXE "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe")
SET(target_TOUCH "${CS_EXECUTABLE_TARGET_DIR}/${target}.exe-built")
GET_DIRECTORY_PROPERTY(clean ADDITIONAL_MAKE_CLEAN_FILES)
LIST(APPEND clean ${target}.exe)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${clean}")
MAKE_PROPER_FILE_LIST(${ARGN})
FILE(RELATIVE_PATH relative_path ${CMAKE_BINARY_DIR} ${target_EXE})
SET(target_CS_FLAGS "${CS_FLAGS}")
FOREACH(ref ${${target}_REFS})
SET(ref_DLL ${CMAKE_CURRENT_SOURCE_DIR}/${ref}.dll)
IF(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref_DLL})
ELSE(EXISTS ${ref_DLL})
LIST(APPEND target_CS_FLAGS -r:${ref})
ENDIF(EXISTS ${ref_DLL})
ENDFOREACH(ref ${${target}_REFS})
ADD_CUSTOM_COMMAND (OUTPUT "${target_TOUCH}"
COMMAND ${MCS_EXECUTABLE} ${target_CS_FLAGS} -out:${target_EXE} ${proper_file_list}
COMMAND ${CMAKE_COMMAND} -E touch ${target_TOUCH}
MAIN_DEPENDENCY ${ARGN}
DEPENDS ${ARGN}
COMMENT "Building ${relative_path}")
ADD_CUSTOM_TARGET ("${target}" ALL DEPENDS "${target_TOUCH}")
FOREACH(ref ${${target}_REFS})
GET_TARGET_PROPERTY(is_target ${ref} TYPE)
IF(is_target)
ADD_DEPENDENCIES(${target} ${ref})
ENDIF(is_target)
ENDFOREACH(ref ${${target}_REFS})
SET(relative_path "")
SET(proper_file_list "")
ENDMACRO(ADD_CS_EXECUTABLE)
MACRO(INSTALL_GAC target)
GET_CS_LIBRARY_TARGET_DIR()
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${GACUTIL_EXECUTABLE} -i ${CS_LIBRARY_TARGET_DIR}/${target}.dll -package 2.0)")
ENDMACRO(INSTALL_GAC target)

View File

@@ -0,0 +1,74 @@
# -*- cmake -*-
SET(DEBUG_PKG_CONFIG "YES")
# Don't change this if manually set by user.
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
# Guess at architecture-specific system library paths.
if (WORD_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
else (WORD_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
endif (WORD_SIZE EQUAL 32)
# Use DPKG architecture, if available.
IF (${DPKG_ARCH})
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/${DPKG_ARCH})
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usrlocal/lib/${DPKG_ARCH})
ENDIF (${DPKG_ARCH})
# Explicitly include anything listed in PKG_CONFIG_PATH
string(REPLACE ":" ";" PKG_CONFIG_PATH_LIST "$ENV{PKG_CONFIG_PATH}")
FOREACH(PKG_CONFIG_DIR ${PKG_CONFIG_PATH_LIST})
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_DIR}/pkgconfig")
ENDFOREACH(PKG_CONFIG_DIR)
# Look for valid pkgconfig directories.
FIND_PATH(PKG_CONFIG_ENV pkgconfig ENV LD_LIBRARY_PATH)
FIND_PATH(PKG_CONFIG_MULTI pkgconfig HINT ${PKG_CONFIG_MULTI_GUESS})
FIND_PATH(PKG_CONFIG_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_MULTI_LOCAL_GUESS})
FIND_PATH(PKG_CONFIG_NO_MULTI pkgconfig HINT ${PKG_CONFIG_NO_MULTI_GUESS})
FIND_PATH(PKG_CONFIG_NO_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_NO_MULTI_LOCAL_GUESS})
# Add anything we found to our list.
IF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_ENV}/pkgconfig")
ENDIF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND)
IF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI}/pkgconfig")
ENDIF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND)
IF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI_LOCAL}/pkgconfig")
ENDIF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND)
IF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI}/pkgconfig")
ENDIF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND)
IF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND)
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI_LOCAL}/pkgconfig")
ENDIF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND)
# Also add some non-architecture specific package locations.
SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:/usr/share/pkgconfig:/usr/local/share/pkgconfig")
# Remove first unwanted ':'
string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 -1 VALID_PKG_LIBDIRS)
# Set PKG_CONFIG_LIBDIR environment.
SET(ENV{PKG_CONFIG_LIBDIR} ${VALID_PKG_LIBDIRS})
ENDIF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
IF(DEBUG_PKG_CONFIG)
MESSAGE(STATUS "Using PKG_CONFIG_LIBDIR=$ENV{PKG_CONFIG_LIBDIR}")
ENDIF(DEBUG_PKG_CONFIG)

View File

@@ -284,53 +284,6 @@ copy_if_different(
)
set(all_targets ${all_targets} ${out_targets})
set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
if(EXISTS ${internal_llkdu_path})
set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll")
set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst}
DEPENDS ${internal_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
)
set(all_targets ${all_targets} ${llkdu_dst})
else(EXISTS ${internal_llkdu_path})
if (EXISTS "${debug_src_dir}/llkdu.dll")
set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${debug_llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
DEPENDS ${debug_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
)
set(all_targets ${all_targets} ${debug_llkdu_dst})
endif (EXISTS "${debug_src_dir}/llkdu.dll")
if (EXISTS "${release_src_dir}/llkdu.dll")
set(release_llkdu_src "${release_src_dir}/llkdu.dll")
set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${release_llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
DEPENDS ${release_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
)
set(all_targets ${all_targets} ${release_llkdu_dst})
set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll")
ADD_CUSTOM_COMMAND(
OUTPUT ${relwithdebinfo_llkdu_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
DEPENDS ${release_llkdu_src}
COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
)
set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
endif (EXISTS "${release_src_dir}/llkdu.dll")
endif (EXISTS ${internal_llkdu_path})
# Copy MS C runtime dlls, required for packaging.
# *TODO - Adapt this to support VC9
if (MSVC80)
@@ -439,6 +392,3 @@ add_custom_target(copy_win_libs ALL
)
add_dependencies(copy_win_libs prepare)
if(EXISTS ${internal_llkdu_path})
add_dependencies(copy_win_libs llkdu)
endif(EXISTS ${internal_llkdu_path})

View File

@@ -1,6 +1,6 @@
# -*- cmake -*-
if (VIEWER AND WINDOWS)
if (WINDOWS)
find_path(DIRECTX_INCLUDE_DIR dxdiag.h
"$ENV{DXSDK_DIR}/Include"
"$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include"
@@ -43,4 +43,4 @@ if (VIEWER AND WINDOWS)
message(FATAL_ERROR "Could not find DirectX SDK Libraries")
endif (DIRECTX_LIBRARY_DIR)
endif (VIEWER AND WINDOWS)
endif (WINDOWS)

View File

@@ -1,17 +0,0 @@
#Find the windows manifest tool.
if (MSVC80)
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
PATHS
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
IF(HAVE_MANIFEST_TOOL)
MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
ELSE(HAVE_MANIFEST_TOOL)
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
ENDIF(HAVE_MANIFEST_TOOL)
STRING(REPLACE "/MANIFEST " "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
${CMAKE_EXE_LINKER_FLAGS})
endif (MSVC80)

View File

@@ -18,5 +18,5 @@ else (STANDALONE)
elseif (LINUX)
set(JSONCPP_LIBRARIES jsoncpp)
endif (WINDOWS)
set(JSONCPP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp)
set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/jsoncpp)
endif (STANDALONE)

View File

@@ -1,10 +0,0 @@
# -*- cmake -*-
include(MySQL)
set(LLDATABASE_INCLUDE_DIRS
${LIBS_SERVER_DIR}/lldatabase
${MYSQL_INCLUDE_DIR}
)
set(LLDATABASE_LIBRARIES lldatabase)

View File

@@ -1,18 +0,0 @@
# -*- cmake -*-
include(Prebuilt)
if (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)
use_prebuilt_binary(kdu)
if (WINDOWS)
set(KDU_LIBRARY debug kdu_cored optimized kdu_core)
else (WINDOWS)
set(KDU_LIBRARY kdu)
endif (WINDOWS)
set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
set(LLKDU_LIBRARY llkdu)
set(LLKDU_STATIC_LIBRARY llkdu_static)
set(LLKDU_LIBRARIES ${LLKDU_LIBRARY})
set(LLKDU_STATIC_LIBRARIES ${LLKDU_STATIC_LIBRARY})
endif (NOT STANDALONE AND EXISTS ${LIBS_CLOSED_DIR}/llkdu)

View File

@@ -6,27 +6,7 @@ set(LLRENDER_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llrender
)
if (SERVER AND LINUX)
set(LLRENDER_LIBRARIES
llrenderheadless
)
else (SERVER AND LINUX)
set(LLRENDER_LIBRARIES
llrender
)
endif (SERVER AND LINUX)
# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set
# differently for different object files.
macro (copy_server_sources )
foreach (PREFIX ${ARGV})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp
${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp
)
list(APPEND server_SOURCE_FILES ${PREFIX}_server.cpp)
endforeach (PREFIX ${_copied_SOURCES})
endmacro (copy_server_sources _copied_SOURCES)

View File

@@ -1,7 +0,0 @@
# -*- cmake -*-
set(LLSCENE_INCLUDE_DIRS
${LIBS_SERVER_DIR}/llscene
)
set(LLSCENE_LIBRARIES llscene)

View File

@@ -36,17 +36,12 @@ set(LLWINDOW_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llwindow
)
if (SERVER AND LINUX)
set(LLWINDOW_LIBRARIES
llwindowheadless
)
else (SERVER AND LINUX)
set(LLWINDOW_LIBRARIES
llwindow
)
if (WINDOWS)
list(APPEND LLWINDOW_LIBRARIES
comdlg32
)
endif (WINDOWS)
endif (SERVER AND LINUX)
set(LLWINDOW_LIBRARIES
llwindow
)
if (WINDOWS)
list(APPEND LLWINDOW_LIBRARIES
comdlg32
)
endif (WINDOWS)

View File

@@ -3,8 +3,5 @@ include(Prebuilt)
if (NOT (STANDALONE OR DARWIN))
use_prebuilt_binary(glext)
# possible glh_linear should have its own .cmake file instead
#use_prebuilt_binary(glh_linear)
# actually... not any longer, it's now in git -SG
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
endif ()
endif (NOT (STANDALONE OR DARWIN))

View File

@@ -8,41 +8,32 @@
# DARWIN - Mac OS X
# LINUX - Linux
# WINDOWS - Windows
#
# What to build:
#
# VIEWER - viewer and other viewer-side components
# SERVER - simulator and other server-side bits
# Relative and absolute paths to subtrees.
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
if(NOT DEFINED COMMON_CMAKE_DIR)
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
endif(NOT DEFINED COMMON_CMAKE_DIR)
set(LIBS_CLOSED_PREFIX)
set(LIBS_OPEN_PREFIX)
set(LIBS_SERVER_PREFIX)
set(SCRIPTS_PREFIX ../scripts)
set(SERVER_PREFIX)
set(VIEWER_PREFIX)
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX})
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX})
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)")
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
set(VISTA_ICON OFF CACHE BOOL "Allow vista icon with pre 2008 Visual Studio IDEs. (Assumes replacement old rcdll.dll with new rcdll.dll from win sdk 7.0 or later)")
set(LIBS_PREBUILT_DIR ${CMAKE_SOURCE_DIR}/../libraries CACHE PATH
"Location of prebuilt libraries.")
if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
# We use this as a marker that you can try to use the proprietary libraries.
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(WINDOWS ON BOOL FORCE)
set(ARCH i686)
@@ -69,6 +60,26 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(WORD_SIZE 64)
endif(CMAKE_SIZEOF_VOID_P MATCHES 4)
endif (WORD_SIZE EQUAL 32)
if (WORD_SIZE EQUAL 32)
set(DEB_ARCHITECTURE i386)
set(FIND_LIBRARY_USE_LIB64_PATHS OFF)
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH})
else (WORD_SIZE EQUAL 32)
set(DEB_ARCHITECTURE amd64)
set(FIND_LIBRARY_USE_LIB64_PATHS ON)
endif (WORD_SIZE EQUAL 32)
execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH
RESULT_VARIABLE DPKG_RESULT
OUTPUT_VARIABLE DPKG_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
#message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}")
if (DPKG_RESULT EQUAL 0)
set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH})
set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH})
endif (DPKG_RESULT EQUAL 0)
include(ConfigurePkgConfig)
set(LL_ARCH ${ARCH}_linux)
set(LL_ARCH_DIR ${ARCH}-linux)
@@ -77,39 +88,37 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
if(${CMAKE_GENERATOR} MATCHES Xcode)
#SDK Compiler and Deployment targets for XCode
if (${XCODE_VERSION} VERSION_LESS 4.0.0)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
set(CMAKE_XCODE_ATTIBUTE_GCC_VERSION "4.2")
else (${XCODE_VERSION} VERSION_LESS 4.0.0)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
if(${CMAKE_GENERATOR} MATCHES Xcode)
execute_process(
COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
OUTPUT_VARIABLE XCODE_VERSION )
# To support a different SDK update these Xcode settings:
if (XCODE_VERSION GREATER 4.2)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
endif (${XCODE_VERSION} VERSION_LESS 4.0.0)
else()
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk)
else (XCODE_VERSION GREATER 4.2)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
endif (XCODE_VERSION GREATER 4.2)
else(${CMAKE_GENERATOR} MATCHES Xcode)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
endif(${CMAKE_GENERATOR} MATCHES Xcode)
## We currently support only 32-bit i386 builds, so use these:
set(CMAKE_OSX_ARCHITECTURES i386)
set(CMAKE_OSX_SYSROOT macosx10.6)
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
# Build only for i386 by default, system default on MacOSX 10.6 is x86_64
if (NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES i386)
endif (NOT CMAKE_OSX_ARCHITECTURES)
set(ARCH i386)
set(WORD_SIZE 32)
## But if you want to compile for mixed 32/64 bit, try these:
# set(CMAKE_OSX_ARCHITECTURES i386;x86_64)
# set(ARCH universal)
# set(WORD_SIZE 64)
## Finally, set up the build output directories
set(LL_ARCH ${ARCH}_darwin)
set(LL_ARCH_DIR universal-darwin)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if (WINDOWS)
set(PREBUILT_TYPE windows)
elseif(DARWIN)
@@ -120,11 +129,9 @@ elseif(LINUX AND WORD_SIZE EQUAL 64)
set(PREBUILT_TYPE linux64)
endif(WINDOWS)
# Default deploy grid
set(GRID agni CACHE STRING "Target Grid")
set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
set(VIEWER_CHANNEL "Singularity" CACHE STRING "Viewer Channel Name")
set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id (currently secondlife|snowglobe)")
@@ -135,17 +142,6 @@ set(VIEWER_BRANDING_NAME_CAMELCASE "Singularity")
set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
set(SERVER ON CACHE BOOL "Build Second Life server software.")
endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
if (LINUX AND SERVER AND VIEWER)
MESSAGE(FATAL_ERROR "
The indra source does not currently support building SERVER and VIEWER at the same time.
Please set one of these values to OFF in your CMake cache file.
(either by running ccmake or by editing CMakeCache.txt by hand)
For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment
")
endif (LINUX AND SERVER AND VIEWER)
source_group("CMake Rules" FILES CMakeLists.txt)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)

View File

@@ -81,7 +81,6 @@ class PlatformSetup(object):
distcc = True
cmake_opts = []
word_size = 32
opensim_rules = 'OFF' #whether or not to use rules fit for opensim
using_express = False
def __init__(self):
@@ -125,7 +124,6 @@ class PlatformSetup(object):
standalone=self.standalone,
unattended=self.unattended,
word_size=self.word_size,
opensim_rules=self.opensim_rules,
type=self.build_type.upper(),
)
#if simple:
@@ -134,7 +132,6 @@ class PlatformSetup(object):
'-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-G %(generator)r %(opts)s %(dir)r' % args)
def run_cmake(self, args=[]):
@@ -296,7 +293,6 @@ class LinuxSetup(UnixSetup):
type=self.build_type.upper(),
project_name=self.project_name,
word_size=self.word_size,
opensim_rules=self.opensim_rules,
)
if not self.is_internal_tree():
args.update({'cxx':'g++', 'server':'OFF', 'viewer':'ON'})
@@ -323,7 +319,6 @@ class LinuxSetup(UnixSetup):
'-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(opts)s %(dir)r')
% args)
@@ -437,7 +432,6 @@ class DarwinSetup(UnixSetup):
unattended=self.unattended,
project_name=self.project_name,
universal=self.universal,
opensim_rules=self.opensim_rules,
type=self.build_type.upper(),
)
if self.universal == 'ON':
@@ -449,7 +443,6 @@ class DarwinSetup(UnixSetup):
'-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(universal)s '
'%(opts)s %(dir)r' % args)
@@ -535,7 +528,6 @@ class WindowsSetup(PlatformSetup):
unattended=self.unattended,
project_name=self.project_name,
word_size=self.word_size,
opensim_rules=self.opensim_rules,
)
#if simple:
# return 'cmake %(opts)s "%(dir)s"' % args
@@ -543,7 +535,6 @@ class WindowsSetup(PlatformSetup):
'-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(opts)s "%(dir)s"' % args)
@@ -719,7 +710,6 @@ class CygwinSetup(WindowsSetup):
unattended=self.unattended,
project_name=self.project_name,
word_size=self.word_size,
opensim_rules=self.opensim_rules,
)
#if simple:
# return 'cmake %(opts)s "%(dir)s"' % args
@@ -727,7 +717,6 @@ class CygwinSetup(WindowsSetup):
'-DUNATTENDED:BOOl=%(unattended)s '
'-DSTANDALONE:BOOL=%(standalone)s '
'-DWORD_SIZE:STRING=%(word_size)s '
'-DOPENSIM_RULES:BOOL=%(opensim_rules)s '
'-DROOT_PROJECT_NAME:STRING=%(project_name)s '
'%(opts)s "%(dir)s"' % args)
@@ -766,21 +755,15 @@ Commands:
Command-options for "configure":
We use cmake variables to change the build configuration.
-DSERVER:BOOL=OFF Don't configure simulator/dataserver/etc
-DVIEWER:BOOL=OFF Don't configure the viewer
-DPACKAGE:BOOL=ON Create "package" target to make installers
-DLOCALIZESETUP:BOOL=ON Create one win_setup target per supported language
-DLL_TESTS:BOOL=OFF Don't generate unit test projects
-DEXAMPLEPLUGIN:BOOL=OFF Don't generate example plugin project
-DDISABLE_TCMALLOC:BOOL=ON Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)
-DVISTA_ICON:BOOL=ON Allow pre-2008 VS to use vista-optimized resource file. (Requires updated rcdll.dll!)
Examples:
Set up a viewer-only project for your system:
develop.py configure -DSERVER:BOOL=OFF
Set up a Visual Studio 2005 project with "package" target:
develop.py -G vc80 configure -DPACKAGE:BOOL=ON
Set up a Visual Studio 2010 project with "package" target:
develop.py -G vc100 configure -DPACKAGE:BOOL=ON
'''
def main(arguments):

View File

@@ -187,7 +187,7 @@ namespace HACD
m_nTriangles--;
}
}
long idEdge;
long idEdge = 0;
for(size_t itE = 0; itE < m_vertices[v2].m_edges.Size(); ++itE)
{
idEdge = m_vertices[v2].m_edges[itE];
@@ -529,7 +529,7 @@ namespace HACD
long a, b;
long idEdge1;
long idEdge2;
long idEdgeV1V2;
long idEdgeV1V2 = 0;
for(size_t itE1 = 0; itE1 < m_vertices[v1].m_edges.Size(); ++itE1)
{
idEdge1 = m_vertices[v1].m_edges[itE1];

View File

@@ -50,8 +50,9 @@
#include <pthread.h>
#endif
#if defined(_WIN32)
#pragma warning(disable:4100)
#endif
namespace HACD
{

View File

@@ -14,8 +14,8 @@ set(OPENJPEG_VERSION
set(openjpeg_SOURCE_FILES
bio.c
cio.c
cidx_manager.c
cio.c
dwt.c
event.c
image.c
@@ -26,8 +26,8 @@ set(openjpeg_SOURCE_FILES
mct.c
mqc.c
openjpeg.c
pi.c
phix_manager.c
pi.c
ppix_manager.c
raw.c
t1.c
@@ -40,8 +40,8 @@ set(openjpeg_SOURCE_FILES
set(openjpeg_HEADER_FILES
bio.h
cio.h
cidx_manager.h
cio.h
dwt.h
event.h
fix.h

View File

@@ -169,8 +169,6 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mRoot(NULL),
mWearableData(wearable_data)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
llassert_always(mWearableData);
mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
for (U32 i = 0; i < mBakedTextureDatas.size(); i++ )
@@ -496,8 +494,6 @@ void LLAvatarAppearance::computeBodySize()
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
@@ -539,8 +535,6 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
LLJoint* joint = NULL;
if (info->mIsJoint)
@@ -628,9 +622,6 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num )
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
if (!info)
return FALSE;
//-------------------------------------------------------------------------
@@ -685,8 +676,6 @@ void LLAvatarAppearance::clearSkeleton()
//-----------------------------------------------------------------------------
void LLAvatarAppearance::buildCharacter()
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//-------------------------------------------------------------------------
// remove all references to our existing skeleton
// so we can rebuild it
@@ -1471,6 +1460,7 @@ LLColor4 LLAvatarAppearance::getClothesColor( ETextureIndex te )
}
return color;
}
// static
LLColor4 LLAvatarAppearance::getDummyColor()
{

View File

@@ -749,8 +749,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
//-----------------------------------------------------------------------------
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
{
LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
llassert(shared_data);
mSharedData = shared_data;

View File

@@ -40,9 +40,9 @@ include_directories(
)
set(llaudio_SOURCE_FILES
llaudiodecodemgr.cpp
llaudioengine.cpp
lllistener.cpp
llaudiodecodemgr.cpp
llvorbisdecode.cpp
llvorbisencode.cpp
)
@@ -50,9 +50,9 @@ set(llaudio_SOURCE_FILES
set(llaudio_HEADER_FILES
CMakeLists.txt
llaudiodecodemgr.h
llaudioengine.h
lllistener.h
llaudiodecodemgr.h
llvorbisdecode.h
llvorbisencode.h
llwindgen.h

View File

@@ -32,8 +32,8 @@ set(llcharacter_SOURCE_FILES
llkeyframemotionparam.cpp
llkeyframestandmotion.cpp
llkeyframewalkmotion.cpp
llmotioncontroller.cpp
llmotion.cpp
llmotioncontroller.cpp
llmultigesture.cpp
llpose.cpp
llstatemachine.cpp
@@ -45,8 +45,8 @@ set(llcharacter_HEADER_FILES
CMakeLists.txt
llanimationstates.h
llbvhloader.h
llbvhconsts.h
llbvhloader.h
llcharacter.h
lleditingmotion.h
llgesture.h

View File

@@ -35,8 +35,6 @@
//-----------------------------------------------------------------------------
#include "linden_common.h"
#include "llmemtype.h"
#include "llmotioncontroller.h"
#include "llkeyframemotion.h"
#include "llmath.h"
@@ -342,7 +340,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp)
//-----------------------------------------------------------------------------
LLMotion* LLMotionController::createMotion( const LLUUID &id )
{
LLMemType mt(LLMemType::MTYPE_ANIMATION);
// do we have an instance of this motion for this character?
LLMotion *motion = findMotion(id);

View File

@@ -19,6 +19,7 @@ set(llcommon_SOURCE_FILES
aithreadid.cpp
imageids.cpp
indra_constants.cpp
ll_template_cast.h
llallocator.cpp
llallocator_heap_profile.cpp
llapp.cpp
@@ -54,22 +55,21 @@ set(llcommon_SOURCE_FILES
llformat.cpp
llframetimer.cpp
llheartbeat.cpp
llindraconfigfile.cpp
llinitparam.cpp
llinstancetracker.cpp
llindraconfigfile.cpp
llliveappconfig.cpp
lllivefile.cpp
lllog.cpp
llmd5.cpp
llmemory.cpp
llmemorystream.cpp
llmemtype.cpp
llmetrics.cpp
llmortician.cpp
lloptioninterface.cpp
llptrto.cpp
llprocesslauncher.cpp
llprocessor.cpp
llptrto.cpp
llqueuedthread.cpp
llrand.cpp
llrefcount.cpp
@@ -81,8 +81,8 @@ set(llcommon_SOURCE_FILES
llsdutil.cpp
llsecondlifeurls.cpp
llsingleton.cpp
llstat.cpp
llstacktrace.cpp
llstat.cpp
llstreamtools.cpp
llstring.cpp
llstringtable.cpp
@@ -93,7 +93,6 @@ set(llcommon_SOURCE_FILES
lluri.cpp
lluuid.cpp
llworkerthread.cpp
ll_template_cast.h
metaclass.cpp
metaproperty.cpp
reflective.cpp
@@ -116,10 +115,9 @@ set(llcommon_HEADER_FILES
linden_common.h
linked_lists.h
llaccountingcost.h
llagentconstants.h
llallocator.h
llallocator_heap_profile.h
llagentconstants.h
llavatarname.h
llapp.h
llapr.h
llaprpool.h
@@ -127,6 +125,7 @@ set(llcommon_HEADER_FILES
llassoclist.h
llatomic.h
llavatarconstants.h
llavatarname.h
llbase32.h
llbase64.h
llboost.h
@@ -142,8 +141,8 @@ set(llcommon_HEADER_FILES
lldarrayptr.h
lldate.h
lldefs.h
lldependencies.h
lldeleteutils.h
lldependencies.h
lldepthstack.h
lldictionary.h
lldlinked.h
@@ -158,11 +157,11 @@ set(llcommon_HEADER_FILES
lleventapi.h
lleventcoro.h
lleventdispatcher.h
lleventemitter.h
lleventfilter.h
llevents.h
lleventemitter.h
llextendedstatus.h
lleventtimer.h
llextendedstatus.h
llfasttimer.h
llfasttimer_class.h
llfile.h
@@ -176,9 +175,9 @@ set(llcommon_HEADER_FILES
llheartbeat.h
llhttpstatuscodes.h
llindexedqueue.h
llindraconfigfile.h
llinitparam.h
llinstancetracker.h
llindraconfigfile.h
llkeythrottle.h
lllinkedqueue.h
llliveappconfig.h
@@ -190,7 +189,6 @@ set(llcommon_HEADER_FILES
llmd5.h
llmemory.h
llmemorystream.h
llmemtype.h
llmetrics.h
llmortician.h
llnametable.h
@@ -206,8 +204,8 @@ set(llcommon_HEADER_FILES
llqueuedthread.h
llrand.h
llrefcount.h
llrun.h
llrefcount.h
llrun.h
llsafehandle.h
llsd.h
llsdserialize.h

View File

@@ -26,6 +26,7 @@
#ifndef LLMEMORY_H
#define LLMEMORY_H
#include "linden_common.h"
#include <new>
#include <cstdlib>
@@ -33,7 +34,7 @@
#include <stdint.h> // uintptr_t
#endif
#include "llmemtype.h"
class LLMutex ;
#if LL_WINDOWS && LL_DEBUG
#define LL_CHECK_MEMORY llassert(_CrtCheckMemory());
@@ -173,8 +174,8 @@ private:
};
//----------------------------------------------------------------------------
class LLMutex ;
#if MEM_TRACK_MEM
class LLMutex ;
class LL_COMMON_API LLMemTracker
{
private:

View File

@@ -1,234 +0,0 @@
/**
* @file llmemtype.cpp
* @brief Simple memory allocation/deallocation tracking stuff here
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llmemtype.h"
#include "llallocator.h"
#if MEM_TRACK_TYPE
std::vector<char const *> LLMemType::DeclareMemType::mNameList;
#endif
LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init");
LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup");
LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main");
LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame");
LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput");
LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies");
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll");
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks");
LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render");
LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep");
LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network");
LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics");
LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted");
LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage");
LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage");
LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage");
LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass");
LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom");
LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools");
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar");
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh");
LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles");
LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle");
LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation");
LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume");
LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient");
LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9");
LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other");
#if MEM_TRACK_TYPE
LLMemType::DeclareMemType::DeclareMemType(char const * st)
{
mID = (S32)mNameList.size();
mName = st;
mNameList.push_back(mName);
}
LLMemType::DeclareMemType::~DeclareMemType()
{
}
LLMemType::LLMemType(LLMemType::DeclareMemType& dt)
{
mTypeIndex = dt.mID;
LLAllocator::pushMemType(dt.mID);
}
LLMemType::~LLMemType()
{
LLAllocator::popMemType();
}
char const * LLMemType::getNameFromID(S32 id)
{
if (id < 0 || id >= (S32)DeclareMemType::mNameList.size())
{
return "INVALID";
}
return DeclareMemType::mNameList[id];
}
//--------------------------------------------------------------------------------------------------
#endif //MEM_TRACK_TYPE

View File

@@ -1,251 +0,0 @@
/**
* @file llmemtype.h
* @brief Runtime memory usage debugging utilities.
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_MEMTYPE_H
#define LL_MEMTYPE_H
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#include "linden_common.h"
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// WARNING: Never commit with MEM_TRACK_MEM == 1
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#define MEM_TRACK_MEM (0 && LL_WINDOWS)
#include <vector>
class LL_COMMON_API LLMemType
{
public:
// class we'll initialize all instances of as
// static members of MemType. Then use
// to construct any new mem type.
class LL_COMMON_API DeclareMemType
{
public:
#if !MEM_TRACK_TYPE
DeclareMemType(char const * st) {}; //Do nothing
#else
DeclareMemType(char const * st);
~DeclareMemType();
S32 mID;
char const * mName;
// array so we can map an index ID to Name
static std::vector<char const *> mNameList;
#endif
};
#if !MEM_TRACK_TYPE
LLMemType(DeclareMemType& dt){} //Do nothing
#else
LLMemType(DeclareMemType& dt);
~LLMemType();
static char const * getNameFromID(S32 id);
#endif
static DeclareMemType MTYPE_INIT;
static DeclareMemType MTYPE_STARTUP;
static DeclareMemType MTYPE_MAIN;
static DeclareMemType MTYPE_FRAME;
static DeclareMemType MTYPE_GATHER_INPUT;
static DeclareMemType MTYPE_JOY_KEY;
static DeclareMemType MTYPE_IDLE;
static DeclareMemType MTYPE_IDLE_PUMP;
static DeclareMemType MTYPE_IDLE_NETWORK;
static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS;
static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION;
static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE;
static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY;
static DeclareMemType MTYPE_IDLE_AUDIO;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES;
static DeclareMemType MTYPE_MESSAGE_CHECK_ALL;
static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS;
static DeclareMemType MTYPE_RENDER;
static DeclareMemType MTYPE_SLEEP;
static DeclareMemType MTYPE_NETWORK;
static DeclareMemType MTYPE_PHYSICS;
static DeclareMemType MTYPE_INTERESTLIST;
static DeclareMemType MTYPE_IMAGEBASE;
static DeclareMemType MTYPE_IMAGERAW;
static DeclareMemType MTYPE_IMAGEFORMATTED;
static DeclareMemType MTYPE_APPFMTIMAGE;
static DeclareMemType MTYPE_APPRAWIMAGE;
static DeclareMemType MTYPE_APPAUXRAWIMAGE;
static DeclareMemType MTYPE_DRAWABLE;
static DeclareMemType MTYPE_OBJECT;
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE;
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE;
static DeclareMemType MTYPE_DISPLAY;
static DeclareMemType MTYPE_DISPLAY_UPDATE;
static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA;
static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM;
static DeclareMemType MTYPE_DISPLAY_SWAP;
static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD;
static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION;
static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE;
static DeclareMemType MTYPE_DISPLAY_STATE_SORT;
static DeclareMemType MTYPE_DISPLAY_SKY;
static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM;
static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH;
static DeclareMemType MTYPE_DISPLAY_RENDER_UI;
static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS;
static DeclareMemType MTYPE_VERTEX_DATA;
static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR;
static DeclareMemType MTYPE_VERTEX_DESTRUCTOR;
static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES;
static DeclareMemType MTYPE_VERTEX_CREATE_INDICES;
static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER;
static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES;
static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS;
static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES;
static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER;
static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES;
static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER;
static DeclareMemType MTYPE_VERTEX_SET_STRIDE;
static DeclareMemType MTYPE_VERTEX_SET_BUFFER;
static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER;
static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS;
static DeclareMemType MTYPE_SPACE_PARTITION;
static DeclareMemType MTYPE_PIPELINE;
static DeclareMemType MTYPE_PIPELINE_INIT;
static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS;
static DeclareMemType MTYPE_PIPELINE_RESTORE_GL;
static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS;
static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL;
static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE;
static DeclareMemType MTYPE_PIPELINE_ADD_POOL;
static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE;
static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT;
static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE;
static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM;
static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE;
static DeclareMemType MTYPE_PIPELINE_MARK_MOVED;
static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT;
static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED;
static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD;
static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL;
static DeclareMemType MTYPE_PIPELINE_STATE_SORT;
static DeclareMemType MTYPE_PIPELINE_POST_SORT;
static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS;
static DeclareMemType MTYPE_PIPELINE_RENDER_HL;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW;
static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT;
static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS;
static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP;
static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR;
static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM;
static DeclareMemType MTYPE_UPKEEP_POOLS;
static DeclareMemType MTYPE_AVATAR;
static DeclareMemType MTYPE_AVATAR_MESH;
static DeclareMemType MTYPE_PARTICLES;
static DeclareMemType MTYPE_REGIONS;
static DeclareMemType MTYPE_INVENTORY;
static DeclareMemType MTYPE_INVENTORY_DRAW;
static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS;
static DeclareMemType MTYPE_INVENTORY_DO_FOLDER;
static DeclareMemType MTYPE_INVENTORY_POST_BUILD;
static DeclareMemType MTYPE_INVENTORY_FROM_XML;
static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM;
static DeclareMemType MTYPE_INVENTORY_VIEW_INIT;
static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW;
static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE;
static DeclareMemType MTYPE_ANIMATION;
static DeclareMemType MTYPE_VOLUME;
static DeclareMemType MTYPE_PRIMITIVE;
static DeclareMemType MTYPE_SCRIPT;
static DeclareMemType MTYPE_SCRIPT_RUN;
static DeclareMemType MTYPE_SCRIPT_BYTECODE;
static DeclareMemType MTYPE_IO_PUMP;
static DeclareMemType MTYPE_IO_TCP;
static DeclareMemType MTYPE_IO_BUFFER;
static DeclareMemType MTYPE_IO_HTTP_SERVER;
static DeclareMemType MTYPE_IO_SD_SERVER;
static DeclareMemType MTYPE_IO_SD_CLIENT;
static DeclareMemType MTYPE_DIRECTX_INIT;
static DeclareMemType MTYPE_TEMP1;
static DeclareMemType MTYPE_TEMP2;
static DeclareMemType MTYPE_TEMP3;
static DeclareMemType MTYPE_TEMP4;
static DeclareMemType MTYPE_TEMP5;
static DeclareMemType MTYPE_TEMP6;
static DeclareMemType MTYPE_TEMP7;
static DeclareMemType MTYPE_TEMP8;
static DeclareMemType MTYPE_TEMP9;
static DeclareMemType MTYPE_OTHER; // Special; used by display code
#if MEM_TRACK_TYPE
S32 mTypeIndex;
#endif
};
//----------------------------------------------------------------------------
#endif

View File

@@ -22,8 +22,8 @@ include_directories(
)
set(llimage_SOURCE_FILES
llimagebmp.cpp
llimage.cpp
llimagebmp.cpp
llimagedxt.cpp
llimagej2c.cpp
llimagejpeg.cpp
@@ -35,6 +35,7 @@ set(llimage_SOURCE_FILES
set(llimage_HEADER_FILES
CMakeLists.txt
llimage.h
llimagebmp.h
llimagedxt.h

View File

@@ -30,7 +30,6 @@
#include "llmath.h"
#include "v4coloru.h"
#include "llmemtype.h"
#include "llimagebmp.h"
#include "llimagetga.h"
@@ -93,8 +92,7 @@ LLImageBase::LLImageBase()
mHeight(0),
mComponents(0),
mBadBufferAllocation(false),
mAllowOverSize(false),
mMemType(LLMemType::MTYPE_IMAGEBASE)
mAllowOverSize(false)
{
}
@@ -164,8 +162,6 @@ void LLImageBase::deleteData()
// virtual
U8* LLImageBase::allocateData(S32 size)
{
LLMemType mt1(mMemType);
if (size < 0)
{
size = mWidth * mHeight * mComponents;
@@ -226,7 +222,6 @@ U8* LLImageBase::reallocateData(S32 size)
if(mData && (mDataSize == size))
return mData;
LLMemType mt1(mMemType);
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap)
{
@@ -293,14 +288,12 @@ S32 LLImageRaw::sRawImageCachedCount = 0;
LLImageRaw::LLImageRaw()
: LLImageBase(), mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
++sRawImageCount;
}
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
: LLImageBase(), mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
allocateDataSize(width, height, components);
++sRawImageCount;
@@ -309,7 +302,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
: LLImageBase(), mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
if(allocateDataSize(width, height, components) && data)
{
memcpy(getData(), data, width*height*components);
@@ -319,7 +311,6 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically) : mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
llassert_always(src);
S8 const components = src->getComponents();
U8 const* const data = src->getData();
@@ -343,11 +334,11 @@ LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_of
++sRawImageCount;
}
/*LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
: LLImageBase(), mCacheEntries(0)
{
createFromFile(filename, j2c_lowest_mip_only);
}*/
//LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
// : LLImageBase(), mCacheEntries(0)
//{
// createFromFile(filename, j2c_lowest_mip_only);
//}
LLImageRaw::~LLImageRaw()
{
@@ -416,7 +407,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
#if 0
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
{
LLMemType mt1(mMemType);
U8 *data = new U8[width*height*getComponents()];
// Should do some simple bounds checking
@@ -500,7 +490,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a)
// Reverses the order of the rows in the image
void LLImageRaw::verticalFlip()
{
LLMemType mt1(mMemType);
S32 row_bytes = getWidth() * getComponents();
llassert(row_bytes > 0);
try
@@ -640,7 +629,6 @@ void LLImageRaw::composite( LLImageRaw* src )
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
{
LLMemType mt1(mMemType);
llinfos << "compositeScaled4onto3" << llendl;
LLImageRaw* dst = this; // Just for clarity.
@@ -915,7 +903,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src )
// Src and dst can be any size. Src and dst have same number of components.
void LLImageRaw::copyScaled( LLImageRaw* src )
{
LLMemType mt1(mMemType);
LLImageRaw* dst = this; // Just for clarity.
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
@@ -956,8 +943,6 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
//scale down image by not blending a pixel with its neighbors.
BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
{
LLMemType mt1(mMemType);
S8 c = getComponents() ;
llassert((1 == c) || (3 == c) || (4 == c) );
@@ -1002,7 +987,6 @@ BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{
LLMemType mt1(mMemType);
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
S32 old_width = getWidth();
@@ -1439,7 +1423,6 @@ LLImageFormatted::LLImageFormatted(S8 codec)
mDecoded(0),
mDiscardLevel(-1)
{
mMemType = LLMemType::MTYPE_IMAGEFORMATTED;
}
// virtual

View File

@@ -36,7 +36,6 @@
#include "lluuid.h"
#include "llstring.h"
#include "llthread.h"
#include "llmemtype.h"
#include "aithreadsafe.h"
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
@@ -163,8 +162,6 @@ private:
bool mAllowOverSize ;
static LLPrivateMemoryPool* sPrivatePoolp ;
public:
LLMemType::DeclareMemType& mMemType; // debug
};
// Raw representation of an image (used for textures, and other uncompressed formats

View File

@@ -35,7 +35,6 @@
#include "lldir.h"
#include "../llxml/llcontrol.h"
#include "llimagej2c.h"
#include "llmemtype.h"
typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)();
typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
@@ -291,8 +290,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
// Returns TRUE to mean done, whether successful or not.
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{
LLMemType mt1(mMemType);
BOOL res = TRUE;
resetLastError();
@@ -341,7 +338,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{
LLMemType mt1(mMemType);
resetLastError();
BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
if (!mLastError.empty())
@@ -518,8 +514,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
BOOL LLImageJ2C::validate(U8 *data, U32 file_size)
{
LLMemType mt1(mMemType);
resetLastError();
setData(data, file_size);

View File

@@ -30,7 +30,6 @@
#include "lldarray.h"
#include "llfoldertype.h"
#include "llinventorytype.h"
#include "llmemtype.h"
#include "llpermissions.h"
#include "llrefcount.h"
#include "llsaleinfo.h"

View File

@@ -21,12 +21,12 @@ set(llmath_SOURCE_FILES
llperlin.cpp
llquaternion.cpp
llrect.cpp
llsdutil_math.cpp
llsphere.cpp
llvector4a.cpp
llvolume.cpp
llvolumemgr.cpp
llvolumeoctree.cpp
llsdutil_math.cpp
m3math.cpp
m4math.cpp
raytrace.cpp
@@ -66,6 +66,7 @@ set(llmath_HEADER_FILES
llquaternion2.h
llquaternion2.inl
llrect.h
llsdutil_math.h
llsimdmath.h
llsimdtypes.h
llsimdtypes.inl
@@ -77,7 +78,6 @@ set(llmath_HEADER_FILES
llvolume.h
llvolumemgr.h
llvolumeoctree.h
llsdutil_math.h
m3math.h
m4math.h
raytrace.h

View File

@@ -507,7 +507,7 @@ public:
//is it here?
if (isInside(data->getPositionGroup()))
{
if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) ||
if (((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius())) ||
(data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{ //it belongs here
/*mElementCount++;

View File

@@ -35,7 +35,6 @@
#include <cmath>
#include "llerror.h"
#include "llmemtype.h"
#include "llvolumemgr.h"
#include "v2math.h"
@@ -378,8 +377,6 @@ public:
LLProfile::Face* LLProfile::addCap(S16 faceID)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
Face *face = vector_append(mFaces, 1);
face->mIndex = 0;
@@ -392,8 +389,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID)
LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
Face *face = vector_append(mFaces, 1);
face->mIndex = i;
@@ -409,7 +404,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO
//static
S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
{ // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 np = 0;
// Generate an n-sided "circular" path.
@@ -475,8 +469,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of
// filleted and chamfered corners
void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
// Generate an n-sided "circular" path.
// 0 is (1,0), and we go counter-clockwise along a circular path from there.
const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f };
@@ -730,8 +722,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3
S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{ // this is basically LLProfile::generate stripped down to only operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (detail < MIN_LOD)
{
detail = MIN_LOD;
@@ -842,8 +832,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if ((!mDirty) && (!is_sculpted))
{
return FALSE;
@@ -1116,8 +1104,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
BOOL LLProfileParams::importFile(LLFILE *fp)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@@ -1193,8 +1179,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const
BOOL LLProfileParams::importLegacyStream(std::istream& input_stream)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@@ -1286,7 +1270,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd)
void LLProfileParams::copyParams(const LLProfileParams &params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
setCurveType(params.getCurveType());
setBegin(params.getBegin());
setEnd(params.getEnd());
@@ -1503,8 +1486,6 @@ const LLVector2 LLPathParams::getEndScale() const
S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
{ // this is basically LLPath::generate stripped down to only the operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (detail < MIN_LOD)
{
detail = MIN_LOD;
@@ -1554,8 +1535,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if ((!mDirty) && (!is_sculpted))
{
return FALSE;
@@ -1683,8 +1662,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mOpen = TRUE; // Draw end caps
if (getPathLength() == 0)
{
@@ -1706,8 +1683,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL LLPathParams::importFile(LLFILE *fp)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@@ -1852,8 +1827,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const
BOOL LLPathParams::importLegacyStream(std::istream& input_stream)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@@ -2061,8 +2034,6 @@ S32 LLVolume::sNumMeshPoints = 0;
LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL generate_single_face, const BOOL is_unique)
: mParams(params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mUnique = is_unique;
mFaceMask = 0x0;
mDetail = detail;
@@ -2134,7 +2105,6 @@ LLVolume::~LLVolume()
BOOL LLVolume::generate()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
llassert_always(mProfilep);
//Added 10.03.05 Dave Parks
@@ -2171,7 +2141,7 @@ BOOL LLVolume::generate()
mLODScaleBias.setVec(0.6f, 0.6f, 0.6f);
}
// ********************************************************************
//********************************************************************
//debug info, to be removed
if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20))
{
@@ -2183,7 +2153,7 @@ BOOL LLVolume::generate()
llerrs << "LLVolume corrupted!" << llendl ;
}
// ********************************************************************
//********************************************************************
BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split);
BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split);
@@ -2193,7 +2163,7 @@ BOOL LLVolume::generate()
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
// ********************************************************************
//********************************************************************
//debug info, to be removed
if((U32)(sizeS * sizeT) > (1u << 20))
{
@@ -2206,7 +2176,7 @@ BOOL LLVolume::generate()
llerrs << "LLVolume corrupted!" << llendl ;
}
// ********************************************************************
//********************************************************************
sNumMeshPoints -= mMesh.size();
mMesh.resize(sizeT * sizeS);
@@ -2730,8 +2700,6 @@ S32 LLVolume::getNumFaces() const
void LLVolume::createVolumeFaces()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (mGenerateSingleFace)
{
// do nothing
@@ -2903,8 +2871,6 @@ F32 LLVolume::sculptGetSurfaceArea()
// create placeholder shape
void LLVolume::sculptGeneratePlaceholder()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
@@ -2940,10 +2906,7 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8
BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
@@ -3117,7 +3080,6 @@ bool sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32
// sculpt replaces generate() for sculpted surfaces
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
U8 sculpt_type = mParams.getSculptType();
BOOL data_is_empty = FALSE;
@@ -3268,7 +3230,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams &params) const
void LLVolumeParams::copyParams(const LLVolumeParams &params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mProfileParams.copyParams(params.mProfileParams);
mPathParams.copyParams(params.mPathParams);
mSculptID = params.getSculptID();
@@ -3640,8 +3601,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h
S32 *LLVolume::getTriangleIndices(U32 &num_indices) const
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 expected_num_triangle_indices = getNumTriangleIndices();
if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES)
{
@@ -4369,8 +4328,6 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
const LLMatrix3& norm_mat_in,
S32 face_mask)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLMatrix4a mat;
mat.loadu(mat_in);
@@ -4832,8 +4789,6 @@ BOOL equalTriangle(const S32 *a, const S32 *b)
BOOL LLVolumeParams::importFile(LLFILE *fp)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
//llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
@@ -4888,8 +4843,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const
BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
//llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384;
// *NOTE: changing the size or type of this buffer will require
@@ -4929,8 +4882,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
output_stream <<"\tshape 0\n";
output_stream <<"\t{\n";
mPathParams.exportLegacyStream(output_stream);
@@ -6146,8 +6097,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0,
BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const std::vector<LLVolume::Point>& mesh = volume->getMesh();
const std::vector<LLVector3>& profile = volume->getProfile().mProfile;
S32 max_s = volume->getProfile().getTotal();
@@ -6293,8 +6242,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (!(mTypeMask & HOLLOW_MASK) &&
!(mTypeMask & OPEN_MASK) &&
((volume->getParams().getPathParams().getBegin()==0.0f)&&
@@ -6681,8 +6628,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
void LLVolumeFace::createBinormals()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (!mBinormals)
{
allocateBinormals(mNumVertices);
@@ -6954,8 +6899,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
BOOL flat = mTypeMask & FLAT_MASK;
U8 sculpt_type = volume->getParams().getSculptType();

View File

@@ -26,7 +26,6 @@
#include "linden_common.h"
#include "llvolumemgr.h"
#include "llmemtype.h"
#include "llvolume.h"
@@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup)
// protected
LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params);
insertGroup(volgroup);
return volgroup;
@@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail)
mRefs++;
if (mVolumeLODs[detail].isNull())
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]);
}
mLODRefs[detail]++;

View File

@@ -30,7 +30,6 @@ set(llmessage_SOURCE_FILES
aihttptimeout.cpp
aihttptimeoutpolicy.cpp
debug_libcurl.cpp
llhttpclient.cpp
llares.cpp
llareslistener.cpp
llassetstorage.cpp
@@ -46,6 +45,7 @@ set(llmessage_SOURCE_FILES
lldispatcher.cpp
llfiltersd2xmlrpc.cpp
llhost.cpp
llhttpclient.cpp
llhttpnode.cpp
llhttpsender.cpp
llinstantmessage.cpp
@@ -91,9 +91,9 @@ set(llmessage_SOURCE_FILES
lluseroperation.cpp
llxfer.cpp
llxfer_file.cpp
llxfermanager.cpp
llxfer_mem.cpp
llxfer_vfile.cpp
llxfermanager.cpp
llxorcipher.cpp
machine.cpp
message.cpp
@@ -111,8 +111,8 @@ set(llmessage_HEADER_FILES
aicurl.h
aicurleasyrequeststatemachine.h
aicurlprivate.h
aicurlperhost.h
aicurlprivate.h
aicurlthread.h
aihttpheaders.h
aihttptimeout.h
@@ -166,8 +166,8 @@ set(llmessage_HEADER_FILES
llpacketbuffer.h
llpacketring.h
llpartdata.h
llpumpio.h
llproxy.h
llpumpio.h
llqueryflags.h
llregionflags.h
llregionhandle.h
@@ -193,10 +193,10 @@ set(llmessage_HEADER_FILES
lluseroperation.h
llvehicleparams.h
llxfer.h
llxfermanager.h
llxfer_file.h
llxfer_mem.h
llxfer_vfile.h
llxfermanager.h
llxorcipher.h
machine.h
mean_collision_data.h

View File

@@ -30,7 +30,6 @@
#include "llbuffer.h"
#include "llmath.h"
#include "llmemtype.h"
#include "llstl.h"
#include "llthread.h"
@@ -44,7 +43,6 @@ LLSegment::LLSegment() :
mData(NULL),
mSize(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
@@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
mData(data),
mSize(data_len)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLSegment::~LLSegment()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
bool LLSegment::isOnChannel(S32 channel) const
@@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() :
mNextFree(NULL),
mReclaimedBytes(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384;
allocate(DEFAULT_HEAP_BUFFER_SIZE);
}
@@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) :
mNextFree(NULL),
mReclaimedBytes(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
allocate(size);
}
@@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
mNextFree(NULL),
mReclaimedBytes(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if((len > 0) && src)
{
allocate(len);
@@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
// virtual
LLHeapBuffer::~LLHeapBuffer()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
delete[] mBuffer;
mBuffer = NULL;
mSize = 0;
@@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment(
S32 size,
LLSegment& segment)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// get actual size of the segment.
S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer)));
@@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const
void LLHeapBuffer::allocate(S32 size)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
mReclaimedBytes = 0;
mBuffer = new U8[size];
if(mBuffer)
@@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() :
mNextBaseChannel(0),
mMutexp(NULL)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLBufferArray::~LLBufferArray()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
delete mMutexp;
@@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
{
LLMutexLock lock(mMutexp) ;
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments;
if(copyIntoBuffers(channel, src, len, segments))
{
@@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments;
if(copyIntoBuffers(channel, src, len, segments))
{
@@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter(
const U8* src,
S32 len)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments;
LLMutexLock lock(mMutexp) ;
@@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
segment_iterator_t end = mSegments.end();
segment_iterator_t it = getSegment(address);
if(it == end)
@@ -428,7 +412,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
LLSegment& segment)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
segment_iterator_t rv = mSegments.begin();
segment_iterator_t end = mSegments.end();
if(!address)
@@ -592,7 +575,6 @@ U8* LLBufferArray::readAfter(
U8* dest,
S32& len) const
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
U8* rv = start;
if(!dest || len <= 0)
{
@@ -652,7 +634,6 @@ U8* LLBufferArray::readAfter(
void LLBufferArray::writeChannelTo(std::ostream& ostr, S32 channel) const
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
LLMutexLock lock(mMutexp) ;
const_segment_iterator_t const end = mSegments.end();
for (const_segment_iterator_t it = mSegments.begin(); it != end; ++it)
@@ -670,7 +651,6 @@ U8* LLBufferArray::seek(
S32 delta) const
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
const_segment_iterator_t it;
const_segment_iterator_t end = mSegments.end();
U8* rv = start;
@@ -814,8 +794,6 @@ U8* LLBufferArray::seek(
//test use only
bool LLBufferArray::takeContents(LLBufferArray& source)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
LLMutexLock lock(mMutexp);
source.lock();
@@ -841,7 +819,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
S32 len)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// start at the end of the buffers, because it is the most likely
// to have free space.
LLSegment segment;
@@ -880,7 +858,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// Find out which buffer contains the segment, and if it is found,
// ask it to reclaim the memory.
@@ -913,7 +890,6 @@ bool LLBufferArray::copyIntoBuffers(
std::vector<LLSegment>& segments)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!src || !len) return false;
S32 copied = 0;
LLSegment segment;

View File

@@ -30,7 +30,6 @@
#include "llbufferstream.h"
#include "llbuffer.h"
#include "llmemtype.h"
#include "llthread.h"
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
@@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf(
mChannels(channels),
mBuffer(buffer)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLBufferStreamBuf::~LLBufferStreamBuf()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
sync();
}
// virtual
int LLBufferStreamBuf::underflow()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
//lldebugs << "LLBufferStreamBuf::underflow()" << llendl;
if(!mBuffer)
{
@@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow()
// virtual
int LLBufferStreamBuf::overflow(int c)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!mBuffer)
{
return EOF;
@@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c)
// virtual
int LLBufferStreamBuf::sync()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
int return_value = -1;
if(!mBuffer)
{
@@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff(
std::ios::openmode which)
#endif
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!mBuffer
|| ((way == std::ios::beg) && (off < 0))
|| ((way == std::ios::end) && (off > 0)))
@@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream(
std::iostream(&mStreamBuf),
mStreamBuf(channels, buffer)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLBufferStream::~LLBufferStream()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}

View File

@@ -36,7 +36,6 @@
#include "llsdserialize.h"
#include "lluuid.h"
#include "message.h"
#include "llmemtype.h"
#include <boost/regex.hpp>
@@ -692,7 +691,6 @@ bool LLCacheName::getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_g
void LLCacheName::processPending()
{
LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
const F32 SECS_BETWEEN_PROCESS = 0.1f;
if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS))
{
@@ -798,7 +796,6 @@ std::string LLCacheName::getDefaultLastName()
void LLCacheName::Impl::processPendingAsks()
{
LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS);
sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue);
sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue);
mAskNameQueue.clear();
@@ -807,7 +804,6 @@ void LLCacheName::Impl::processPendingAsks()
void LLCacheName::Impl::processPendingReplies()
{
LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES);
// First call all the callbacks, because they might send messages.
for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
{

View File

@@ -37,7 +37,6 @@
#include "lliopipe.h"
#include "lliosocket.h"
#include "llioutil.h"
#include "llmemtype.h"
#include "llmemorystream.h"
#include "llpumpio.h"
#include "llsd.h"
@@ -449,7 +448,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
{
LLFastTimer t(FTM_PROCESS_HTTP_HEADER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
if(eos)
{
PUMP_DEBUG;
@@ -593,13 +591,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) :
mContentLength(0),
mRootNode(tree)
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
}
// virtual
LLHTTPResponder::~LLHTTPResponder()
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
//lldebugs << "destroying LLHTTPResponder" << llendl;
}
@@ -609,7 +605,6 @@ bool LLHTTPResponder::readHeaderLine(
U8* dest,
S32& len)
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
--len;
U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len);
dest[len] = '\0';
@@ -634,7 +629,6 @@ void LLHTTPResponder::markBad(
const LLChannelDescriptors& channels,
buffer_ptr_t buffer)
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
mState = STATE_SHORT_CIRCUIT;
LLBufferStream out(channels, buffer.get());
out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n"
@@ -654,7 +648,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
{
LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
LLIOPipe::EStatus status = STATUS_OK;
// parsing headers

View File

@@ -33,7 +33,6 @@
#include "llbuffer.h"
#include "llhost.h"
#include "llmemtype.h"
#include "llpumpio.h"
#include "llthread.h"
@@ -101,7 +100,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock)
// static
LLSocket::ptr_t LLSocket::create(EType type, U16 port)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
apr_status_t status = APR_EGENERAL;
LLSocket::ptr_t rv(new LLSocket);
@@ -179,7 +177,6 @@ LLSocket::ptr_t LLSocket::create(EType type, U16 port)
// static
LLSocket::ptr_t LLSocket::create(apr_status_t& status, LLSocket::ptr_t& listen_socket)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if (!listen_socket->getSocket())
{
status = APR_ENOSOCKET;
@@ -232,7 +229,6 @@ LLSocket::LLSocket() :
LLSocket::~LLSocket()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// *FIX: clean up memory we are holding.
if(mSocket)
{
@@ -248,7 +244,6 @@ LLSocket::~LLSocket()
void LLSocket::setBlocking(S32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0));
@@ -259,7 +254,6 @@ void LLSocket::setBlocking(S32 timeout)
void LLSocket::setNonBlocking()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1));
@@ -276,12 +270,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) :
mSource(socket),
mInitialized(false)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLIOSocketReader::~LLIOSocketReader()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOSocketReader" << llendl;
}
@@ -297,7 +289,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
{
LLFastTimer t(FTM_PROCESS_SOCKET_READER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mSource) return STATUS_PRECONDITION_NOT_MET;
if(!mInitialized)
{
@@ -379,12 +370,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) :
mLastWritten(NULL),
mInitialized(false)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLIOSocketWriter::~LLIOSocketWriter()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOSocketWriter" << llendl;
}
@@ -399,7 +388,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
{
LLFastTimer t(FTM_PROCESS_SOCKET_WRITER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mDestination) return STATUS_PRECONDITION_NOT_MET;
if(!mInitialized)
{
@@ -531,12 +519,10 @@ LLIOServerSocket::LLIOServerSocket(
mInitialized(false),
mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLIOServerSocket::~LLIOServerSocket()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOServerSocket" << llendl;
}
@@ -556,7 +542,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
{
LLFastTimer t(FTM_PROCESS_SERVER_SOCKET);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!pump)
{
llwarns << "Need a pump for server socket." << llendl;

View File

@@ -35,7 +35,6 @@
#include "llapr.h"
#include "llfasttimer.h"
#include "llmemtype.h"
#include "llstl.h"
#include "llstat.h"
#include "llthread.h"
@@ -155,7 +154,6 @@ struct ll_delete_apr_pollset_fd_client_data
typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t;
void operator()(const pipe_conditional_t& conditional)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
S32* client_id = (S32*)conditional.second.client_data;
delete client_id;
}
@@ -177,13 +175,11 @@ LLPumpIO::LLPumpIO(void) :
{
mCurrentChain = mRunningChains.end();
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
initialize();
}
LLPumpIO::~LLPumpIO()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
#if LL_THREADS_APR
if (mChainsMutex) apr_thread_mutex_destroy(mChainsMutex);
if (mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex);
@@ -200,8 +196,6 @@ LLPumpIO::~LLPumpIO()
bool LLPumpIO::addChain(chain_t const& chain, F32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
chain_t::const_iterator it = chain.begin();
chain_t::const_iterator const end = chain.end();
if (it == end) return false;
@@ -237,8 +231,6 @@ bool LLPumpIO::addChain(
LLSD context,
F32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// remember that if the caller is providing a full link
// description, we need to have that description matched to a
// particular buffer.
@@ -325,7 +317,6 @@ static std::string events_2_string(apr_int16_t events)
bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(!pipe) return false;
ll_debug_poll_fd("Set conditional", poll);
@@ -436,7 +427,6 @@ bool LLPumpIO::sleepChain(F64 seconds)
bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(mRunningChains.end() == mCurrentChain)
{
return false;
@@ -468,7 +458,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
//timeout is in microseconds
void LLPumpIO::pump(const S32& poll_timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
LLFastTimer t1(FTM_PUMP_IO);
//llinfos << "LLPumpIO::pump()" << llendl;
@@ -761,7 +750,6 @@ void LLPumpIO::pump(const S32& poll_timeout)
bool LLPumpIO::respond(LLIOPipe* pipe)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(NULL == pipe) return false;
#if LL_THREADS_APR
@@ -780,7 +768,6 @@ bool LLPumpIO::respond(
LLIOPipe::buffer_ptr_t data,
LLSD context)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// if the caller is providing a full link description, we need to
// have that description matched to a particular buffer.
if(!data) return false;
@@ -803,7 +790,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain");
void LLPumpIO::callback()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
//llinfos << "LLPumpIO::callback()" << llendl;
if(true)
{
@@ -854,7 +840,6 @@ void LLPumpIO::control(LLPumpIO::EControl op)
void LLPumpIO::initialize(void)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
mPool.create();
#if LL_THREADS_APR
// SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly.
@@ -865,7 +850,6 @@ void LLPumpIO::initialize(void)
void LLPumpIO::rebuildPollset()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// lldebugs << "LLPumpIO::rebuildPollset()" << llendl;
if(mPollset)
{
@@ -916,7 +900,6 @@ void LLPumpIO::rebuildPollset()
void LLPumpIO::processChain(LLChainInfo& chain)
{
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
LLIOPipe::EStatus status = LLIOPipe::STATUS_OK;
links_t::iterator it = chain.mHead;
links_t::iterator end = chain.mChainLinks.end();
@@ -1120,7 +1103,6 @@ bool LLPumpIO::handleChainError(
{
DoutEntering(dc::notice, "LLPumpIO::handleChainError(" << (void*)&chain << ", " << LLIOPipe::lookupStatusString(error) << ")");
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
links_t::reverse_iterator rit;
if(chain.mHead == chain.mChainLinks.end())
{
@@ -1185,13 +1167,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() :
mHasExpiration(false),
mDescriptorsPool(new LLAPRPool(LLThread::tldata().mRootPool))
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS);
}
void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(timeout > 0.0f)
{
mTimer.start(timeout);
@@ -1204,7 +1184,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(mTimer.getStarted())
{
F64 expiry = mTimer.expiresAt();

View File

@@ -38,7 +38,6 @@
#include <openssl/ssl.h>
#include "aicurleasyrequeststatemachine.h"
#include "llioutil.h"
#include "llmemtype.h"
#include "llpumpio.h"
#include "llsd.h"
#include "llstring.h"

View File

@@ -80,7 +80,6 @@
#include "v3math.h"
#include "v4math.h"
#include "lltransfertargetvfile.h"
#include "llmemtype.h"
#include "llpacketring.h"
class AIHTTPTimeoutPolicy;
@@ -799,7 +798,6 @@ S32 LLMessageSystem::getReceiveBytes() const
void LLMessageSystem::processAcks()
{
LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS);
F64 mt_sec = getMessageTimeSeconds();
{
gTransferManager.updateTransfers();
@@ -4031,7 +4029,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds )
// TODO: babbage: move gServicePump in to LLMessageSystem?
bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump)
{
LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL);
if(checkMessages(frame_count))
{
return true;

View File

@@ -44,8 +44,8 @@ set(llprimitive_HEADER_FILES
llprimtexturelist.h
lltextureanim.h
lltextureentry.h
lltreeparams.h
lltree_common.h
lltreeparams.h
llvolumemessage.h
llvolumexml.h
material_codes.h

View File

@@ -27,7 +27,6 @@
#include "linden_common.h"
#include "material_codes.h"
#include "llmemtype.h"
#include "llerror.h"
#include "message.h"
#include "llprimitive.h"
@@ -188,7 +187,6 @@ void LLPrimitive::clearTextureList()
// static
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
{
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
LLPrimitive *retval = new LLPrimitive();
if (retval)
@@ -206,7 +204,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
//===============================================================
void LLPrimitive::init_primitive(LLPCode p_code)
{
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
clearTextureList();
mPrimitiveCode = p_code;
}
@@ -698,7 +695,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolume *volumep;
if (unique_volume)
{

View File

@@ -28,7 +28,6 @@
#include "llprimtexturelist.h"
#include "lltextureentry.h"
#include "llmemtype.h"
// static
//int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++
@@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const
// sets the size of the mEntryList container
void LLPrimTextureList::setSize(S32 new_size)
{
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
if (new_size < 0)
{
new_size = 0;

View File

@@ -25,17 +25,20 @@ include_directories(
set(llrender_SOURCE_FILES
llcubemap.cpp
llfont.cpp
llfontgl.cpp
llfontbitmapcache.cpp
llfontfreetype.cpp
llfontgl.cpp
llfontregistry.cpp
llgl.cpp
llgldbg.cpp
llglslshader.cpp
llgltexture.cpp
llimagegl.cpp
llpostprocess.cpp
llrender.cpp
llrender2dutils.cpp
llrendersphere.cpp
llrendertarget.cpp
llshadermgr.cpp
lltexture.cpp
lluiimage.cpp
@@ -46,9 +49,9 @@ set(llrender_HEADER_FILES
CMakeLists.txt
llcubemap.h
llfontgl.h
llfont.h
llfontbitmapcache.h
llfontfreetype.h
llfontgl.h
llfontregistry.h
llgl.h
llgldbg.h
@@ -73,29 +76,5 @@ set_source_files_properties(${llrender_HEADER_FILES}
list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES})
if (SERVER AND NOT WINDOWS AND NOT DARWIN)
copy_server_sources(
llgl
llrender
)
set_source_files_properties(
${server_SOURCE_FILES}
PROPERTIES
COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1"
)
add_library (llrenderheadless
${llrender_SOURCE_FILES}
${server_SOURCE_FILES}
)
add_dependencies(llrenderheadless prepare)
else (SERVER AND NOT WINDOWS AND NOT DARWIN)
list(APPEND llrender_SOURCE_FILES
llgl.cpp
llrender.cpp
llrendertarget.cpp
)
endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
add_library (llrender ${llrender_SOURCE_FILES})
add_dependencies(llrender prepare)

View File

@@ -1,6 +1,6 @@
/**
* @file llfont.cpp
* @brief Font library wrapper
* @file llfontfreetype.cpp
* @brief Freetype font library wrapper
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
@@ -32,18 +32,10 @@
#include "linden_common.h"
#include "llfont.h"
#include "llfontfreetype.h"
// Freetype stuff
#if !defined(LL_LINUX) || defined(LL_STANDALONE)
# include <ft2build.h>
#else
// I had to do some work to avoid the system-installed FreeType headers... --ryan.
//This path no longer exists.
//# include "llfreetype2/freetype/ft2build.h"
//This works fine.
# include "../include/ft2build.h"
#endif
#include <ft2build.h>
// For some reason, this won't work if it's not wrapped in the ifdef
#ifdef FT_FREETYPE_H
@@ -65,12 +57,15 @@ LLFontManager *gFontManagerp = NULL;
FT_Library gFTLibrary = NULL;
bool LLFont::sOpenGLcrashOnRestart = false;
bool LLFontFreetype::sOpenGLcrashOnRestart = false;
//static
void LLFontManager::initClass()
{
gFontManagerp = new LLFontManager;
if (!gFontManagerp)
{
gFontManagerp = new LLFontManager;
}
}
//static
@@ -92,7 +87,6 @@ LLFontManager::LLFontManager()
}
}
LLFontManager::~LLFontManager()
{
FT_Done_FreeType(gFTLibrary);
@@ -101,14 +95,14 @@ LLFontManager::~LLFontManager()
LLFontGlyphInfo::LLFontGlyphInfo(U32 index)
: mGlyphIndex(index),
mXBitmapOffset(0), // Offset to the origin in the bitmap
mYBitmapOffset(0), // Offset to the origin in the bitmap
mXBearing(0), // Distance from baseline to left in pixels
mYBearing(0), // Distance from baseline to top in pixels
mWidth(0), // In pixels
mHeight(0), // In pixels
mXAdvance(0.f), // In pixels
mYAdvance(0.f), // In pixels
mXBitmapOffset(0), // Offset to the origin in the bitmap
mYBitmapOffset(0), // Offset to the origin in the bitmap
mXBearing(0), // Distance from baseline to left in pixels
mYBearing(0), // Distance from baseline to top in pixels
mIsRendered(FALSE),
mMetricsValid(FALSE)
{}
@@ -126,33 +120,29 @@ LLFontList::~LLFontList()
// The (now dangling) pointers in the vector will be cleaned up when the vector is deleted by the superclass destructor.
}
}
void LLFontList::addAtEnd(LLFont *font)
void LLFontList::addAtEnd(LLFontFreetype *font)
{
// Purely a convenience function
this->push_back(font);
}
LLFont::LLFont()
LLFontFreetype::LLFontFreetype()
: mFontBitmapCachep(new LLFontBitmapCache),
mValid(FALSE),
mAscender(0.f),
mDescender(0.f),
mLineHeight(0.f),
mFallbackFontp(NULL),
mIsFallback(FALSE),
mFTFace(NULL),
mRenderGlyphCount(0),
mAddGlyphCount(0),
mPointSize(0)
{
mFontBitmapCachep = new LLFontBitmapCache;
mValid = FALSE;
mAscender = 0.f;
mDescender = 0.f;
mLineHeight = 0.f;
mFallbackFontp = NULL;
mIsFallback = FALSE;
mFTFace = NULL;
mRenderGlyphCount = 0;
mAddGlyphCount = 0;
mPointSize = 0;
}
LLFont::~LLFont()
LLFontFreetype::~LLFontFreetype()
{
// Clean up freetype libs.
if (mFTFace)
@@ -165,25 +155,7 @@ LLFont::~LLFont()
// mFontBitmapCachep will be cleaned up by LLPointer destructor.
}
// virtual
F32 LLFont::getLineHeight() const
{
return mLineHeight;
}
// virtual
F32 LLFont::getAscenderHeight() const
{
return mAscender;
}
// virtual
F32 LLFont::getDescenderHeight() const
{
return mDescender;
}
BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
BOOL LLFontFreetype::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
{
// Don't leak face objects. This is also needed to deal with
// changed font file names.
@@ -260,38 +232,115 @@ BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F
return TRUE;
}
void LLFont::resetBitmapCache()
//virtual
F32 LLFontFreetype::getLineHeight() const
{
// Iterate through glyphs and clear the mIsRendered flag
for (char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.begin();
iter != mCharGlyphInfoMap.end(); ++iter)
{
iter->second->mIsRendered = FALSE;
//FIXME: this is only strictly necessary when resetting the entire font,
//not just flushing the bitmap
iter->second->mMetricsValid = FALSE;
}
mFontBitmapCachep->reset();
if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux...
{
// Add the empty glyph`5
addGlyph(0, 0);
}
return mLineHeight;
}
LLFontGlyphInfo* LLFont::getGlyphInfo(const llwchar wch) const
//virtual
F32 LLFontFreetype::getAscenderHeight() const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
return iter->second;
}
return NULL;
return mAscender;
}
//virtual
F32 LLFontFreetype::getDescenderHeight() const
{
return mDescender;
}
BOOL LLFont::hasGlyph(const llwchar wch) const
F32 LLFontFreetype::getXAdvance(const llwchar wch) const
{
if (mFTFace == NULL)
return 0.0;
llassert(!mIsFallback);
U32 glyph_index;
// Return existing info only if it is current
LLFontGlyphInfo* gi = getGlyphInfo(wch);
if (gi && gi->mMetricsValid)
{
return gi->mXAdvance;
}
const LLFontFreetype* fontp = this;
// Initialize char to glyph map
glyph_index = FT_Get_Char_Index(mFTFace, wch);
if (glyph_index == 0 && mFallbackFontp)
{
LLFontList::iterator iter;
for(iter = mFallbackFontp->begin(); (iter != mFallbackFontp->end()) && (glyph_index == 0); iter++)
{
glyph_index = FT_Get_Char_Index((*iter)->mFTFace, wch);
if(glyph_index)
{
fontp = *iter;
}
}
}
if (glyph_index)
{
// This font has this glyph
fontp->renderGlyph(glyph_index);
// Create the entry if it's not there
char_glyph_info_map_t::iterator iter2 = mCharGlyphInfoMap.find(wch);
if (iter2 == mCharGlyphInfoMap.end())
{
gi = new LLFontGlyphInfo(glyph_index);
insertGlyphInfo(wch, gi);
}
else
{
gi = iter2->second;
}
gi->mWidth = fontp->mFTFace->glyph->bitmap.width;
gi->mHeight = fontp->mFTFace->glyph->bitmap.rows;
// Convert these from 26.6 units to float pixels.
gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f;
gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f;
gi->mMetricsValid = TRUE;
return gi->mXAdvance;
}
else
{
gi = get_if_there(mCharGlyphInfoMap, (llwchar)0, (LLFontGlyphInfo*)NULL);
if (gi)
{
return gi->mXAdvance;
}
}
// Last ditch fallback - no glyphs defined at all.
return (F32)mFontBitmapCachep->getMaxCharWidth();
}
F32 LLFontFreetype::getXKerning(const llwchar char_left, const llwchar char_right) const
{
if (mFTFace == NULL)
return 0.0;
llassert(!mIsFallback);
LLFontGlyphInfo* left_glyph_info = get_if_there(mCharGlyphInfoMap, char_left, (LLFontGlyphInfo*)NULL);
U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0;
// Kern this puppy.
LLFontGlyphInfo* right_glyph_info = get_if_there(mCharGlyphInfoMap, char_right, (LLFontGlyphInfo*)NULL);
U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0;
FT_Vector delta;
llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));
return delta.x*(1.f/64.f);
}
BOOL LLFontFreetype::hasGlyph(const llwchar wch) const
{
llassert(!mIsFallback);
const LLFontGlyphInfo* gi = getGlyphInfo(wch);
@@ -305,7 +354,7 @@ BOOL LLFont::hasGlyph(const llwchar wch) const
}
}
BOOL LLFont::addChar(const llwchar wch) const
BOOL LLFontFreetype::addChar(const llwchar wch) const
{
if (mFTFace == NULL)
return FALSE;
@@ -345,21 +394,7 @@ BOOL LLFont::addChar(const llwchar wch) const
return FALSE;
}
void LLFont::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
delete iter->second;
iter->second = gi;
}
else
{
mCharGlyphInfoMap[wch] = gi;
}
}
BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 glyph_index) const
BOOL LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, const llwchar wch, const U32 glyph_index) const
{
if (mFTFace == NULL)
return FALSE;
@@ -460,120 +495,69 @@ BOOL LLFont::addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32
return TRUE;
}
BOOL LLFont::addGlyph(const llwchar wch, const U32 glyph_index) const
LLFontGlyphInfo* LLFontFreetype::getGlyphInfo(const llwchar wch) const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
return iter->second;
}
return NULL;
}
void LLFontFreetype::insertGlyphInfo(llwchar wch, LLFontGlyphInfo* gi) const
{
char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.find(wch);
if (iter != mCharGlyphInfoMap.end())
{
delete iter->second;
iter->second = gi;
}
else
{
mCharGlyphInfoMap[wch] = gi;
}
}
BOOL LLFontFreetype::addGlyph(const llwchar wch, const U32 glyph_index) const
{
return addGlyphFromFont(this, wch, glyph_index);
}
F32 LLFont::getXAdvance(const llwchar wch) const
{
if (mFTFace == NULL)
return 0.0;
llassert(!mIsFallback);
U32 glyph_index;
// Return existing info only if it is current
LLFontGlyphInfo* gi = getGlyphInfo(wch);
if (gi && gi->mMetricsValid)
{
return gi->mXAdvance;
}
const LLFont* fontp = this;
// Initialize char to glyph map
glyph_index = FT_Get_Char_Index(mFTFace, wch);
if (glyph_index == 0 && mFallbackFontp)
{
LLFontList::iterator iter;
for(iter = mFallbackFontp->begin(); (iter != mFallbackFontp->end()) && (glyph_index == 0); iter++)
{
glyph_index = FT_Get_Char_Index((*iter)->mFTFace, wch);
if(glyph_index)
{
fontp = *iter;
}
}
}
if (glyph_index)
{
// This font has this glyph
fontp->renderGlyph(glyph_index);
// Create the entry if it's not there
char_glyph_info_map_t::iterator iter2 = mCharGlyphInfoMap.find(wch);
if (iter2 == mCharGlyphInfoMap.end())
{
gi = new LLFontGlyphInfo(glyph_index);
insertGlyphInfo(wch, gi);
}
else
{
gi = iter2->second;
}
gi->mWidth = fontp->mFTFace->glyph->bitmap.width;
gi->mHeight = fontp->mFTFace->glyph->bitmap.rows;
// Convert these from 26.6 units to float pixels.
gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f;
gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f;
gi->mMetricsValid = TRUE;
return gi->mXAdvance;
}
else
{
gi = get_if_there(mCharGlyphInfoMap, (llwchar)0, (LLFontGlyphInfo*)NULL);
if (gi)
{
return gi->mXAdvance;
}
}
// Last ditch fallback - no glyphs defined at all.
return (F32)mFontBitmapCachep->getMaxCharWidth();
}
void LLFont::renderGlyph(const U32 glyph_index) const
void LLFontFreetype::renderGlyph(const U32 glyph_index) const
{
if (mFTFace == NULL)
return;
int error = FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT );
llassert(!error);
llassert_always(! FT_Load_Glyph(mFTFace, glyph_index, FT_LOAD_DEFAULT));
error = FT_Render_Glyph(mFTFace->glyph, gFontRenderMode);
llassert_always(! FT_Render_Glyph(mFTFace->glyph, gFontRenderMode) );
mRenderGlyphCount++;
llassert(!error);
}
F32 LLFont::getXKerning(const llwchar char_left, const llwchar char_right) const
void LLFontFreetype::resetBitmapCache()
{
if (mFTFace == NULL)
return 0.0;
// Iterate through glyphs and clear the mIsRendered flag
for (char_glyph_info_map_t::iterator iter = mCharGlyphInfoMap.begin();
iter != mCharGlyphInfoMap.end(); ++iter)
{
iter->second->mIsRendered = FALSE;
//FIXME: this is only strictly necessary when resetting the entire font,
//not just flushing the bitmap
iter->second->mMetricsValid = FALSE;
}
mFontBitmapCachep->reset();
llassert(!mIsFallback);
LLFontGlyphInfo* left_glyph_info = get_if_there(mCharGlyphInfoMap, char_left, (LLFontGlyphInfo*)NULL);
U32 left_glyph = left_glyph_info ? left_glyph_info->mGlyphIndex : 0;
// Kern this puppy.
LLFontGlyphInfo* right_glyph_info = get_if_there(mCharGlyphInfoMap, char_right, (LLFontGlyphInfo*)NULL);
U32 right_glyph = right_glyph_info ? right_glyph_info->mGlyphIndex : 0;
FT_Vector delta;
llverify(!FT_Get_Kerning(mFTFace, left_glyph, right_glyph, ft_kerning_unfitted, &delta));
return delta.x*(1.f/64.f);
if (!mIsFallback || !sOpenGLcrashOnRestart) // because this often crashes under Linux...
{
// Add the empty glyph`5
addGlyph(0, 0);
}
}
void LLFont::setSubImageLuminanceAlpha(const U32 x,
void LLFontFreetype::setSubImageLuminanceAlpha(const U32 x,
const U32 y,
const U32 bitmap_num,
const U32 width,

View File

@@ -30,11 +30,10 @@
* $/LicenseInfo$
*/
#ifndef LL_LLFONT_H
#define LL_LLFONT_H
#ifndef LL_LLFONTFREETYPE_H
#define LL_LLFONTFREETYPE_H
#include <map>
//#include "lllocalidhashmap.h"
#include "llmemory.h"
#include "llstl.h"
@@ -43,7 +42,7 @@
class LLImageRaw;
class LLFontManager;
class LLFont;
class LLFontFreetype;
// Hack. FT_Face is just a typedef for a pointer to a struct,
// but there's no simple forward declarations file for FreeType,
@@ -59,7 +58,7 @@ class LLFontManager
public:
static void initClass();
static void cleanupClass();
public:
LLFontManager();
virtual ~LLFontManager();
@@ -88,19 +87,19 @@ public:
};
// Used for lists of fallback fonts
class LLFontList : public std::vector<LLFont*>
class LLFontList : public std::vector<LLFontFreetype*>
{
public:
LLFontList();
~LLFontList();
void addAtEnd(LLFont *font);
void addAtEnd(LLFontFreetype *font);
};
class LLFont
class LLFontFreetype
{
public:
LLFont();
virtual ~LLFont();
LLFontFreetype();
~LLFontFreetype();
// is_fallback should be true for fallback fonts that aren't used
// to render directly (Unicode backup, primarily)
@@ -157,7 +156,7 @@ protected:
virtual BOOL hasGlyph(const llwchar wch) const; // Has a glyph for this character
virtual BOOL addChar(const llwchar wch) const; // Add a new character to the font if necessary
virtual BOOL addGlyph(const llwchar wch, const U32 glyph_index) const; // Add a new glyph to the existing font
virtual BOOL addGlyphFromFont(const LLFont *fontp, const llwchar wch, const U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
virtual BOOL addGlyphFromFont(const LLFontFreetype *fontp, const llwchar wch, const U32 glyph_index) const; // Add a glyph from this font to the other (returns the glyph_index, 0 if not found)
virtual LLFontGlyphInfo* getGlyphInfo(const llwchar wch) const;
@@ -195,4 +194,4 @@ protected:
mutable S32 mAddGlyphCount;
};
#endif // LL_FONT_
#endif // LL_FONTFREETYPE_H

View File

@@ -26,10 +26,12 @@
#include "linden_common.h"
#include <boost/tokenizer.hpp>
#include "llfont.h"
#include "llfontgl.h"
// Linden library includes
#include "llfontfreetype.h"
#include "llfontbitmapcache.h"
#include "llfontregistry.h"
#include "llgl.h"
@@ -38,6 +40,9 @@
#include "llstl.h"
#include "llfasttimer.h"
// Third party library includes
#include <boost/tokenizer.hpp>
const S32 BOLD_OFFSET = 1;
// static class members
@@ -79,7 +84,7 @@ F32 llfont_round_y(F32 y)
}
LLFontGL::LLFontGL()
: LLFont()
: LLFontFreetype()
{
clearEmbeddedChars();
}
@@ -128,7 +133,7 @@ void LLFontGL::destroyGL()
BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, const S32 components, BOOL is_fallback)
{
if (!LLFont::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback))
if (!LLFontFreetype::loadFace(filename, point_size, vert_dpi, horz_dpi, components, is_fallback))
{
return FALSE;
}
@@ -138,7 +143,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, const F32 point_size, const
BOOL LLFontGL::addChar(const llwchar wch) const
{
if (!LLFont::addChar(wch))
if (!LLFontFreetype::addChar(wch))
{
return FALSE;
}
@@ -288,7 +293,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
F32 inv_width = 1.f / mFontBitmapCachep->getBitmapWidth();
F32 inv_height = 1.f / mFontBitmapCachep->getBitmapHeight();
const S32 LAST_CHARACTER = LLFont::LAST_CHAR_FULL;
const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
BOOL draw_ellipses = FALSE;
@@ -546,7 +551,7 @@ F32 LLFontGL::getWidthF32(const std::string& utf8text, const S32 begin_offset, c
F32 LLFontGL::getWidthF32(const llwchar* wchars, const S32 begin_offset, const S32 max_chars, BOOL use_embedded) const
{
const S32 LAST_CHARACTER = LLFont::LAST_CHAR_FULL;
const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL;
F32 cur_x = 0;
const S32 max_index = begin_offset + max_chars;
@@ -981,7 +986,7 @@ void LLFontGL::destroyAllGL()
{
if (sFontRegistry)
{
if (LLFont::sOpenGLcrashOnRestart)
if (LLFontFreetype::sOpenGLcrashOnRestart)
{
// This will leak memory but will prevent a crash...
sFontRegistry = NULL;

View File

@@ -28,7 +28,7 @@
#ifndef LL_LLFONTGL_H
#define LL_LLFONTGL_H
#include "llfont.h"
#include "llfontfreetype.h"
#include "lltexture.h"
#include "v2math.h"
#include "llcoord.h"
@@ -44,7 +44,7 @@ class LLFontDescriptor;
// Structure used to store previously requested fonts.
class LLFontRegistry;
class LLFontGL : public LLFont
class LLFontGL : public LLFontFreetype
{
public:
enum HAlign
@@ -66,12 +66,11 @@ public:
enum StyleFlags
{
// text style to render. May be combined (these are bit flags)
// text style to render. May be combined (these are bit flags)
NORMAL = 0x00,
BOLD = 0x01,
ITALIC = 0x02,
UNDERLINE = 0x04,
UNDERLINE = 0x04
};
enum ShadowType

View File

@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "llgl.h"
#include "llfontfreetype.h"
#include "llfontgl.h"
#include "llfontregistry.h"
#include <boost/tokenizer.hpp>
@@ -188,21 +189,20 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
path_it != xml_paths.end();
++path_it)
{
LLXMLNodePtr root;
std::string full_filename = gDirUtilp->findSkinnedFilename(*path_it, xml_filename);
bool parsed_file = LLXMLNode::parseFile(full_filename, root, NULL);
if (!parsed_file)
continue;
if ( root.isNull() || ! root->hasName( "fonts" ) )
{
llwarns << "Bad font info file: "
<< full_filename << llendl;
continue;
}
std::string root_name;
root->getAttributeString("name",root_name);
if (root->hasName("fonts"))
@@ -214,7 +214,7 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename)
}
if (success)
dump();
return success;
}

View File

@@ -44,7 +44,6 @@
#include "llmath.h"
#include "m4math.h"
#include "llstring.h"
#include "llmemtype.h"
#include "llstacktrace.h"
#include "llglheaders.h"
@@ -603,11 +602,12 @@ bool LLGLManager::initGL()
if (mGLVendor.substr(0,4) == "ATI ")
{
mGLVendorShort = "ATI";
BOOL mobile = FALSE;
if (mGLRenderer.find("MOBILITY") != std::string::npos)
{
mobile = TRUE;
}
// "mobile" appears to be unused, and this code was causing warnings.
//BOOL mobile = FALSE;
//if (mGLRenderer.find("MOBILITY") != std::string::npos)
//{
// mobile = TRUE;
//}
mIsATI = TRUE;
#if LL_WINDOWS && !LL_MESA_HEADLESS
@@ -1444,8 +1444,7 @@ void assert_glerror()
void clear_glerror()
{
// Create or update texture to be used with this data
GLenum error;
error = glGetError();
glGetError();
}
///////////////////////////////////////////////////////////////
@@ -2266,7 +2265,6 @@ void LLGLNamePool::release(GLuint name)
//static
void LLGLNamePool::upkeepPools()
{
LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS);
for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
{
LLGLNamePool & pool = *iter;

View File

@@ -65,9 +65,9 @@ bool LLImageGL::sCompressTextures = false;
std::set<LLImageGL*> LLImageGL::sImageList;
// ****************************************************************************************************
//****************************************************************************************************
//The below for texture auditing use only
// ****************************************************************************************************
//****************************************************************************************************
//-----------------------
//debug use
BOOL gAuditTexture = FALSE ;
@@ -816,8 +816,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
S32 w = width, h = height;
const U8* prev_mip_data = 0;
const U8* cur_mip_data = 0;
S32 prev_mip_size = 0;
#ifdef SHOW_ASSERT
S32 cur_mip_size = 0;
#endif
mMipLevels = nummips;
@@ -826,18 +827,24 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
if (m==0)
{
cur_mip_data = data_in;
#ifdef SHOW_ASSERT
cur_mip_size = width * height * mComponents;
#endif
}
else
{
S32 bytes = w * h * mComponents;
#ifdef SHOW_ASSERT
llassert(prev_mip_data);
llassert(prev_mip_size == bytes*4);
llassert(cur_mip_size == bytes*4);
#endif
U8* new_data = new U8[bytes];
llassert_always(new_data);
LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents);
cur_mip_data = new_data;
#ifdef SHOW_ASSERT
cur_mip_size = bytes;
#endif
}
llassert(w > 0 && h > 0 && cur_mip_data);
{
@@ -870,7 +877,6 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
delete[] prev_mip_data;
}
prev_mip_data = cur_mip_data;
prev_mip_size = cur_mip_size;
w >>= 1;
h >>= 1;
}

View File

@@ -31,7 +31,6 @@
#include "llvertexbuffer.h"
// #include "llrender.h"
#include "llglheaders.h"
#include "llmemtype.h"
#include "llrender.h"
#include "llvector4a.h"
#include "llshadermgr.h"
@@ -325,7 +324,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
{
if (sLastMask != data_mask)
{
bool error = false;
if (gGLManager.mGLSLVersionMajor < 2 && gGLManager.mGLSLVersionMinor < 30)
{
@@ -392,7 +390,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
{
if (gDebugSession)
{
error = true;
gFailLog << "Bad client state! " << array[i] << " disabled." << std::endl;
}
else
@@ -412,7 +409,6 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
{ //needs to be disabled, make sure it was (DEBUG TEMPORARY)
if (gDebugSession)
{
error = true;
gFailLog << "Bad client state! " << array[i] << " enabled." << std::endl;
}
else
@@ -779,7 +775,6 @@ void LLVertexBuffer::unbind()
//static
void LLVertexBuffer::cleanupClass()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS);
unbind();
sStreamIBOPool.cleanup();
@@ -860,8 +855,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mMappable(false),
mFence(NULL)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR);
mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping);
//zero out offsets
@@ -921,7 +914,6 @@ S32 LLVertexBuffer::getSize() const
//virtual
LLVertexBuffer::~LLVertexBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR);
destroyGLBuffer();
destroyGLIndices();
@@ -1041,8 +1033,6 @@ void LLVertexBuffer::releaseIndices()
void LLVertexBuffer::createGLBuffer(U32 size)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES);
if (mGLBuffer)
{
destroyGLBuffer();
@@ -1072,8 +1062,6 @@ void LLVertexBuffer::createGLBuffer(U32 size)
void LLVertexBuffer::createGLIndices(U32 size)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES);
if (mGLIndices)
{
destroyGLIndices();
@@ -1108,7 +1096,6 @@ void LLVertexBuffer::createGLIndices(U32 size)
void LLVertexBuffer::destroyGLBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER);
if (mGLBuffer)
{
if (mMappedDataUsingVBOs)
@@ -1129,7 +1116,6 @@ void LLVertexBuffer::destroyGLBuffer()
void LLVertexBuffer::destroyGLIndices()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES);
if (mGLIndices)
{
if (mMappedIndexDataUsingVBOs)
@@ -1150,8 +1136,6 @@ void LLVertexBuffer::destroyGLIndices()
void LLVertexBuffer::updateNumVerts(S32 nverts)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS);
llassert(nverts >= 0);
if (nverts > 65536)
@@ -1174,8 +1158,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
void LLVertexBuffer::updateNumIndices(S32 nindices)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES);
llassert(nindices >= 0);
U32 needed_size = sizeof(U16) * (U32)nindices;
@@ -1192,8 +1174,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices)
void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER);
stop_glerror();
if (nverts < 0 || nindices < 0 ||
@@ -1344,8 +1324,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
llassert(newnverts >= 0);
llassert(newnindices >= 0);
LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER);
updateNumVerts(newnverts);
updateNumIndices(newnindices);
@@ -1393,7 +1371,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map");
volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{
bindGLBuffer(true);
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
if (mFinal)
{
llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl;
@@ -1442,7 +1419,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
if (!mVertexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
mVertexLocked = true;
sMappedCount++;
stop_glerror();
@@ -1573,7 +1549,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map");
volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
bindGLIndices(true);
if (mFinal)
{
@@ -1620,8 +1595,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
if (!mIndexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES);
mIndexLocked = true;
sMappedCount++;
stop_glerror();
@@ -1744,7 +1717,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range");
void LLVertexBuffer::unmapBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER);
if (!useVBOs())
{
return; //nothing to unmap
@@ -2098,7 +2070,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{
flush();
LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER);
//set up pointers if the data mask is different ...
bool setup = (sLastMask != data_mask);
@@ -2144,7 +2115,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
setup = setup || bindBuffer || bindIndices;
}
bool error = false;
if (gDebugGL && !mGLArray)
{
GLint buff;
@@ -2153,7 +2123,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{
if (gDebugSession)
{
error = true;
gFailLog << "Invalid GL vertex buffer bound: " << buff << std::endl;
}
else
@@ -2169,7 +2138,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{
if (gDebugSession)
{
error = true;
gFailLog << "Invalid GL index buffer bound: " << buff << std::endl;
}
else
@@ -2240,7 +2208,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
// virtual (default)
void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER);
stop_glerror();
volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;

View File

@@ -30,7 +30,6 @@ set(llui_SOURCE_FILES
llclipboard.cpp
llcombobox.cpp
llctrlselectioninterface.cpp
lldelayeduidelete.cpp
lldraghandle.cpp
lleditmenuhandler.cpp
llfloater.cpp
@@ -73,9 +72,9 @@ set(llui_SOURCE_FILES
lluictrlfactory.cpp
lluistring.cpp
llundo.cpp
llview.cpp
llviewborder.cpp
llviewmodel.cpp
llview.cpp
llviewquery.cpp
)
@@ -90,7 +89,6 @@ set(llui_HEADER_FILES
llclipboard.h
llcombobox.h
llctrlselectioninterface.h
lldelayeduidelete.h
lldraghandle.h
lleditmenuhandler.h
llfloater.h
@@ -105,8 +103,8 @@ set(llui_HEADER_FILES
llmenugl.h
llmodaldialog.h
llmultifloater.h
llmultisliderctrl.h
llmultislider.h
llmultisliderctrl.h
llnotificationptr.h
llnotifications.h
llnotificationsutil.h
@@ -122,8 +120,8 @@ set(llui_HEADER_FILES
llscrollcontainer.h
llscrollingpanellist.h
llscrolllistctrl.h
llsliderctrl.h
llslider.h
llsliderctrl.h
llspinctrl.h
llstyle.h
lltabcontainer.h
@@ -131,18 +129,18 @@ set(llui_HEADER_FILES
lltexteditor.h
lltextparser.h
lltrans.h
lluiconstants.h
lluictrlfactory.h
lluictrl.h
lluifwd.h
llui.h
lluicolor.h
lluiconstants.h
lluictrl.h
lluictrlfactory.h
lluifwd.h
lluistring.h
lluixmltags.h
llundo.h
llview.h
llviewborder.h
llviewmodel.h
llview.h
llviewquery.h
)

View File

@@ -1,67 +0,0 @@
// <edit>
#include "linden_common.h"
#include "lldelayeduidelete.h"
#define DELETE_DELAY 0.1f
#define DELETES_PER_DELAY 512
LLDeleteScheduler* gDeleteScheduler;
std::list<LLDeleteJob*> LLDeleteScheduler::sJobs;
LLDeleteScheduler::LLDeleteScheduler() : LLEventTimer(DELETE_DELAY)
{
}
void LLDeleteScheduler::addViewDeleteJob(std::list<LLView*> views)
{
if(!views.empty())
{
LLViewDeleteJob* job = new LLViewDeleteJob(views);
sJobs.push_back(job);
}
}
BOOL LLDeleteScheduler::tick() // IMPORTANT: never return TRUE
{
if(!sJobs.empty())
{
U32 completed = 0;
do
{
LLDeleteJob* job = sJobs.front();
if(job->work(completed))
{
delete job;
sJobs.pop_front();
}
} while((completed < DELETES_PER_DELAY) && !sJobs.empty());
}
return FALSE; // EVER
}
BOOL LLDeleteJob::work(U32& completed)
{
llwarns << "THIS IS SPOSED TO BE OVERRIDDEN" << llendl;
return TRUE;
}
LLViewDeleteJob::LLViewDeleteJob(std::list<LLView*> views)
: mList(views)
{
}
LLViewDeleteJob::~LLViewDeleteJob()
{
}
BOOL LLViewDeleteJob::work(U32& completed)
{
do
{
if(!mList.empty())
{
LLView* view = mList.front();
delete view;
mList.pop_front();
}
else
{
return TRUE; // job done
}
} while(++completed < DELETES_PER_DELAY);
return FALSE;
}
// </edit>

View File

@@ -1,32 +0,0 @@
// <edit>
#ifndef LL_LLDELAYEDUIDELETE_H
#define LL_LLDELAYEDUIDELETE_H
#include "lleventtimer.h"
#include "llview.h"
class LLDeleteJob
{
public:
virtual BOOL work(U32& completed);
virtual ~LLDeleteJob() {}
};
class LLViewDeleteJob : public LLDeleteJob
{
public:
LLViewDeleteJob(std::list<LLView*> views);
virtual ~LLViewDeleteJob();
virtual BOOL work(U32& completed);
private:
std::list<LLView*> mList;
};
class LLDeleteScheduler : public LLEventTimer
{
public:
LLDeleteScheduler();
void addViewDeleteJob(std::list<LLView*> views);
BOOL tick();
private:
static std::list<LLDeleteJob*> sJobs;
};
extern LLDeleteScheduler* gDeleteScheduler;
#endif
// </edit>

View File

@@ -277,30 +277,14 @@ void LLFloater::initFloater(const std::string& title,
mMinimized = FALSE;
mExpandedRect.set(0,0,0,0);
S32 close_pad; // space to the right of close box
S32 close_box_size; // For layout purposes, how big is the close box?
if (close_btn)
{
close_box_size = LLFLOATER_CLOSE_BOX_SIZE;
close_pad = 0;
}
else
{
close_box_size = 0;
close_pad = 0;
}
S32 minimize_box_size;
S32 minimize_pad;
if (minimizable && !drag_on_left)
{
minimize_box_size = LLFLOATER_CLOSE_BOX_SIZE;
minimize_pad = 0;
}
else
{
minimize_box_size = 0;
minimize_pad = 0;
}
// Drag Handle

View File

@@ -1065,7 +1065,6 @@ struct LLLayoutStack::LLEmbeddedPanel
mVisibleAmt(1.f) // default to fully visible
{
LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
LLRect resize_bar_rect = panelp->getRect();
S32 min_dim;
if (orientation == HORIZONTAL)

View File

@@ -83,9 +83,6 @@ void LLProgressBar::draw()
bar_bg_imagep->draw(getLocalRect(),
background_color);
F32 alpha = 0.5f + 0.5f*0.5f*(1.f + (F32)sin(3.f*timer.getElapsedTimeF32()));
LLColor4 bar_color = LLUI::sColorsGroup->getColor("LoginProgressBarFgColor");
bar_color.mV[3] = alpha;
LLRect progress_rect = getLocalRect();
progress_rect.mRight = llround(getRect().getWidth() * (mPercentDone / 100.f));
bar_fg_imagep->draw(progress_rect);

View File

@@ -261,7 +261,6 @@ void LLSlider::draw()
F32 opacity = getEnabled() ? 1.f : 0.3f;
LLColor4 center_color = (mThumbCenterColor % opacity);
LLColor4 track_color = (mTrackColor % opacity);
// Track
LLRect track_rect(mThumbImage->getWidth() / 2,

View File

@@ -35,7 +35,7 @@
#include "v4color.h"
#include "llresmgr.h"
#include "llfont.h"
#include "llfontfreetype.h"
#include "llui.h"
#include "lluiimage.h"

View File

@@ -2228,7 +2228,7 @@ void LLTextEditor::pasteHelper(bool is_primary)
for( S32 i = 0; i < len; i++ )
{
llwchar wc = clean_string[i];
if( (wc < LLFont::FIRST_CHAR) && (wc != LF) )
if( (wc < LLFontFreetype::FIRST_CHAR) && (wc != LF) )
{
clean_string[i] = LL_UNKNOWN_CHAR;
}

View File

@@ -348,8 +348,10 @@ public:
// even if their constructors have side effects
void reference()
{
#if LL_WINDOWS
S32 dummy;
dummy = 0;
#endif /*LL_WINDOWS*/
}
};

View File

@@ -59,10 +59,6 @@
#include "lltextbox.h"
#include "llfasttimer.h"
// <edit>
#include "lldelayeduidelete.h"
// </edit>
using namespace LLOldEvents;
//HACK: this allows you to instantiate LLView from xml with "<view/>" which we don't want
@@ -1420,7 +1416,7 @@ void LLView::updateBoundingRect()
{
if (isDead()) return;
LLRect cur_rect = mBoundingRect;
//LLRect cur_rect = mBoundingRect;
if (getUseBoundingRect())
{

View File

@@ -41,12 +41,12 @@ if (LINUX)
LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp)
LIST(APPEND llvfs_HEADER_FILES lldir_linux.h)
if (VIEWER AND INSTALL)
if (INSTALL)
set_source_files_properties(lldir_linux.cpp
PROPERTIES COMPILE_FLAGS
"-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\""
)
endif (VIEWER AND INSTALL)
endif (INSTALL)
endif (LINUX)
if (WINDOWS)

View File

@@ -18,6 +18,7 @@ include(LLMath)
include(LLRender)
include(LLVFS)
include(LLWindow)
include(LLXML)
include(UI)
include_directories(
@@ -27,13 +28,16 @@ include_directories(
${LLRENDER_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
${DIRECTX_INCLUDE_DIR}
)
set(llwindow_SOURCE_FILES
llkeyboard.cpp
llkeyboardheadless.cpp
llwindowheadless.cpp
llwindow.cpp
llwindowcallbacks.cpp
llwindowheadless.cpp
)
set(llwindow_HEADER_FILES
@@ -41,30 +45,47 @@ set(llwindow_HEADER_FILES
llkeyboard.h
llkeyboardheadless.h
llwindowheadless.h
llwindowcallbacks.h
llwindowheadless.h
)
set(viewer_SOURCE_FILES
llwindow.cpp
llmousehandler.cpp
)
set(viewer_HEADER_FILES
llwindow.h
llpreeditor.h
llmousehandler.h
llpreeditor.h
llwindow.h
)
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
if (LINUX AND VIEWER)
if (LINUX)
set(llwindow_LINK_LIBRARIES
${LLCOMMON_LIBRARIES}
${LLIMAGE_LIBRARIES}
${LLMATH_LIBRARIES}
${LLRENDER_LIBRARIES}
${LLVFS_LIBRARIES}
${LLWINDOW_LIBRARIES}
${LLXML_LIBRARIES}
${UI_LIBRARIES} # for GTK
${SDL_LIBRARY}
fontconfig # For FCInit and other FC* functions.
)
endif (LINUX AND VIEWER)
list(APPEND viewer_SOURCE_FILES
llkeyboardsdl.cpp
llwindowsdl.cpp
)
list(APPEND viewer_HEADER_FILES
llkeyboardsdl.h
llwindowsdl.h
)
endif (LINUX)
if (DARWIN)
list(APPEND llwindow_SOURCE_FILES
@@ -87,29 +108,19 @@ if (DARWIN)
)
endif (DARWIN)
if (LINUX AND VIEWER)
list(APPEND viewer_SOURCE_FILES
llkeyboardsdl.cpp
llwindowsdl.cpp
)
list(APPEND viewer_HEADER_FILES
llkeyboardsdl.h
llwindowsdl.h
)
endif (LINUX AND VIEWER)
if (WINDOWS)
list(APPEND llwindow_SOURCE_FILES
llwindowwin32.cpp
lldragdropwin32.cpp
lldxhardware.cpp
llkeyboardwin32.cpp
lldragdropwin32.cpp
llwindowwin32.cpp
)
list(APPEND llwindow_HEADER_FILES
llwindowwin32.h
lldragdropwin32.h
lldxhardware.h
llkeyboardwin32.h
lldragdropwin32.h
llwindowwin32.h
)
list(APPEND llwindow_LINK_LIBRARIES
comdlg32 # Common Dialogs for ChooseColor
@@ -129,41 +140,16 @@ endif (SOLARIS)
set_source_files_properties(${llwindow_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
if (SERVER AND NOT WINDOWS AND NOT DARWIN)
set(server_SOURCE_FILES
llwindowmesaheadless.cpp
)
set(server_HEADER_FILES
llwindowmesaheadless.h
)
copy_server_sources(
llwindow
)
set_source_files_properties(
${server_SOURCE_FILES}
PROPERTIES
COMPILE_FLAGS "-DLL_MESA=1 -DLL_MESA_HEADLESS=1"
)
add_library (llwindowheadless
${llwindow_SOURCE_FILES}
${server_SOURCE_FILES}
)
target_link_libraries (llwindowheadless ${llwindow_LINK_LIBRARIES})
endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
if (llwindow_HEADER_FILES)
list(APPEND llwindow_SOURCE_FILES ${llwindow_HEADER_FILES})
endif (llwindow_HEADER_FILES)
list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
if (VIEWER)
add_library (llwindow
add_library (llwindow
${llwindow_SOURCE_FILES}
${viewer_SOURCE_FILES}
)
add_dependencies(llwindow prepare)
target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
endif (VIEWER)
add_dependencies(llwindow prepare)
target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})

View File

@@ -1,5 +1,7 @@
/*
* glh_extensions.h
* $LicenseInfo:firstyear=2006&license=mit$ (mit used here to satisfy validity checker)
* Copyright (C) 2006, NVIDIA
* From nVidia Corporation, downloaded 2006-12-18 from:
* http://developer.nvidia.com/attach/8196
* ("NVParse Library with Source (.zip) (2390 KB)")
@@ -8,6 +10,8 @@
* "The files bison.exe, bison.simple, and flex.exe are covered by
* the GPL. All other files in this distribution can be used however
* you want."
* $/LicenseInfo$
*/
#ifndef GLH_EXTENSIONS
@@ -109,7 +113,7 @@ static const char* EatNonWhiteSpace(const char *str)
int glh_init_extensions(const char *origReqExts)
{
// Length of requested extensions string
unsigned reqExtsLen;
//unsigned reqExtsLen;
char *reqExts;
// Ptr for individual extensions within reqExts
char *reqExt;
@@ -151,8 +155,8 @@ int glh_init_extensions(const char *origReqExts)
return TRUE;
}
reqExts = strdup(origReqExts);
reqExtsLen = (S32)strlen(reqExts);
/*
reqExtsLen = (S32)strlen(reqExts);
if (NULL == gGLHExts.mUnsupportedExts)
{
gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1);

View File

@@ -1619,24 +1619,24 @@ void check_vm_bloat()
const long long significant_vm_difference = 250 * 1024*1024;
const long long significant_rss_difference = 50 * 1024*1024;
ssize_t res;
size_t dummy;
char *ptr;
for (int i=0; i<22; ++i) // parse past the values we don't want
size_t delim_result = 0;
for (int i=0; i<22 && delim_result > -1; ++i) // parse past the values we don't want
{
ptr = NULL;
res = getdelim(&ptr, &dummy, ' ', fp);
delim_result = getdelim(&ptr, &dummy, ' ', fp);
free(ptr);
}
// 23rd space-delimited entry is vsize
ptr = NULL;
res = getdelim(&ptr, &dummy, ' ', fp);
delim_result = getdelim(&ptr, &dummy, ' ', fp);
llassert(ptr);
long long this_vm_size = atoll(ptr);
free(ptr);
// 24th space-delimited entry is RSS
ptr = NULL;
res = getdelim(&ptr, &dummy, ' ', fp);
delim_result = getdelim(&ptr, &dummy, ' ', fp);
llassert(ptr);
long long this_rss_size = getpagesize() * atoll(ptr);
free(ptr);

View File

@@ -42,10 +42,8 @@ include(GooglePerfTools)
include(StateMachine)
include(TemplateCheck)
include(UI)
include(LLKDU)
include(ViewerMiscLibs)
include(GLOD)
include(ViewerArtwork.cmake)
include(LLAppearance)
if (WINDOWS)
@@ -58,7 +56,7 @@ include_directories(
${DBUSGLIB_INCLUDE_DIRS}
${HUNSPELL_INCLUDE_DIR}
${ELFIO_INCLUDE_DIR}
${JSONCPP_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIR}
${GLOD_INCLUDE_DIRS}
${LLAUDIO_INCLUDE_DIRS}
${LLCHARACTER_INCLUDE_DIRS}
@@ -81,6 +79,7 @@ include_directories(
)
set(viewer_SOURCE_FILES
NACLantispam.cpp
aoremotectrl.cpp
ascentfloatercontactgroups.cpp
ascentkeyword.cpp
@@ -93,7 +92,6 @@ set(viewer_SOURCE_FILES
floaterlocalassetbrowse.cpp
floatervoicelicense.cpp
hbfloatergrouptitles.cpp
hgfloatertexteditor.cpp
hippofloaterxml.cpp
hippogridmanager.cpp
hippolimits.cpp
@@ -122,7 +120,6 @@ set(viewer_SOURCE_FILES
llaudiosourcevo.cpp
llavatarpropertiesprocessor.cpp
llbox.cpp
llbuildnewviewsscheduler.cpp
llcallbacklist.cpp
llcallingcard.cpp
llcapabilitylistener.cpp
@@ -259,8 +256,6 @@ set(viewer_SOURCE_FILES
llfloatertos.cpp
llfloaterurldisplay.cpp
llfloaterurlentry.cpp
llfloatervfs.cpp
llfloatervfsexplorer.cpp
llfloatervoicedevicesettings.cpp
llfloaterwater.cpp
llfloaterwindlight.cpp
@@ -293,7 +288,6 @@ set(viewer_SOURCE_FILES
llimpanel.cpp
llimview.cpp
llinventoryactions.cpp
llinventorybackup.cpp
llinventorybridge.cpp
llinventoryclipboard.cpp
llinventoryfilter.cpp
@@ -319,7 +313,6 @@ set(viewer_SOURCE_FILES
llmarketplacenotifications.cpp
llmediactrl.cpp
llmediaremotectrl.cpp
llmemoryview.cpp
llmenucommands.cpp
llmenuoptionpathfindingrebakenavmesh.cpp
llmeshrepository.cpp
@@ -348,8 +341,8 @@ set(viewer_SOURCE_FILES
llpaneldirland.cpp
llpaneldirpeople.cpp
llpaneldirplaces.cpp
llpaneldisplay.cpp
llpaneldirpopular.cpp
llpaneldisplay.cpp
llpaneleditwearable.cpp
llpanelevent.cpp
llpanelface.cpp
@@ -552,11 +545,10 @@ set(viewer_SOURCE_FILES
llworld.cpp
llworldmap.cpp
llworldmapmessage.cpp
llworldmipmap.cpp
llworldmapview.cpp
llworldmipmap.cpp
llxmlrpcresponder.cpp
m7wlinterface.cpp
NACLantispam.cpp
noise.cpp
pipeline.cpp
qtoolalign.cpp
@@ -584,6 +576,8 @@ set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
NACLantispam.h
aoremotectrl.h
ascentfloatercontactgroups.h
ascentkeyword.h
@@ -596,7 +590,6 @@ set(viewer_HEADER_FILES
floaterlocalassetbrowse.h
floatervoicelicense.h
hbfloatergrouptitles.h
hgfloatertexteditor.h
hippofloaterxml.h
hippogridmanager.h
hippolimits.h
@@ -626,7 +619,6 @@ set(viewer_HEADER_FILES
llaudiosourcevo.h
llavatarpropertiesprocessor.h
llbox.h
llbuildnewviewsscheduler.h
llcallbacklist.h
llcallingcard.h
llcapabilitylistener.h
@@ -703,9 +695,9 @@ set(viewer_HEADER_FILES
llfloaterdisplayname.h
llfloatereditui.h
llfloaterenvsettings.h
llfloaterevent.h
llfloaterexploreanimations.h
llfloaterexploresounds.h
llfloaterevent.h
llfloaterfeed.h
llfloaterfonttest.h
llfloaterfriends.h
@@ -763,8 +755,6 @@ set(viewer_HEADER_FILES
llfloatertos.h
llfloaterurldisplay.h
llfloaterurlentry.h
llfloatervfs.h
llfloatervfsexplorer.h
llfloatervoicedevicesettings.h
llfloaterwater.h
llfloaterwindlight.h
@@ -796,7 +786,6 @@ set(viewer_HEADER_FILES
llhudview.h
llimpanel.h
llimview.h
llinventorybackup.h
llinventorybridge.h
llinventoryclipboard.h
llinventoryfilter.h
@@ -823,9 +812,8 @@ set(viewer_HEADER_FILES
llmarketplacenotifications.h
llmediactrl.h
llmediaremotectrl.h
llmemoryview.h
llmenuoptionpathfindingrebakenavmesh.h
llmenucommands.h
llmenuoptionpathfindingrebakenavmesh.h
llmeshrepository.h
llmimetypes.h
llmorphview.h
@@ -1063,12 +1051,11 @@ set(viewer_HEADER_FILES
llworld.h
llworldmap.h
llworldmapmessage.h
llworldmipmap.h
llworldmapview.h
llworldmipmap.h
llxmlrpcresponder.h
m7wlinterface.h
macmain.h
NACLantispam.h
noise.h
pipeline.h
qtoolalign.h
@@ -1088,9 +1075,9 @@ set(viewer_HEADER_FILES
shcommandhandler.h
shfloatermediaticker.h
slfloatermediafilter.h
wlfPanel_AdvSettings.h
VertexCache.h
VorbisFramework.h
wlfPanel_AdvSettings.h
)
source_group("CMake Rules" FILES ViewerInstall.cmake)
@@ -1176,66 +1163,53 @@ if (WINDOWS)
# viewerRes.rc is the only buildable file, but
# the rest are all dependencies of it.
set(viewer_RESOURCE_FILES
${ARTWORK_DIR}/res/arrow.cur
${ARTWORK_DIR}/res/arrowcop.cur
${ARTWORK_DIR}/res/arrowcopmulti.cur
${ARTWORK_DIR}/res/arrowdrag.cur
${ARTWORK_DIR}/res/circleandline.cur
${ARTWORK_DIR}/res/icon1.ico
${ARTWORK_DIR}/res/llarrow.cur
${ARTWORK_DIR}/res/llarrowdrag.cur
${ARTWORK_DIR}/res/llarrowdragmulti.cur
${ARTWORK_DIR}/res/llarrowlocked.cur
${ARTWORK_DIR}/res/llgrablocked.cur
${ARTWORK_DIR}/res/llno.cur
${ARTWORK_DIR}/res/llnolocked.cur
${ARTWORK_DIR}/res/lltoolcamera.cur
${ARTWORK_DIR}/res/lltoolcreate.cur
${ARTWORK_DIR}/res/lltoolfocus.cur
${ARTWORK_DIR}/res/lltoolgrab.cur
${ARTWORK_DIR}/res/lltoolland.cur
${ARTWORK_DIR}/res/lltoolpan.cur
${ARTWORK_DIR}/res/lltoolpipette.cur
${ARTWORK_DIR}/res/lltoolrotate.cur
${ARTWORK_DIR}/res/lltoolscale.cur
${ARTWORK_DIR}/res/lltooltranslate.cur
${ARTWORK_DIR}/res/lltoolzoomin.cur
${ARTWORK_DIR}/res/lltoolzoomout.cur
${ARTWORK_DIR}/res/snowglobe_icon.BMP
${ARTWORK_DIR}/res/snowglobe_icon.ico
${ARTWORK_DIR}/res/resource.h
${ARTWORK_DIR}/res/toolpickobject.cur
${ARTWORK_DIR}/res/toolpickobject2.cur
${ARTWORK_DIR}/res/toolpickobject3.cur
${ARTWORK_DIR}/res/toolpipette.cur
${ARTWORK_DIR}/res/toolbuy.cur
${ARTWORK_DIR}/res/toolopen.cur
${ARTWORK_DIR}/res/toolpay.cur
${ARTWORK_DIR}/res/toolsit.cur
res/arrow.cur
res/arrowcop.cur
res/arrowcopmulti.cur
res/arrowdrag.cur
res/circleandline.cur
res/icon1.ico
res/llarrow.cur
res/llarrowdrag.cur
res/llarrowdragmulti.cur
res/llarrowlocked.cur
res/llgrablocked.cur
res/llno.cur
res/llnolocked.cur
res/lltoolcamera.cur
res/lltoolcreate.cur
res/lltoolfocus.cur
res/lltoolgrab.cur
res/lltoolland.cur
res/lltoolpan.cur
res/lltoolpipette.cur
res/lltoolrotate.cur
res/lltoolscale.cur
res/lltooltranslate.cur
res/lltoolzoomin.cur
res/lltoolzoomout.cur
res/snowglobe_icon.BMP
res/snowglobe_icon.ico
res/resource.h
res/toolpickobject.cur
res/toolpickobject2.cur
res/toolpickobject3.cur
res/toolpipette.cur
res/toolbuy.cur
res/toolopen.cur
res/toolpay.cur
res/toolsit.cur
)
set_source_files_properties(${viewer_RESOURCE_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
if(NOT ARTWORK_IN_SOURCE)
# The resource compiler needs to find resources here.
include_directories(${ARTWORK_DIR}/res)
endif(NOT ARTWORK_IN_SOURCE)
set(viewer_RESOURCE_FILES
res/resource.h
res/viewerRes.rc
${viewer_RESOURCE_FILES}
)
if (MSVC71 OR MSVC80 AND NOT VISTA_ICON)
set(viewer_RESOURCE_FILES
res/resource.h
res/viewerRes_bc.rc
${viewer_RESOURCE_FILES}
)
else (MSVC71 OR MSVC80 AND NOT VISTA_ICON)
set(viewer_RESOURCE_FILES
res/resource.h
res/viewerRes.rc
${viewer_RESOURCE_FILES}
)
endif (MSVC71 OR MSVC80 AND NOT VISTA_ICON)
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
@@ -1341,22 +1315,20 @@ set_source_files_properties(${viewer_APPSETTINGS_FILES}
list(APPEND viewer_SOURCE_FILES ${viewer_APPSETTINGS_FILES})
if(ARTWORK_EXISTS)
set(viewer_CHARACTER_FILES
${ARTWORK_DIR}/character/attentions.xml
${ARTWORK_DIR}/character/attentionsN.xml
${ARTWORK_DIR}/character/avatar_lad.xml
${ARTWORK_DIR}/character/avatar_skeleton.xml
${ARTWORK_DIR}/character/genepool.xml
set(viewer_CHARACTER_FILES
character/attentions.xml
character/attentionsN.xml
character/avatar_lad.xml
character/avatar_skeleton.xml
character/genepool.xml
)
source_group("Character File" FILES ${viewer_CHARACTER_FILES})
source_group("Character File" FILES ${viewer_CHARACTER_FILES})
set_source_files_properties(${viewer_CHARACTER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties(${viewer_CHARACTER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
endif(ARTWORK_EXISTS)
list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
if (WINDOWS)
file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi)
@@ -1422,10 +1394,6 @@ if (!DISABLE_TEMPLATE_CHECK)
check_message_template(${VIEWER_BINARY_NAME})
endif (!DISABLE_TEMPLATE_CHECK)
if (LLKDU_LIBRARY)
add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
endif (LLKDU_LIBRARY)
# We package by default on Linux so we can run from newview/packaged.
if (LINUX)
set(PACKAGE_DEFAULT ON)

View File

@@ -1,62 +0,0 @@
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
# Hide the ARTWORK_REQUIRED cache option by default.
set(doc "Require artwork?")
if(DEFINED ARTWORK_REQUIRED)
set(ARTWORK_REQUIRED "${ARTWORK_REQUIRED}" CACHE INTERNAL "${doc}")
endif(DEFINED ARTWORK_REQUIRED)
# Check if artwork is available.
if(EXISTS "${ARTWORK_DIR}/res/arrow.cur")
set(ARTWORK_EXISTS 1)
else(EXISTS "${ARTWORK_DIR}/res/arrow.cur")
set(ARTWORK_EXISTS 0)
if(PACKAGE)
set(ARTWORK_REQUIRED 1)
set(_ARTWORK_MESSAGE "Artwork is required to build a PACKAGE.")
elseif(WINDOWS)
set(ARTWORK_REQUIRED 1)
set(_ARTWORK_MESSAGE "Artwork is required to build on Windows.")
else()
option(ARTWORK_REQUIRED "${doc}" ON)
set(_ARTWORK_MESSAGE "Alternatively, disable ARTWORK_REQUIRED.")
# Show the option.
set(ARTWORK_REQUIRED "${ARTWORK_REQUIRED}" CACHE BOOL "${doc}" FORCE)
endif()
endif(EXISTS "${ARTWORK_DIR}/res/arrow.cur")
# Verify artwork setting.
if(NOT ARTWORK_EXISTS AND ARTWORK_REQUIRED)
# Try to report the artwork asset URL.
set(asset_urls_file "${CMAKE_SOURCE_DIR}/../doc/asset_urls.txt")
if(EXISTS "${asset_urls_file}")
file(STRINGS "${asset_urls_file}" art_line REGEX "SLASSET_ART=")
string(REPLACE "SLASSET_ART=" "" SLASSET_ART "${art_line}")
endif(EXISTS "${asset_urls_file}")
if(NOT SLASSET_ART)
set(SLASSET_ART "http://wiki.secondlife.com/wiki/Source_downloads")
endif(NOT SLASSET_ART)
# Report missing artwork.
message(FATAL_ERROR
"The artwork directory\n"
" ARTWORK_DIR = ${ARTWORK_DIR}\n"
"does not appear to contain the viewer artwork. "
"Download artwork files from\n"
" ${SLASSET_ART}\n"
"and extract the zip file. "
"Then set the ARTWORK_DIR cache entry to point at "
"linden/indra/newview within the extracted directory. "
"See the wiki for further help:\n"
" http://wiki.secondlife.com/wiki/Get_source_and_compile\n"
"${_ARTWORK_MESSAGE}"
)
endif(NOT ARTWORK_EXISTS AND ARTWORK_REQUIRED)
# Check if the artwork is in the source tree.
if(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem")
set(ARTWORK_IN_SOURCE 1)
else(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem")
set(ARTWORK_IN_SOURCE 0)
endif(EXISTS "${ARTWORK_DIR}/app_settings/CA.pem")

0
indra/newview/app_settings/default_grids.xml Executable file → Normal file
View File

View File

@@ -244,7 +244,6 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
{
if (i >> z)
{
LLVector3 agentPos = gAgent.getPositionAgent();
LLViewerRegion* agentRegionp = gAgent.getRegion();
if(agentRegionp)
{

Binary file not shown.

View File

@@ -1,399 +0,0 @@
/**
* @file hgfloatertexteditor.cpp
* @brief Asset Text Editor floater made by Hazim Gazov (based on hex editor floater by Day Oh)
* @author Hazim Gazov
*
* $LicenseInfo:firstyear=2010&license=WTFPLV2$
*
*/
// <edit>
#include "llviewerprecompiledheaders.h"
#include "hgfloatertexteditor.h"
#include "lluictrlfactory.h"
#include "llinventorybackup.h" // for downloading
#include "llviewercontrol.h" // gSavedSettings
#include "llviewerwindow.h" // alertXML
#include "llagent.h" // gAgent getID
#include "llviewermenufile.h"
#include "llviewerregion.h" // getCapability
#include "llassetuploadresponders.h" // LLUpdateAgentInventoryResponder
#include "llinventorymodel.h" // gInventory.updateItem
#include "llappviewer.h" // System Folders
#include "llfloaterperms.h" //get default perms
#include "lllocalinventory.h"
#include "llnotificationsutil.h"
std::list<HGFloaterTextEditor*> HGFloaterTextEditor::sInstances;
S32 HGFloaterTextEditor::sUploadAmount = 10;
HGFloaterTextEditor::HGFloaterTextEditor(LLInventoryItem* item)
: LLFloater()
{
sInstances.push_back(this);
mItem = item;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_asset_text_editor.xml");
}
// static
void HGFloaterTextEditor::show(LLUUID item_id)
{
LLInventoryItem* item = (LLInventoryItem*)gInventory.getItem(item_id);
if(item)
{
S32 left, top;
gFloaterView->getNewFloaterPosition(&left, &top);
LLRect rect = gSavedSettings.getRect("FloaterAssetTextEditorRect");
rect.translate(left - rect.mLeft, top - rect.mTop);
HGFloaterTextEditor* floaterp = new HGFloaterTextEditor(item);
floaterp->setRect(rect);
gFloaterView->adjustToFitScreen(floaterp, FALSE);
}
}
HGFloaterTextEditor::~HGFloaterTextEditor()
{
sInstances.remove(this);
}
void HGFloaterTextEditor::close(bool app_quitting)
{
LLFloater::close(app_quitting);
}
BOOL HGFloaterTextEditor::postBuild(void)
{
LLTextEditor* editor = getChild<LLTextEditor>("text_editor");
mEditor = editor;
childSetEnabled("upload_btn", false);
childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload"));
childSetAction("upload_btn", onClickUpload, this);
childSetEnabled("save_btn", false);
childSetAction("save_btn", onClickSave, this);
if(mItem)
{
std::string title = "Text editor: " + mItem->getName();
const char* asset_type_name = LLAssetType::lookup(mItem->getType());
if(asset_type_name)
{
title.append(" (" + std::string(asset_type_name) + ")");
}
setTitle(title);
}
#if OPENSIM_RULES!=1
if(mItem->getCreatorUUID() == gAgentID)
{
#endif /* OPENSIM_RULES!=1 */
// Load the asset
editor->setVisible(FALSE);
childSetText("status_text", std::string("Loading..."));
LLInventoryBackup::download(mItem, this, imageCallback, assetCallback);
#if OPENSIM_RULES!=1
} else {
this->close(false);
}
#endif /* OPENSIM_RULES!=1 */
return TRUE;
}
// static
void HGFloaterTextEditor::imageCallback(BOOL success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
BOOL final,
void* userdata)
{
if(final)
{
LLInventoryBackup::callbackdata* data = static_cast<LLInventoryBackup::callbackdata*>(userdata);
HGFloaterTextEditor* floater = (HGFloaterTextEditor*)(data->floater);
if(!floater) return;
if(std::find(sInstances.begin(), sInstances.end(), floater) == sInstances.end()) return; // no more crash
//LLInventoryItem* item = data->item;
if(!success)
{
floater->childSetText("status_text", std::string("Unable to download asset."));
return;
}
U8* src_data = src->getData();
S32 size = src->getDataSize();
std::string new_data;
for(S32 i = 0; i < size; i++)
new_data += (char)src_data[i];
delete[] src_data;
floater->mEditor->setValue(new_data);
floater->mEditor->setVisible(TRUE);
floater->childSetText("status_text", std::string("Note: Image data shown isn't the actual asset data, yet"));
floater->childSetEnabled("save_btn", false);
floater->childSetEnabled("upload_btn", true);
floater->childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload (L$10)"));
}
else
{
src_vi->setBoostLevel(LLGLTexture::BOOST_UI);
}
}
// static
void HGFloaterTextEditor::assetCallback(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
LLInventoryBackup::callbackdata* data = static_cast<LLInventoryBackup::callbackdata*>(user_data);
HGFloaterTextEditor* floater = (HGFloaterTextEditor*)(data->floater);
if(!floater) return;
if(std::find(sInstances.begin(), sInstances.end(), floater) == sInstances.end()) return; // no more crash
LLInventoryItem* item = data->item;
if(status != 0 && item->getType() != LLAssetType::AT_NOTECARD)
{
floater->childSetText("status_text", std::string("Unable to download asset."));
return;
}
// Todo: this doesn't work for static vfs shit
LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
S32 size = file.getSize();
std::string new_data("");
if(size > 0)
{
char* buffer = new char[size + 1];
if (buffer == NULL)
{
llerrs << "Memory Allocation Failed" << llendl;
return;
}
file.read((U8*)buffer, size);
buffer[size - 1] = 0;
new_data = std::string(buffer);
delete[] buffer;
}
floater->mEditor->setText(LLStringExplicit(new_data));
floater->mEditor->setVisible(TRUE);
floater->childSetText("status_text", llformat("File Size: %d", size));
floater->childSetEnabled("upload_btn", true);
floater->childSetEnabled("save_btn", false);
if(item->getPermissions().allowModifyBy(gAgent.getID()))
{
switch(item->getType())
{
case LLAssetType::AT_TEXTURE:
case LLAssetType::AT_ANIMATION:
case LLAssetType::AT_SOUND:
floater->childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload (L$10)"));
break;
case LLAssetType::AT_LANDMARK:
case LLAssetType::AT_CALLINGCARD:
floater->childSetEnabled("upload_btn", false);
floater->childSetEnabled("save_btn", false);
break;
default:
floater->childSetEnabled("save_btn", true);
break;
}
}
else
{
switch(item->getType())
{
case LLAssetType::AT_TEXTURE:
case LLAssetType::AT_ANIMATION:
case LLAssetType::AT_SOUND:
floater->childSetLabelArg("upload_btn", "[UPLOAD]", std::string("Upload (L$10)"));
break;
default:
break;
}
}
// Never enable save if it's a pretend item
if(gInventory.isObjectDescendentOf(item->getUUID(), gSystemFolderRoot))
{
floater->childSetEnabled("save_btn", false);
}
}
// static
void HGFloaterTextEditor::onClickUpload(void* user_data)
{
HGFloaterTextEditor* floater = (HGFloaterTextEditor*)user_data;
LLInventoryItem* item = floater->mItem;
LLTransactionID transaction_id;
transaction_id.generate();
LLUUID fake_asset_id = transaction_id.makeAssetID(gAgent.getSecureSessionID());
const char* value = floater->mEditor->getText().c_str();
int size = strlen(value);
U8* buffer = new U8[size];
for(int i = 0; i < size; i++)
buffer[i] = (U8)value[i];
delete[] value;
LLVFile file(gVFS, fake_asset_id, item->getType(), LLVFile::APPEND);
file.setMaxSize(size);
if (!file.write(buffer, size))
{
LLSD args;
args["ERROR_MESSAGE"] = "Couldn't write data to file";
LLNotificationsUtil::add("ErrorMessage", args);
return;
}
LLAssetStorage::LLStoreAssetCallback callback = NULL;
void *fake_user_data = NULL;
if(item->getType() != LLAssetType::AT_GESTURE && item->getType() != LLAssetType::AT_LSL_TEXT
&& item->getType() != LLAssetType::AT_NOTECARD)
{
upload_new_resource(transaction_id,
item->getType(),
item->getName(),
item->getDescription(),
0,
LLFolderType::assetTypeToFolderType(item->getType()),
item->getInventoryType(),
LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(),
item->getName(),
callback,
sUploadAmount,
fake_user_data);
}
else // gestures and scripts, create an item first
{ // AND notecards
//if(item->getType() == LLAssetType::AT_NOTECARD) gDontOpenNextNotecard = true;
create_inventory_item( gAgent.getID(),
gAgent.getSessionID(),
item->getParentUUID(), //gInventory.findCategoryUUIDForType(item->getType()),
LLTransactionID::tnull,
item->getName(),
fake_asset_id.asString(),
item->getType(),
item->getInventoryType(),
(LLWearableType::EType)item->getFlags(),
PERM_ITEM_UNRESTRICTED,
new NewResourceItemCallback);
}
}
struct LLSaveInfo
{
LLSaveInfo(HGFloaterTextEditor* floater, LLTransactionID transaction_id)
: mFloater(floater), mTransactionID(transaction_id)
{
}
HGFloaterTextEditor* mFloater;
LLTransactionID mTransactionID;
};
// static
void HGFloaterTextEditor::onClickSave(void* user_data)
{
HGFloaterTextEditor* floater = (HGFloaterTextEditor*)user_data;
LLInventoryItem* item = floater->mItem;
LLTransactionID transaction_id;
transaction_id.generate();
LLUUID fake_asset_id = transaction_id.makeAssetID(gAgent.getSecureSessionID());
const char* value = floater->mEditor->getText().c_str();
int size = strlen(value);
U8* buffer = new U8[size];
for(int i = 0; i < size; i++)
buffer[i] = (U8)value[i];
LLVFile file(gVFS, fake_asset_id, item->getType(), LLVFile::APPEND);
file.setMaxSize(size);
if (!file.write(buffer, size))
{
LLSD args;
args["ERROR_MESSAGE"] = "Couldn't write data to file";
LLNotificationsUtil::add("ErrorMessage", args);
return;
}
bool caps = false;
std::string url;
LLSD body;
body["item_id"] = item->getUUID();
switch(item->getType())
{
case LLAssetType::AT_GESTURE:
url = gAgent.getRegion()->getCapability("UpdateGestureAgentInventory");
caps = true;
break;
case LLAssetType::AT_LSL_TEXT:
url = gAgent.getRegion()->getCapability("UpdateScriptAgent");
body["target"] = "mono";
caps = true;
break;
case LLAssetType::AT_NOTECARD:
url = gAgent.getRegion()->getCapability("UpdateNotecardAgentInventory");
caps = true;
break;
default: // wearables & notecards, Oct 12 2009
// ONLY WEARABLES, Oct 15 2009
floater->childSetText("status_text", std::string("Saving..."));
LLSaveInfo* info = new LLSaveInfo(floater, transaction_id);
gAssetStorage->storeAssetData(transaction_id, item->getType(), onSaveComplete, info);
caps = false;
break;
}
if(caps)
{
LLHTTPClient::post(url, body,
new LLUpdateAgentInventoryResponder(body, fake_asset_id, item->getType()));
}
}
void HGFloaterTextEditor::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status)
{
LLSaveInfo* info = (LLSaveInfo*)user_data;
HGFloaterTextEditor* floater = info->mFloater;
if(std::find(sInstances.begin(), sInstances.end(), floater) == sInstances.end()) return; // no more crash
LLInventoryItem* item = floater->mItem;
floater->childSetText("status_text", std::string(""));
if(item && (status == 0))
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setDescription(item->getDescription());
new_item->setTransactionID(info->mTransactionID);
new_item->setAssetUUID(asset_uuid);
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
}
else
{
LLSD args;
args["ERROR_MESSAGE"] = llformat("Upload failed with status %d, also %d", status, ext_status);
LLNotificationsUtil::add("ErrorMessage", args);
}
}
// </edit>

View File

@@ -1,50 +0,0 @@
/**
* @file hgfloatertexteditor.h
* @brief Asset Text Editor floater made by Hazim Gazov (based on hex editor floater by Day Oh)
* @author Hazim Gazov
*
* $LicenseInfo:firstyear=2010&license=WTFPLV2$
*
*/
#ifndef HG_HGFLOATERTEXT_H
#define HG_HGFLOATERTEXT_H
#include "llfloater.h"
#include "lltexteditor.h"
#include "llinventory.h"
#include "llviewertexture.h"
class HGFloaterTextEditor
: public LLFloater
{
public:
HGFloaterTextEditor(LLInventoryItem* item);
static void show(LLUUID item_id);
BOOL postBuild(void);
void close(bool app_quitting);
static void imageCallback(BOOL success,
LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
BOOL final,
void* userdata);
static void assetCallback(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status);
static void onClickSave(void* user_data);
static void onClickUpload(void* user_data);
static void onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status);
LLInventoryItem* mItem;
LLTextEditor* mEditor;
static std::list<HGFloaterTextEditor*> sInstances;
private:
virtual ~HGFloaterTextEditor();
protected:
static S32 sUploadAmount;
};
#endif

View File

@@ -3964,7 +3964,7 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
//to cause appearance of the agent to be updated
bool result = false;
if (result = gAgentWearables.moveWearable(item, closer_to_body))
if ((result = gAgentWearables.moveWearable(item, closer_to_body)))
{
gAgentAvatarp->wearableUpdated(item->getWearableType(), FALSE);
}

View File

@@ -80,7 +80,7 @@
#include "llfirstuse.h"
#include "llrender.h"
#include "llvector4a.h"
#include "llfont.h"
#include "llfontfreetype.h"
#include "llvocache.h"
#include "llvopartgroup.h"
#include "llfloaterteleporthistory.h"
@@ -117,8 +117,6 @@
#include "llimageworker.h"
// <edit>
#include "lldelayeduidelete.h"
#include "llbuildnewviewsscheduler.h"
#include "aicurleasyrequeststatemachine.h"
#include "aihttptimeoutpolicy.h"
// </edit>
@@ -641,9 +639,6 @@ bool LLAppViewer::init()
// Logging is initialized. Now it's safe to start the error thread.
startErrorThread();
gDeleteScheduler = new LLDeleteScheduler();
gBuildNewViewsScheduler = new LLBuildNewViewsScheduler();
// </edit>
//
// OK to write stuff to logs now, we've now crash reported if necessary
//
@@ -808,7 +803,7 @@ bool LLAppViewer::init()
// Modify settings based on system configuration and compile options
settings_modify();
// Work around for a crash bug when changing OpenGL settings
LLFont::sOpenGLcrashOnRestart = (getenv("LL_OPENGL_RESTART_CRASH_BUG") != NULL);
LLFontFreetype::sOpenGLcrashOnRestart = (getenv("LL_OPENGL_RESTART_CRASH_BUG") != NULL);
// Find partition serial number (Windows) or hardware serial (Mac)
mSerialNumber = generateSerialNumber();
@@ -1096,7 +1091,6 @@ static LLFastTimer::DeclareTimer FTM_STATEMACHINE("State Machine");
bool LLAppViewer::mainLoop()
{
LLMemType mt1(LLMemType::MTYPE_MAIN);
mMainloopTimeout = new LLWatchdogTimeout();
// *FIX:Mani - Make this a setting, once new settings exist in this branch.
@@ -1216,7 +1210,6 @@ bool LLAppViewer::mainLoop()
&& !gViewerWindow->getShowProgress()
&& !gFocusMgr.focusLocked())
{
LLMemType mjk(LLMemType::MTYPE_JOY_KEY);
joystick->scanJoystick();
gKeyboard->scanKeyboard();
if(isCrouch)
@@ -1236,7 +1229,6 @@ bool LLAppViewer::mainLoop()
if (gAres != NULL && gAres->isInitialized())
{
LLMemType mt_ip(LLMemType::MTYPE_IDLE_PUMP);
pingMainloopTimeout("Main:ServicePump");
LLFastTimer t4(FTM_PUMP);
{
@@ -1285,7 +1277,6 @@ bool LLAppViewer::mainLoop()
// Sleep and run background threads
{
LLMemType mt_sleep(LLMemType::MTYPE_SLEEP);
LLFastTimer t2(FTM_SLEEP);
static const LLCachedControl<bool> run_multiple_threads("RunMultipleThreads",false);
static const LLCachedControl<S32> yield_time("YieldTime", -1);
@@ -3823,7 +3814,6 @@ static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
///////////////////////////////////////////////////////
void LLAppViewer::idle()
{
LLMemType mt_idle(LLMemType::MTYPE_IDLE);
pingMainloopTimeout("Main:Idle");
// Update frame timers
@@ -4446,7 +4436,6 @@ static LLFastTimer::DeclareTimer FTM_DYNAMIC_THROTTLE("Dynamic Throttle");
static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit");
void LLAppViewer::idleNetwork()
{
LLMemType mt_in(LLMemType::MTYPE_IDLE_NETWORK);
pingMainloopTimeout("idleNetwork");
gObjectList.mNumNewObjects = 0;

View File

@@ -37,7 +37,6 @@
#include "llcommandlineparser.h"
#include "lldiriterator.h"
#include "llmemtype.h"
#include "llurldispatcher.h" // SLURL from other app instance
#include "llviewernetwork.h"
#include "llviewercontrol.h"
@@ -102,8 +101,6 @@ int main( int argc, char **argv )
Debug(debug::init());
Debug(libcw_do.on());
LLMemType mt1(LLMemType::MTYPE_STARTUP);
#if LL_SOLARIS && defined(__sparc)
asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
#endif

View File

@@ -39,8 +39,6 @@
#include "llappviewermacosx.h"
#include "llcommandlineparser.h"
#include "llmemtype.h"
#include "lldiriterator.h"
#include "llviewernetwork.h"
#include "llviewercontrol.h"
@@ -74,8 +72,6 @@ namespace
int main( int argc, char **argv )
{
LLMemType mt1(LLMemType::MTYPE_STARTUP);
#if LL_SOLARIS && defined(__sparc)
asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC
#endif

View File

@@ -40,8 +40,6 @@
#include "llappviewerwin32.h"
#include "llmemtype.h"
#include "llwindowwin32.cpp" // *FIX: for setting gIconResource.
#include "res/resource.h" // *FIX: for setting gIconResource.
@@ -159,8 +157,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
LLMemType mt1(LLMemType::MTYPE_STARTUP);
const S32 MAX_HEAPS = 255;
DWORD heap_enable_lfh_error[MAX_HEAPS];
S32 num_heaps = 0;

View File

@@ -1,151 +0,0 @@
// <edit>
#include "llviewerprecompiledheaders.h"
#include "llbuildnewviewsscheduler.h"
#include "llinventorybridge.h"
#define BUILD_DELAY 0.1f
#define BUILD_PER_DELAY 512
LLBuildNewViewsScheduler* gBuildNewViewsScheduler;
std::list<LLBuildNewViewsScheduler::job> LLBuildNewViewsScheduler::sJobs;
LLBuildNewViewsScheduler::LLBuildNewViewsScheduler() : LLEventTimer(BUILD_DELAY)
{
}
void LLBuildNewViewsScheduler::addJob(LLInventoryPanel* inventory_panel, LLInventoryObject* inventory_object)
{
LLBuildNewViewsScheduler::job j;
j.mInventoryPanel = inventory_panel;
j.mInventoryObject = inventory_object;
sJobs.push_back(j);
}
void LLBuildNewViewsScheduler::cancel(LLInventoryPanel* inventory_panel)
{
for(std::list<LLBuildNewViewsScheduler::job>::iterator iter = sJobs.begin();
iter != sJobs.end(); )
{
LLInventoryPanel* job_panel = (*iter).mInventoryPanel;
if(job_panel == inventory_panel)
{
iter = sJobs.erase(iter);
}
else
{
++iter;
}
}
}
BOOL LLBuildNewViewsScheduler::tick()
{
U32 i = 0;
while(!sJobs.empty() && (i < BUILD_PER_DELAY))
{
LLBuildNewViewsScheduler::job j = sJobs.front();
buildNewViews(j.mInventoryPanel, j.mInventoryObject);
sJobs.pop_front();
++i;
}
return FALSE;
}
void LLBuildNewViewsScheduler::buildNewViews(LLInventoryPanel* panelp, LLInventoryObject* objectp)
{
LLFolderViewItem* itemp = NULL;
if (objectp)
{
if (objectp->getType() <= LLAssetType::AT_NONE ||
objectp->getType() >= LLAssetType::AT_COUNT)
{
llwarns << "called with objectp->mType == "
<< ((S32) objectp->getType())
<< " (shouldn't happen)" << llendl;
}
else if (objectp->getType() == LLAssetType::AT_CATEGORY) // build new view for category
{
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
objectp->getType(),
LLInventoryType::IT_CATEGORY,
panelp,
panelp->getRootFolder(),
objectp->getUUID());
if (new_listener)
{
LLFolderViewFolder* folderp = new LLFolderViewFolder(new_listener->getDisplayName(),
new_listener->getIcon(),
new_listener->getIcon(),
NULL,
panelp->getRootFolder(),
new_listener);
folderp->setItemSortOrder(panelp->getSortOrder());
itemp = folderp;
}
}
else // build new view for item
{
LLInventoryItem* item = (LLInventoryItem*)objectp;
LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(
item->getType(),
item->getActualType(),
item->getInventoryType(),
panelp,
panelp->getRootFolder(),
item->getUUID(),
item->getFlags());
if (new_listener)
{
itemp = new LLFolderViewItem(new_listener->getDisplayName(),
new_listener->getIcon(),
NULL,
NULL,
new_listener->getCreationDate(),
panelp->getRootFolder(),
new_listener);
}
}
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)panelp->getRootFolder()->getItemByID(objectp->getParentUUID());
if (itemp)
{
//itemp->mDelayedDelete = TRUE;
if (parent_folder)
{
itemp->addToFolder(parent_folder, panelp->getRootFolder());
}
else
{
llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
delete itemp;
}
}
}
if (!objectp || (objectp && (objectp->getType() == LLAssetType::AT_CATEGORY)))
{
LLViewerInventoryCategory::cat_array_t* categories;
LLViewerInventoryItem::item_array_t* items;
panelp->getModel()->lockDirectDescendentArrays((objectp != NULL) ? objectp->getUUID() : LLUUID::null, categories, items);
if(categories)
{
S32 count = categories->count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryCategory* cat = categories->get(i);
addJob(panelp, cat);
}
}
if(items)
{
S32 count = items->count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryItem* item = items->get(i);
addJob(panelp, item);
}
}
panelp->getModel()->unlockDirectDescendentArrays(objectp->getUUID());
}
}
// </edit>

View File

@@ -1,22 +0,0 @@
// <edit>
#include "llinventorypanel.h"
#include "llinventory.h"
#include "lleventtimer.h"
class LLBuildNewViewsScheduler : public LLEventTimer
{
typedef struct
{
LLInventoryPanel* mInventoryPanel;
LLInventoryObject* mInventoryObject;
} job;
public:
LLBuildNewViewsScheduler();
void addJob(LLInventoryPanel* inventory_panel, LLInventoryObject* inventory_object);
void cancel(LLInventoryPanel* inventory_panel);
BOOL tick();
private:
static std::list<job> sJobs;
void buildNewViews(LLInventoryPanel* panelp, LLInventoryObject* objectp);
};
extern LLBuildNewViewsScheduler* gBuildNewViewsScheduler;
// </edit>

View File

@@ -426,8 +426,6 @@ void LLChatBar::sendChat( EChatType type )
{
if (gSavedSettings.getBOOL("AscentAutoCloseOOC") && (utf8text.length() > 1))
{
// Chalice - OOC autoclosing patch based on code by Henri Beauchamp
int needsClosingType=0;
//Check if it needs the end-of-chat brackets -HgB
if (utf8text.find("((") == 0 && utf8text.find("))") == -1)
{
@@ -441,8 +439,7 @@ void LLChatBar::sendChat( EChatType type )
utf8text+=" ";
utf8text+="]]";
}
//Check if it needs the start-of-chat brackets -HgB
needsClosingType=0;
if (utf8text.find("((") == -1 && utf8text.find("))") == (utf8text.length() - 2))
{
if(utf8text.at(0) == '(')

View File

@@ -37,7 +37,6 @@
// library includes
#include "llframestatview.h"
#include "llfasttimerview.h"
#include "llmemoryview.h"
#include "llconsole.h"
#include "lltextureview.h"
#include "llresmgr.h"
@@ -84,13 +83,6 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
mFastTimerView->setVisible(FALSE); // start invisible
addChild(mFastTimerView);
r.set(25, rect.getHeight() - 50, rect.getWidth()/2, rect.getHeight() - 450);
mMemoryView = new LLMemoryView("memory", r);
mMemoryView->setFollowsTop();
mMemoryView->setFollowsLeft();
mMemoryView->setVisible(FALSE); // start invisible
addChild(mMemoryView);
r.set(150, rect.getHeight() - 50, 870, 100);
gTextureView = new LLTextureView("gTextureView", r);
gTextureView->setRect(r);

View File

@@ -762,8 +762,6 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
void LLDrawable::updateTexture()
{
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
if (isDead())
{
llwarns << "Dead drawable updating texture!" << llendl;

View File

@@ -44,7 +44,6 @@
#include "llvector4a.h"
#include "llquaternion.h"
#include "xform.h"
#include "llmemtype.h"
#include "lldarray.h"
#include "llviewerobject.h"
#include "llrect.h"

View File

@@ -265,8 +265,6 @@ void LLFace::setPool(LLFacePool* pool)
void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
{
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
if (!new_pool)
{
llerrs << "Setting pool to null!" << llendl;
@@ -442,8 +440,6 @@ U16 LLFace::getGeometryAvatar(
LLStrider<F32> &vertex_weights,
LLStrider<LLVector4> &clothing_weights)
{
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
if (mVertexBuffer.notNull())
{
mVertexBuffer->getVertexStrider (vertices, mGeomIndex, mGeomCount);
@@ -459,8 +455,6 @@ U16 LLFace::getGeometryAvatar(
U16 LLFace::getGeometry(LLStrider<LLVector3> &vertices, LLStrider<LLVector3> &normals,
LLStrider<LLVector2> &tex_coords, LLStrider<U16> &indicesp)
{
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
if (mVertexBuffer.notNull())
{
mVertexBuffer->getVertexStrider(vertices, mGeomIndex, mGeomCount);
@@ -776,8 +770,6 @@ bool less_than_max_mag(const LLVector4a& vec)
BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
const LLMatrix4& mat_vert_in, const LLMatrix3& mat_normal_in, BOOL global_volume)
{
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED))
{

View File

@@ -420,7 +420,7 @@ void LLFastTimerView::draw()
S32 left, top, right, bottom;
S32 x, y, barw, barh, dx, dy;
S32 texth, textw;
S32 texth;
LLPointer<LLUIImage> box_imagep = LLUI::getUIImage("rounded_square.tga");
// Draw the window background
@@ -461,7 +461,6 @@ void LLFastTimerView::draw()
tdesc = llformat("Full bar = %s [Click to pause/reset] [SHIFT-Click to toggle]",modedesc[mDisplayMode]);
LLFontGL::getFontMonospace()->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
textw = LLFontGL::getFontMonospace()->getWidth(tdesc);
x = xleft, y -= (texth + 2);
tdesc = llformat("Justification = %s [CTRL-Click to toggle]",centerdesc[mDisplayCenter]);
@@ -600,8 +599,6 @@ void LLFastTimerView::draw()
y -= (texth + 2);
textw = dx + LLFontGL::getFontMonospace()->getWidth(idp->getName()) + 40;
if (idp->getCollapsed())
{
it.skipDescendants();

View File

@@ -378,8 +378,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInv
void LLFloaterBulkPermission::updateInventory(LLViewerObject* object, LLViewerInventoryItem* item, U8 key, bool is_new)
{
LLMemType mt(LLMemType::MTYPE_OBJECT);
// This slices the object into what we're concerned about on the viewer.
// The simulator will take the permissions and transfer ownership.
LLPointer<LLViewerInventoryItem> task_item =

View File

@@ -370,14 +370,12 @@ bool LLFloaterDayCycle::deleteAlertCallback(const LLSD& notification, const LLSD
"DayCyclePresetsCombo");
LLFloaterDayCycle* day_cycle = NULL;
LLComboBox* key_combo = NULL;
LLMultiSliderCtrl* mult_sldr = NULL;
if(LLFloaterDayCycle::isOpen())
{
day_cycle = LLFloaterDayCycle::instance();
key_combo = day_cycle->getChild<LLComboBox>(
"WLKeyPresets");
mult_sldr = day_cycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
}
std::string name(combo_box->getSelectedValue().asString());

Some files were not shown because too many files have changed in this diff Show More