diff --git a/.hgignore b/.hgignore
index a8a244596d..f3fca9bcb2 100755
--- a/.hgignore
+++ b/.hgignore
@@ -75,4 +75,6 @@ glob:indra/newview/filters.xml
glob:indra/newview/avatar_icons_cache.txt
glob:indra/newview/avatar_lad.log
glob:*.diff
-#*.rej
+indra/newview/pilot.txt
+indra/newview/pilot.xml
+*.rej
diff --git a/BuildParams b/BuildParams
index 31e7e841ad..3bfa6e787c 100755
--- a/BuildParams
+++ b/BuildParams
@@ -198,6 +198,14 @@ runway.build_debug_release_separately = true
runway.build_CYGWIN_Debug = false
runway.build_viewer_update_version_manager = false
+# ========================================
+# viewer-interesting
+# ========================================
+
+viewer-interesting.viewer_channel = "Project Viewer - Interesting"
+viewer-interesting.build_debug_release_separately = true
+viewer-interesting.build_CYGWIN_Debug = false
+viewer-interesting.build_viewer_update_version_manager = false
# eof
diff --git a/autobuild.xml b/autobuild.xml
index 8194b3d4eb..aa717e058b 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -498,9 +498,9 @@
archive
name
darwin
@@ -510,7 +510,7 @@
archive
@@ -764,7 +764,7 @@
hash
aff5566e04003de0383941981198e04e
url
- http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273073/arch/Darwin/installer/google_breakpad-0.0.0-rev1099-darwin-20130329.tar.bz2
+ http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273073/arch/Darwin/installer/google_breakpad-0.0.0-rev1099-darwin-20130329.tar.bz2
name
darwin
@@ -776,7 +776,7 @@
hash
52257e5eb166a0b69c9c0c38f6e1920e
url
- http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273079/arch/Linux/installer/google_breakpad-0.0.0-rev1099-linux-20130329.tar.bz2
+ http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273079/arch/Linux/installer/google_breakpad-0.0.0-rev1099-linux-20130329.tar.bz2
name
linux
@@ -788,7 +788,7 @@
hash
d812a6dfcabe6528198a3191068dac09
url
- http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273073/arch/CYGWIN/installer/google_breakpad-0.0.0-rev1099-windows-20130329.tar.bz2
+ http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-google-breakpad/rev/273073/arch/CYGWIN/installer/google_breakpad-0.0.0-rev1099-windows-20130329.tar.bz2
name
windows
@@ -1290,9 +1290,9 @@
archive
name
linux
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 87484f4ae3..1d78638143 100755
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -61,6 +61,7 @@ if (WINDOWS)
add_definitions(
/DLL_WINDOWS=1
+ /DNOMINMAX
/DDOM_DYNAMIC
/DUNICODE
/D_UNICODE
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
old mode 100644
new mode 100755
diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp
index 38aa1bbeb2..a0418f09d5 100755
--- a/indra/integration_tests/llui_libtest/llui_libtest.cpp
+++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp
@@ -182,7 +182,7 @@ void export_test_floaters()
// don't re-export other test floaters
continue;
}
- llinfos << "Converting " << filename << llendl;
+ LL_INFOS() << "Converting " << filename << LL_ENDL;
// Build a floater and output new attributes
LLXMLNodePtr output_node = new LLXMLNode();
LLFloater* floater = new LLFloater(LLSD());
@@ -194,7 +194,7 @@ void export_test_floaters()
out_filename.resize(extension_pos);
out_filename += "_new.xml";
- llinfos << "Output: " << out_filename << llendl;
+ LL_INFOS() << "Output: " << out_filename << LL_ENDL;
LLFILE* floater_file = LLFile::fopen(out_filename.c_str(), "w");
LLXMLNode::writeHeaderToFile(floater_file);
output_node->writeToFile(floater_file);
diff --git a/indra/linux_crash_logger/linux_crash_logger.cpp b/indra/linux_crash_logger/linux_crash_logger.cpp
index 99d0ad7e14..3208894e96 100755
--- a/indra/linux_crash_logger/linux_crash_logger.cpp
+++ b/indra/linux_crash_logger/linux_crash_logger.cpp
@@ -29,19 +29,19 @@
int main(int argc, char **argv)
{
- llinfos << "Starting crash reporter." << llendl;
+ LL_INFOS() << "Starting crash reporter." << LL_ENDL;
LLCrashLoggerLinux app;
app.parseCommandOptions(argc, argv);
if (! app.init())
{
- llwarns << "Unable to initialize application." << llendl;
+ LL_WARNS() << "Unable to initialize application." << LL_ENDL;
return 1;
}
app.mainLoop();
app.cleanup();
- llinfos << "Crash reporter finished normally." << llendl;
+ LL_INFOS() << "Crash reporter finished normally." << LL_ENDL;
return 0;
}
diff --git a/indra/linux_crash_logger/llcrashloggerlinux.cpp b/indra/linux_crash_logger/llcrashloggerlinux.cpp
index 62465f9937..0bc534fde0 100755
--- a/indra/linux_crash_logger/llcrashloggerlinux.cpp
+++ b/indra/linux_crash_logger/llcrashloggerlinux.cpp
@@ -71,7 +71,7 @@ static BOOL do_ask_dialog(void)
#if LL_GTK
gtk_disable_setlocale();
if (!gtk_init_check(NULL, NULL)) {
- llinfos << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << llendl;
+ LL_INFOS() << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << LL_ENDL;
return FALSE;
}
diff --git a/indra/linux_updater/linux_updater.cpp b/indra/linux_updater/linux_updater.cpp
index 86fa596aef..5c94deba02 100644
--- a/indra/linux_updater/linux_updater.cpp
+++ b/indra/linux_updater/linux_updater.cpp
@@ -28,6 +28,8 @@
#include
#include
#include
+#include
+#include
#include "linden_common.h"
#include "llerrorcontrol.h"
@@ -315,9 +317,9 @@ gpointer worker_thread_cb(gpointer data)
("secondlife-update-XXXXXX", &tmp_local_filename, &error);
if (error != NULL)
{
- llerrs << "Unable to create temporary file: "
+ LL_ERRS() << "Unable to create temporary file: "
<< error->message
- << llendl;
+ << LL_ENDL;
g_error_free(error);
throw 0;
@@ -332,9 +334,9 @@ gpointer worker_thread_cb(gpointer data)
package_file = fdopen(fd, "wb");
if (package_file == NULL)
{
- llerrs << "Failed to create temporary file: "
+ LL_ERRS() << "Failed to create temporary file: "
<< app_state->file.c_str()
- << llendl;
+ << LL_ENDL;
gdk_threads_enter();
display_error(app_state->window,
@@ -345,12 +347,12 @@ gpointer worker_thread_cb(gpointer data)
}
// initialize curl and start downloading the package
- llinfos << "Downloading package: " << app_state->url << llendl;
+ LL_INFOS() << "Downloading package: " << app_state->url << LL_ENDL;
curl = curl_easy_init();
if (curl == NULL)
{
- llerrs << "Failed to initialize libcurl" << llendl;
+ LL_ERRS() << "Failed to initialize libcurl" << LL_ENDL;
gdk_threads_enter();
display_error(app_state->window,
@@ -375,9 +377,9 @@ gpointer worker_thread_cb(gpointer data)
if (result)
{
- llerrs << "Failed to download update: "
+ LL_ERRS() << "Failed to download update: "
<< app_state->url
- << llendl;
+ << LL_ENDL;
gdk_threads_enter();
display_error(app_state->window,
@@ -403,9 +405,9 @@ gpointer worker_thread_cb(gpointer data)
// thread and show file chooser?
if (!install_package(app_state->file.c_str(), app_state->dest_dir))
{
- llwarns << "Failed to install package to destination: "
+ LL_WARNS() << "Failed to install package to destination: "
<< app_state->dest_dir
- << llendl;
+ << LL_ENDL;
gdk_threads_enter();
display_error(app_state->window,
@@ -419,9 +421,9 @@ gpointer worker_thread_cb(gpointer data)
// try to spawn the new viewer
if (!spawn_viewer(app_state))
{
- llwarns << "Viewer was not installed properly in : "
+ LL_WARNS() << "Viewer was not installed properly in : "
<< app_state->dest_dir
- << llendl;
+ << LL_ENDL;
gdk_threads_enter();
display_error(app_state->window,
@@ -481,10 +483,10 @@ int
rename_with_sudo_fallback(const std::string& filename, const std::string& newname)
{
int rtncode = ::rename(filename.c_str(), newname.c_str());
- lldebugs << "rename result is: " << rtncode << " / " << errno << llendl;
+ LL_DEBUGS() << "rename result is: " << rtncode << " / " << errno << LL_ENDL;
if (rtncode && (EACCES == errno || EPERM == errno || EXDEV == errno))
{
- llinfos << "Permission problem in rename, or moving between different mount points. Retrying as a mv under a sudo." << llendl;
+ LL_INFOS() << "Permission problem in rename, or moving between different mount points. Retrying as a mv under a sudo." << LL_ENDL;
// failed due to permissions, try again as a gksudo or kdesu mv wrapper hack
char *sudo_cmd = NULL;
sudo_cmd = g_find_program_in_path("gksudo");
@@ -515,15 +517,15 @@ rename_with_sudo_fallback(const std::string& filename, const std::string& newnam
if (!less_anal_gspawnsync(argv, &stderr_output,
&child_exit_status, &spawn_error))
{
- llwarns << "Failed to spawn child process: "
+ LL_WARNS() << "Failed to spawn child process: "
<< spawn_error->message
- << llendl;
+ << LL_ENDL;
}
else if (child_exit_status)
{
- llwarns << "mv command failed: "
+ LL_WARNS() << "mv command failed: "
<< (stderr_output ? stderr_output : "(no reason given)")
- << llendl;
+ << LL_ENDL;
}
else
{
@@ -549,19 +551,19 @@ gboolean install_package(std::string package_file, std::string destination)
tar_cmd = g_find_program_in_path("tar");
if (!tar_cmd)
{
- llerrs << "`tar' was not found in $PATH" << llendl;
+ LL_ERRS() << "`tar' was not found in $PATH" << LL_ENDL;
return FALSE;
}
- llinfos << "Found tar command: " << tar_cmd << llendl;
+ LL_INFOS() << "Found tar command: " << tar_cmd << LL_ENDL;
// Unpack the tarball in a temporary place first, then move it to
// its final destination
std::string tmp_dest_dir = gDirUtilp->getTempFilename();
if (LLFile::mkdir(tmp_dest_dir, 0744))
{
- llerrs << "Failed to create directory: "
+ LL_ERRS() << "Failed to create directory: "
<< destination
- << llendl;
+ << LL_ENDL;
return FALSE;
}
@@ -577,7 +579,7 @@ gboolean install_package(std::string package_file, std::string destination)
NULL,
};
- llinfos << "Untarring package: " << package_file << llendl;
+ LL_INFOS() << "Untarring package: " << package_file << LL_ENDL;
// store current SIGCHLD handler if there is one, replace with default
// handler to make glib happy
@@ -594,17 +596,17 @@ gboolean install_package(std::string package_file, std::string destination)
if (!less_anal_gspawnsync(argv, &stderr_output,
&child_exit_status, &untar_error))
{
- llwarns << "Failed to spawn child process: "
+ LL_WARNS() << "Failed to spawn child process: "
<< untar_error->message
- << llendl;
+ << LL_ENDL;
return FALSE;
}
if (child_exit_status)
{
- llwarns << "Untar command failed: "
+ LL_WARNS() << "Untar command failed: "
<< (stderr_output ? stderr_output : "(no reason given)")
- << llendl;
+ << LL_ENDL;
return FALSE;
}
@@ -628,9 +630,9 @@ gboolean install_package(std::string package_file, std::string destination)
if (rename_with_sudo_fallback(destination, backup_dir))
{
- llwarns << "Failed to move directory: '"
+ LL_WARNS() << "Failed to move directory: '"
<< destination << "' -> '" << backup_dir
- << llendl;
+ << LL_ENDL;
return FALSE;
}
}
@@ -639,9 +641,9 @@ gboolean install_package(std::string package_file, std::string destination)
// need to move it to its destination.
if (rename_with_sudo_fallback(tmp_dest_dir, destination))
{
- llwarns << "Failed to move installation to the destination: "
+ LL_WARNS() << "Failed to move installation to the destination: "
<< destination
- << llendl;
+ << LL_ENDL;
return FALSE;
}
@@ -736,8 +738,8 @@ BOOL spawn_viewer(UpdaterAppState *app_state)
if (!success)
{
- llwarns << "Failed to launch viewer: " << error->message
- << llendl;
+ LL_WARNS() << "Failed to launch viewer: " << error->message
+ << LL_ENDL;
}
if (error) g_error_free(error);
@@ -838,7 +840,7 @@ int main(int argc, char **argv)
// create UI
updater_app_ui_init(app_state);
- //llinfos << "SAMPLE TRANSLATION IS: " << LLTrans::getString("LoginInProgress") << llendl;
+ //LL_INFOS() << "SAMPLE TRANSLATION IS: " << LLTrans::getString("LoginInProgress") << LL_ENDL;
// create download thread
g_thread_create(GThreadFunc(worker_thread_cb), app_state, FALSE, NULL);
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 3bb759d458..4f0d0faa38 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -35,15 +35,15 @@
#include "llavatarappearance.h"
#include "llavatarappearancedefines.h"
#include "llavatarjointmesh.h"
-#include "imageids.h"
+#include "llstl.h"
#include "lldir.h"
-#include "lldeleteutils.h"
#include "llpolymorph.h"
#include "llpolymesh.h"
#include "llpolyskeletaldistortion.h"
#include "llstl.h"
#include "lltexglobalcolor.h"
#include "llwearabledata.h"
+#include "boost/bind.hpp"
#if LL_MSVC
@@ -134,9 +134,9 @@ LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo()
std::for_each(mMeshInfoList.begin(), mMeshInfoList.end(), DeletePointer());
std::for_each(mSkeletalDistortionInfoList.begin(), mSkeletalDistortionInfoList.end(), DeletePointer());
std::for_each(mAttachmentInfoList.begin(), mAttachmentInfoList.end(), DeletePointer());
- deleteAndClear(mTexSkinColorInfo);
- deleteAndClear(mTexHairColorInfo);
- deleteAndClear(mTexEyeColorInfo);
+ delete_and_clear(mTexSkinColorInfo);
+ delete_and_clear(mTexHairColorInfo);
+ delete_and_clear(mTexEyeColorInfo);
std::for_each(mLayerInfoList.begin(), mLayerInfoList.end(), DeletePointer());
std::for_each(mDriverInfoList.begin(), mDriverInfoList.end(), DeletePointer());
std::for_each(mMorphMaskInfoList.begin(), mMorphMaskInfoList.end(), DeletePointer());
@@ -221,7 +221,7 @@ void LLAvatarAppearance::initInstance()
mesh->setMeshID(mesh_index);
mesh->setPickName(mesh_dict->mPickName);
mesh->setIsTransparent(FALSE);
- switch((int)mesh_index)
+ switch((S32)mesh_index)
{
case MESH_ID_HAIR:
mesh->setIsTransparent(TRUE);
@@ -257,7 +257,7 @@ void LLAvatarAppearance::initInstance()
++iter)
{
LLAvatarJointMesh* mesh = (*iter);
- mBakedTextureDatas[(int)baked_texture_index].mJointMeshes.push_back(mesh);
+ mBakedTextureDatas[(S32)baked_texture_index].mJointMeshes.push_back(mesh);
}
}
@@ -268,13 +268,13 @@ void LLAvatarAppearance::initInstance()
// virtual
LLAvatarAppearance::~LLAvatarAppearance()
{
- deleteAndClear(mTexSkinColor);
- deleteAndClear(mTexHairColor);
- deleteAndClear(mTexEyeColor);
+ delete_and_clear(mTexSkinColor);
+ delete_and_clear(mTexHairColor);
+ delete_and_clear(mTexEyeColor);
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
- deleteAndClear(mBakedTextureDatas[i].mTexLayerSet);
+ delete_and_clear(mBakedTextureDatas[i].mTexLayerSet);
mBakedTextureDatas[i].mJointMeshes.clear();
for (morph_list_t::iterator iter2 = mBakedTextureDatas[i].mMaskedMorphs.begin();
@@ -289,11 +289,11 @@ LLAvatarAppearance::~LLAvatarAppearance()
mJointMap.clear();
clearSkeleton();
- deleteAndClearArray(mCollisionVolumes);
+ delete_and_clear_array(mCollisionVolumes);
- deleteAndClear(mTexSkinColor);
- deleteAndClear(mTexHairColor);
- deleteAndClear(mTexEyeColor);
+ delete_and_clear(mTexSkinColor);
+ delete_and_clear(mTexHairColor);
+ delete_and_clear(mTexEyeColor);
std::for_each(mPolyMeshes.begin(), mPolyMeshes.end(), DeletePairedPointer());
mPolyMeshes.clear();
@@ -319,14 +319,14 @@ void LLAvatarAppearance::initClass()
BOOL success = sXMLTree.parseFile( xmlFile, FALSE );
if (!success)
{
- llerrs << "Problem reading avatar configuration file:" << xmlFile << llendl;
+ LL_ERRS() << "Problem reading avatar configuration file:" << xmlFile << LL_ENDL;
}
// now sanity check xml file
LLXmlTreeNode* root = sXMLTree.getRoot();
if (!root)
{
- llerrs << "No root node found in avatar configuration file: " << xmlFile << llendl;
+ LL_ERRS() << "No root node found in avatar configuration file: " << xmlFile << LL_ENDL;
return;
}
@@ -335,14 +335,14 @@ void LLAvatarAppearance::initClass()
//-------------------------------------------------------------------------
if( !root->hasName( "linden_avatar" ) )
{
- llerrs << "Invalid avatar file header: " << xmlFile << llendl;
+ LL_ERRS() << "Invalid avatar file header: " << xmlFile << LL_ENDL;
}
std::string version;
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
- llerrs << "Invalid avatar file version: " << version << " in file: " << xmlFile << llendl;
+ LL_ERRS() << "Invalid avatar file version: " << version << " in file: " << xmlFile << LL_ENDL;
}
S32 wearable_def_version = 1;
@@ -355,7 +355,7 @@ void LLAvatarAppearance::initClass()
LLXmlTreeNode* skeleton_node = root->getChildByName( "skeleton" );
if (!skeleton_node)
{
- llerrs << "No skeleton in avatar configuration file: " << xmlFile << llendl;
+ LL_ERRS() << "No skeleton in avatar configuration file: " << xmlFile << LL_ENDL;
return;
}
@@ -363,14 +363,14 @@ void LLAvatarAppearance::initClass()
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
if (!skeleton_node->getFastAttributeString(file_name_string, skeleton_file_name))
{
- llerrs << "No file name in skeleton node in avatar config file: " << xmlFile << llendl;
+ LL_ERRS() << "No file name in skeleton node in avatar config file: " << xmlFile << LL_ENDL;
}
std::string skeleton_path;
skeleton_path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,skeleton_file_name);
if (!parseSkeletonFile(skeleton_path))
{
- llerrs << "Error parsing skeleton file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton file: " << skeleton_path << LL_ENDL;
}
// Process XML data
@@ -383,43 +383,43 @@ void LLAvatarAppearance::initClass()
sAvatarSkeletonInfo = new LLAvatarSkeletonInfo;
if (!sAvatarSkeletonInfo->parseXml(sSkeletonXMLTree.getRoot()))
{
- llerrs << "Error parsing skeleton XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton XML file: " << skeleton_path << LL_ENDL;
}
// parse avatar_lad.xml
if (sAvatarXmlInfo)
{ //this can happen if a login attempt failed
- deleteAndClear(sAvatarXmlInfo);
+ delete_and_clear(sAvatarXmlInfo);
}
sAvatarXmlInfo = new LLAvatarXmlInfo;
if (!sAvatarXmlInfo->parseXmlSkeletonNode(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlMeshNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlColorNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlLayerNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlDriverNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
if (!sAvatarXmlInfo->parseXmlMorphNodes(root))
{
- llerrs << "Error parsing skeleton node in avatar XML file: " << skeleton_path << llendl;
+ LL_ERRS() << "Error parsing skeleton node in avatar XML file: " << skeleton_path << LL_ENDL;
}
}
void LLAvatarAppearance::cleanupClass()
{
- deleteAndClear(sAvatarXmlInfo);
+ delete_and_clear(sAvatarXmlInfo);
// *TODO: What about sAvatarSkeletonInfo ???
sSkeletonXMLTree.cleanup();
sXMLTree.cleanup();
@@ -526,7 +526,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
if (!parsesuccess)
{
- llerrs << "Can't parse skeleton file: " << filename << llendl;
+ LL_ERRS() << "Can't parse skeleton file: " << filename << LL_ENDL;
return FALSE;
}
@@ -534,13 +534,13 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
LLXmlTreeNode* root = sSkeletonXMLTree.getRoot();
if (!root)
{
- llerrs << "No root node found in avatar skeleton file: " << filename << llendl;
+ LL_ERRS() << "No root node found in avatar skeleton file: " << filename << LL_ENDL;
return FALSE;
}
if( !root->hasName( "linden_skeleton" ) )
{
- llerrs << "Invalid avatar skeleton file header: " << filename << llendl;
+ LL_ERRS() << "Invalid avatar skeleton file header: " << filename << LL_ENDL;
return FALSE;
}
@@ -548,7 +548,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
static LLStdStringHandle version_string = LLXmlTree::addAttributeString("version");
if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") )
{
- llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << llendl;
+ LL_ERRS() << "Invalid avatar skeleton file version: " << version << " in file: " << filename << LL_ENDL;
return FALSE;
}
@@ -567,7 +567,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
joint = getCharacterJoint(joint_num);
if (!joint)
{
- llwarns << "Too many bones" << llendl;
+ LL_WARNS() << "Too many bones" << LL_ENDL;
return FALSE;
}
joint->setName( info->mName );
@@ -576,7 +576,7 @@ BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent
{
if (volume_num >= (S32)mNumCollisionVolumes)
{
- llwarns << "Too many bones" << llendl;
+ LL_WARNS() << "Too many bones" << LL_ENDL;
return FALSE;
}
joint = (&mCollisionVolumes[volume_num]);
@@ -646,7 +646,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
//-------------------------------------------------------------------------
if (!allocateCharacterJoints(info->mNumBones))
{
- llerrs << "Can't allocate " << info->mNumBones << " joints" << llendl;
+ LL_ERRS() << "Can't allocate " << info->mNumBones << " joints" << LL_ENDL;
return FALSE;
}
@@ -657,7 +657,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{
if (!allocateCollisionVolumes(info->mNumCollisionVolumes))
{
- llerrs << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << llendl;
+ LL_ERRS() << "Can't allocate " << info->mNumCollisionVolumes << " collision volumes" << LL_ENDL;
return FALSE;
}
}
@@ -670,7 +670,7 @@ BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
LLAvatarBoneInfo *info = *iter;
if (!setupBone(info, NULL, current_volume_num, current_joint_num))
{
- llerrs << "Error parsing bone in skeleton file" << llendl;
+ LL_ERRS() << "Error parsing bone in skeleton file" << LL_ENDL;
return FALSE;
}
}
@@ -730,17 +730,17 @@ void LLAvatarAppearance::buildCharacter()
stop_glerror();
// gPrintMessagesThisFrame = TRUE;
- lldebugs << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << llendl;
+ LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL;
if (!status)
{
if (isSelf())
{
- llerrs << "Unable to load user's avatar" << llendl;
+ LL_ERRS() << "Unable to load user's avatar" << LL_ENDL;
}
else
{
- llwarns << "Unable to load other's avatar" << llendl;
+ LL_WARNS() << "Unable to load other's avatar" << LL_ENDL;
}
return;
}
@@ -789,7 +789,7 @@ void LLAvatarAppearance::buildCharacter()
mEyeLeftp &&
mEyeRightp))
{
- llerrs << "Failed to create avatar." << llendl;
+ LL_ERRS() << "Failed to create avatar." << LL_ENDL;
return;
}
@@ -805,26 +805,26 @@ void LLAvatarAppearance::buildCharacter()
BOOL LLAvatarAppearance::loadAvatar()
{
-// LLFastTimer t(FTM_LOAD_AVATAR);
+// LL_RECORD_BLOCK_TIME(FTM_LOAD_AVATAR);
// avatar_skeleton.xml
if( !buildSkeleton(sAvatarSkeletonInfo) )
{
- llwarns << "avatar file: buildSkeleton() failed" << llendl;
+ LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml :
if( !loadSkeletonNode() )
{
- llwarns << "avatar file: loadNodeSkeleton() failed" << llendl;
+ LL_WARNS() << "avatar file: loadNodeSkeleton() failed" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml :
if( !loadMeshNodes() )
{
- llwarns << "avatar file: loadNodeMesh() failed" << llendl;
+ LL_WARNS() << "avatar file: loadNodeMesh() failed" << LL_ENDL;
return FALSE;
}
@@ -834,13 +834,13 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexSkinColor = new LLTexGlobalColor( this );
if( !mTexSkinColor->setInfo( sAvatarXmlInfo->mTexSkinColorInfo ) )
{
- llwarns << "avatar file: mTexSkinColor->setInfo() failed" << llendl;
+ LL_WARNS() << "avatar file: mTexSkinColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << " name=\"skin_color\" not found" << llendl;
+ LL_WARNS() << " name=\"skin_color\" not found" << LL_ENDL;
return FALSE;
}
if( sAvatarXmlInfo->mTexHairColorInfo )
@@ -848,13 +848,13 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexHairColor = new LLTexGlobalColor( this );
if( !mTexHairColor->setInfo( sAvatarXmlInfo->mTexHairColorInfo ) )
{
- llwarns << "avatar file: mTexHairColor->setInfo() failed" << llendl;
+ LL_WARNS() << "avatar file: mTexHairColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << " name=\"hair_color\" not found" << llendl;
+ LL_WARNS() << " name=\"hair_color\" not found" << LL_ENDL;
return FALSE;
}
if( sAvatarXmlInfo->mTexEyeColorInfo )
@@ -862,26 +862,26 @@ BOOL LLAvatarAppearance::loadAvatar()
mTexEyeColor = new LLTexGlobalColor( this );
if( !mTexEyeColor->setInfo( sAvatarXmlInfo->mTexEyeColorInfo ) )
{
- llwarns << "avatar file: mTexEyeColor->setInfo() failed" << llendl;
+ LL_WARNS() << "avatar file: mTexEyeColor->setInfo() failed" << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << " name=\"eye_color\" not found" << llendl;
+ LL_WARNS() << " name=\"eye_color\" not found" << LL_ENDL;
return FALSE;
}
// avatar_lad.xml :
if (sAvatarXmlInfo->mLayerInfoList.empty())
{
- llwarns << "avatar file: missing node" << llendl;
+ LL_WARNS() << "avatar file: missing node" << LL_ENDL;
return FALSE;
}
if (sAvatarXmlInfo->mMorphMaskInfoList.empty())
{
- llwarns << "avatar file: missing node" << llendl;
+ LL_WARNS() << "avatar file: missing node" << LL_ENDL;
return FALSE;
}
@@ -923,14 +923,14 @@ BOOL LLAvatarAppearance::loadAvatar()
LLVisualParam*(LLAvatarAppearance::*avatar_function)(S32)const = &LLAvatarAppearance::getVisualParam;
if( !driver_param->linkDrivenParams(boost::bind(avatar_function,(LLAvatarAppearance*)this,_1 ), false))
{
- llwarns << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << llendl;
+ LL_WARNS() << "could not link driven params for avatar " << getID().asString() << " param id: " << driver_param->getID() << LL_ENDL;
continue;
}
}
else
{
delete driver_param;
- llwarns << "avatar file: driver_param->parseData() failed" << llendl;
+ LL_WARNS() << "avatar file: driver_param->parseData() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1050,17 +1050,17 @@ BOOL LLAvatarAppearance::loadMeshNodes()
}
else
{
- llwarns << "Avatar file: has invalid lod setting " << lod << llendl;
+ LL_WARNS() << "Avatar file: has invalid lod setting " << lod << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << "Ignoring unrecognized mesh type: " << type << llendl;
+ LL_WARNS() << "Ignoring unrecognized mesh type: " << type << LL_ENDL;
return FALSE;
}
- // llinfos << "Parsing mesh data for " << type << "..." << llendl;
+ // LL_INFOS() << "Parsing mesh data for " << type << "..." << LL_ENDL;
// If this isn't set to white (1.0), avatars will *ALWAYS* be darker than their surroundings.
// Do not touch!!!
@@ -1090,7 +1090,7 @@ BOOL LLAvatarAppearance::loadMeshNodes()
if( !poly_mesh )
{
- llwarns << "Failed to load mesh of type " << type << llendl;
+ LL_WARNS() << "Failed to load mesh of type " << type << LL_ENDL;
return FALSE;
}
@@ -1150,7 +1150,7 @@ BOOL LLAvatarAppearance::loadLayersets()
{
stop_glerror();
delete layer_set;
- llwarns << "avatar file: layer_set->setInfo() failed" << llendl;
+ LL_WARNS() << "avatar file: layer_set->setInfo() failed" << LL_ENDL;
return FALSE;
}
@@ -1173,7 +1173,7 @@ BOOL LLAvatarAppearance::loadLayersets()
// if no baked texture was found, warn and cleanup
if (baked_index == BAKED_NUM_INDICES)
{
- llwarns << " has invalid body_region attribute" << llendl;
+ LL_WARNS() << " has invalid body_region attribute" << LL_ENDL;
delete layer_set;
return FALSE;
}
@@ -1191,7 +1191,7 @@ BOOL LLAvatarAppearance::loadLayersets()
}
else
{
- llwarns << "Could not find layer named " << morph->mLayer << " to set morph flag" << llendl;
+ LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL;
success = FALSE;
}
}
@@ -1287,7 +1287,7 @@ BOOL LLAvatarAppearance::isValid() const
// This should only be called on ourself.
if (!isSelf())
{
- llerrs << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << llendl;
+ LL_ERRS() << "Called LLAvatarAppearance::isValid() on when isSelf() == false" << LL_ENDL;
}
return TRUE;
}
@@ -1452,7 +1452,7 @@ LLTexLayerSet* LLAvatarAppearance::getAvatarLayerSet(EBakedTextureIndex baked_in
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::allocateCollisionVolumes( U32 num )
{
- deleteAndClearArray(mCollisionVolumes);
+ delete_and_clear_array(mCollisionVolumes);
mNumCollisionVolumes = 0;
mCollisionVolumes = new LLAvatarJointCollisionVolume[num];
@@ -1476,7 +1476,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
- llwarns << "Bone without name" << llendl;
+ LL_WARNS() << "Bone without name" << LL_ENDL;
return FALSE;
}
}
@@ -1491,28 +1491,28 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
}
else
{
- llwarns << "Invalid node " << node->getName() << llendl;
+ LL_WARNS() << "Invalid node " << node->getName() << LL_ENDL;
return FALSE;
}
static LLStdStringHandle pos_string = LLXmlTree::addAttributeString("pos");
if (!node->getFastAttributeVector3(pos_string, mPos))
{
- llwarns << "Bone without position" << llendl;
+ LL_WARNS() << "Bone without position" << LL_ENDL;
return FALSE;
}
static LLStdStringHandle rot_string = LLXmlTree::addAttributeString("rot");
if (!node->getFastAttributeVector3(rot_string, mRot))
{
- llwarns << "Bone without rotation" << llendl;
+ LL_WARNS() << "Bone without rotation" << LL_ENDL;
return FALSE;
}
static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale");
if (!node->getFastAttributeVector3(scale_string, mScale))
{
- llwarns << "Bone without scale" << llendl;
+ LL_WARNS() << "Bone without scale" << LL_ENDL;
return FALSE;
}
@@ -1521,7 +1521,7 @@ BOOL LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle pivot_string = LLXmlTree::addAttributeString("pivot");
if (!node->getFastAttributeVector3(pivot_string, mPivot))
{
- llwarns << "Bone without pivot" << llendl;
+ LL_WARNS() << "Bone without pivot" << LL_ENDL;
return FALSE;
}
}
@@ -1549,7 +1549,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle num_bones_string = LLXmlTree::addAttributeString("num_bones");
if (!node->getFastAttributeS32(num_bones_string, mNumBones))
{
- llwarns << "Couldn't find number of bones." << llendl;
+ LL_WARNS() << "Couldn't find number of bones." << LL_ENDL;
return FALSE;
}
@@ -1563,7 +1563,7 @@ BOOL LLAvatarSkeletonInfo::parseXml(LLXmlTreeNode* node)
if (!info->parseXml(child))
{
delete info;
- llwarns << "Error parsing bone in skeleton file" << llendl;
+ LL_WARNS() << "Error parsing bone in skeleton file" << LL_ENDL;
return FALSE;
}
mBoneInfoList.push_back(info);
@@ -1580,7 +1580,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
LLXmlTreeNode* node = root->getChildByName( "skeleton" );
if( !node )
{
- llwarns << "avatar file: missing " << llendl;
+ LL_WARNS() << "avatar file: missing " << LL_ENDL;
return FALSE;
}
@@ -1595,11 +1595,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
{
if (child->getChildByName("param_morph"))
{
- llwarns << "Can't specify morph param in skeleton definition." << llendl;
+ LL_WARNS() << "Can't specify morph param in skeleton definition." << LL_ENDL;
}
else
{
- llwarns << "Unknown param type." << llendl;
+ LL_WARNS() << "Unknown param type." << LL_ENDL;
}
continue;
}
@@ -1624,7 +1624,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!child->getFastAttributeString(name_string, info->mName))
{
- llwarns << "No name supplied for attachment point." << llendl;
+ LL_WARNS() << "No name supplied for attachment point." << LL_ENDL;
delete info;
continue;
}
@@ -1632,7 +1632,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle joint_string = LLXmlTree::addAttributeString("joint");
if (!child->getFastAttributeString(joint_string, info->mJointName))
{
- llwarns << "No bone declared in attachment point " << info->mName << llendl;
+ LL_WARNS() << "No bone declared in attachment point " << info->mName << LL_ENDL;
delete info;
continue;
}
@@ -1658,7 +1658,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro
static LLStdStringHandle id_string = LLXmlTree::addAttributeString("id");
if (!child->getFastAttributeS32(id_string, info->mAttachmentID))
{
- llwarns << "No id supplied for attachment point " << info->mName << llendl;
+ LL_WARNS() << "No id supplied for attachment point " << info->mName << LL_ENDL;
delete info;
continue;
}
@@ -1693,7 +1693,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle type_string = LLXmlTree::addAttributeString("type");
if( !node->getFastAttributeString( type_string, info->mType ) )
{
- llwarns << "Avatar file: is missing type attribute. Ignoring element. " << llendl;
+ LL_WARNS() << "Avatar file: is missing type attribute. Ignoring element. " << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@@ -1701,7 +1701,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle lod_string = LLXmlTree::addAttributeString("lod");
if (!node->getFastAttributeS32( lod_string, info->mLOD ))
{
- llwarns << "Avatar file: is missing lod attribute. Ignoring element. " << llendl;
+ LL_WARNS() << "Avatar file: is missing lod attribute. Ignoring element. " << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@@ -1709,7 +1709,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
static LLStdStringHandle file_name_string = LLXmlTree::addAttributeString("file_name");
if( !node->getFastAttributeString( file_name_string, info->mMeshFileName ) )
{
- llwarns << "Avatar file: is missing file_name attribute. Ignoring: " << info->mType << llendl;
+ LL_WARNS() << "Avatar file: is missing file_name attribute. Ignoring: " << info->mType << LL_ENDL;
delete info;
return FALSE; // Ignore this element
}
@@ -1740,11 +1740,11 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root)
{
if (child->getChildByName("param_skeleton"))
{
- llwarns << "Can't specify skeleton param in a mesh definition." << llendl;
+ LL_WARNS() << "Can't specify skeleton param in a mesh definition." << LL_ENDL;
}
else
{
- llwarns << "Unknown param type." << llendl;
+ LL_WARNS() << "Unknown param type." << LL_ENDL;
}
continue;
}
@@ -1785,14 +1785,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexSkinColorInfo)
{
- llwarns << "avatar file: multiple instances of skin_color" << llendl;
+ LL_WARNS() << "avatar file: multiple instances of skin_color" << LL_ENDL;
return FALSE;
}
mTexSkinColorInfo = new LLTexGlobalColorInfo;
if( !mTexSkinColorInfo->parseXml( color_node ) )
{
- deleteAndClear(mTexSkinColorInfo);
- llwarns << "avatar file: mTexSkinColor->parseXml() failed" << llendl;
+ delete_and_clear(mTexSkinColorInfo);
+ LL_WARNS() << "avatar file: mTexSkinColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1800,14 +1800,14 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexHairColorInfo)
{
- llwarns << "avatar file: multiple instances of hair_color" << llendl;
+ LL_WARNS() << "avatar file: multiple instances of hair_color" << LL_ENDL;
return FALSE;
}
mTexHairColorInfo = new LLTexGlobalColorInfo;
if( !mTexHairColorInfo->parseXml( color_node ) )
{
- deleteAndClear(mTexHairColorInfo);
- llwarns << "avatar file: mTexHairColor->parseXml() failed" << llendl;
+ delete_and_clear(mTexHairColorInfo);
+ LL_WARNS() << "avatar file: mTexHairColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1815,13 +1815,13 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlColorNodes(LLXmlTreeNode* root
{
if (mTexEyeColorInfo)
{
- llwarns << "avatar file: multiple instances of eye_color" << llendl;
+ LL_WARNS() << "avatar file: multiple instances of eye_color" << LL_ENDL;
return FALSE;
}
mTexEyeColorInfo = new LLTexGlobalColorInfo;
if( !mTexEyeColorInfo->parseXml( color_node ) )
{
- llwarns << "avatar file: mTexEyeColor->parseXml() failed" << llendl;
+ LL_WARNS() << "avatar file: mTexEyeColor->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1847,7 +1847,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlLayerNodes(LLXmlTreeNode* root
else
{
delete layer_info;
- llwarns << "avatar file: layer_set->parseXml() failed" << llendl;
+ LL_WARNS() << "avatar file: layer_set->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1876,7 +1876,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlDriverNodes(LLXmlTreeNode* roo
else
{
delete driver_info;
- llwarns << "avatar file: driver_param->parseXml() failed" << llendl;
+ LL_WARNS() << "avatar file: driver_param->parseXml() failed" << LL_ENDL;
return FALSE;
}
}
@@ -1905,7 +1905,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("morph_name");
if (!grand_child->getFastAttributeString(name_string, info->mName))
{
- llwarns << "No name supplied for morph mask." << llendl;
+ LL_WARNS() << "No name supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
@@ -1913,7 +1913,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle region_string = LLXmlTree::addAttributeString("body_region");
if (!grand_child->getFastAttributeString(region_string, info->mRegion))
{
- llwarns << "No region supplied for morph mask." << llendl;
+ LL_WARNS() << "No region supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
@@ -1921,7 +1921,7 @@ BOOL LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root
static LLStdStringHandle layer_string = LLXmlTree::addAttributeString("layer");
if (!grand_child->getFastAttributeString(layer_string, info->mLayer))
{
- llwarns << "No layer supplied for morph mask." << llendl;
+ LL_WARNS() << "No layer supplied for morph mask." << LL_ENDL;
delete info;
continue;
}
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp
index 6ab341af64..2ee3c65a01 100644
--- a/indra/llappearance/llavatarjoint.cpp
+++ b/indra/llappearance/llavatarjoint.cpp
@@ -238,7 +238,7 @@ LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume()
/*virtual*/
U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
{
- llerrs << "Cannot call render() on LLAvatarJointCollisionVolume" << llendl;
+ LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL;
return 0;
}
diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp
index 4a5cff1dc3..520ad775db 100644
--- a/indra/llappearance/llavatarjointmesh.cpp
+++ b/indra/llappearance/llavatarjointmesh.cpp
@@ -28,7 +28,6 @@
// Header Files
//-----------------------------------------------------------------------------
#include "linden_common.h"
-#include "imageids.h"
#include "llfasttimer.h"
#include "llrender.h"
@@ -89,7 +88,7 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
mJoint = joint;
if ( !mJoint )
{
- llinfos << "Can't find joint" << llendl;
+ LL_INFOS() << "Can't find joint" << LL_ENDL;
}
// compute the inverse root skin matrix
@@ -117,7 +116,6 @@ BOOL LLSkinJoint::setupSkinJoint( LLAvatarJoint *joint)
//-----------------------------------------------------------------------------
BOOL LLAvatarJointMesh::sPipelineRender = FALSE;
-EAvatarRenderPass LLAvatarJointMesh::sRenderPass = AVATAR_RENDER_PASS_SINGLE;
U32 LLAvatarJointMesh::sClothingMaskImageName = 0;
LLColor4 LLAvatarJointMesh::sClothingInnerColor;
@@ -306,7 +304,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
U32 jn;
for (jn = 0; jn < numJointNames; jn++)
{
- //llinfos << "Setting up joint " << jointNames[jn] << llendl;
+ //LL_INFOS() << "Setting up joint " << jointNames[jn] << LL_ENDL;
LLAvatarJoint* joint = (LLAvatarJoint*)(getRoot()->findJoint(jointNames[jn]) );
mSkinJoints[jn].setupSkinJoint( joint );
}
@@ -318,7 +316,7 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
setupJoint((LLAvatarJoint*)getRoot());
}
-// llinfos << "joint render entries: " << mMesh->mJointRenderData.count() << llendl;
+ LL_DEBUGS() << "joint render entries: " << mMesh->mJointRenderData.size() << LL_ENDL;
}
//-----------------------------------------------------------------------------
@@ -326,10 +324,11 @@ void LLAvatarJointMesh::setMesh( LLPolyMesh *mesh )
//-----------------------------------------------------------------------------
void LLAvatarJointMesh::setupJoint(LLAvatarJoint* current_joint)
{
-// llinfos << "Mesh: " << getName() << llendl;
+ LL_DEBUGS() << "Mesh: " << getName() << LL_ENDL;
-// S32 joint_count = 0;
+ S32 joint_count = 0;
U32 sj;
+
for (sj=0; sjmJointRenderData.count() && mMesh->mJointRenderData[mMesh->mJointRenderData.count() - 1]->mWorldMatrix == ¤t_joint->getParent()->getWorldMatrix())
+ if(mMesh->mJointRenderData.size() && mMesh->mJointRenderData[mMesh->mJointRenderData.size() - 1]->mWorldMatrix == ¤t_joint->getParent()->getWorldMatrix())
{
// ...then just add ourselves
LLAvatarJoint* jointp = js.mJoint;
- mMesh->mJointRenderData.put(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
-// llinfos << "joint " << joint_count << js.mJoint->getName() << llendl;
-// joint_count++;
+ mMesh->mJointRenderData.push_back(new LLJointRenderData(&jointp->getWorldMatrix(), &js));
+ LL_DEBUGS() << "joint " << joint_count++ << js.mJoint->getName() << LL_ENDL;
}
// otherwise add our parent and ourselves
else
{
- mMesh->mJointRenderData.put(new LLJointRenderData(¤t_joint->getParent()->getWorldMatrix(), NULL));
-// llinfos << "joint " << joint_count << current_joint->getParent()->getName() << llendl;
-// joint_count++;
- mMesh->mJointRenderData.put(new LLJointRenderData(¤t_joint->getWorldMatrix(), &js));
-// llinfos << "joint " << joint_count << current_joint->getName() << llendl;
-// joint_count++;
+ mMesh->mJointRenderData.push_back(new LLJointRenderData(¤t_joint->getParent()->getWorldMatrix(), NULL));
+ LL_DEBUGS() << "joint " << joint_count++ << current_joint->getParent()->getName() << LL_ENDL;
+ mMesh->mJointRenderData.push_back(new LLJointRenderData(¤t_joint->getWorldMatrix(), &js));
+ LL_DEBUGS() << "joint " << joint_count++ << current_joint->getName() << LL_ENDL;
}
}
diff --git a/indra/llappearance/llavatarjointmesh.h b/indra/llappearance/llavatarjointmesh.h
index 6486932cdf..5980b29b46 100644
--- a/indra/llappearance/llavatarjointmesh.h
+++ b/indra/llappearance/llavatarjointmesh.h
@@ -82,7 +82,6 @@ public:
static BOOL sPipelineRender;
//RN: this is here for testing purposes
static U32 sClothingMaskImageName;
- static EAvatarRenderPass sRenderPass;
static LLColor4 sClothingInnerColor;
public:
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index 1f7e8b8652..c66a428374 100644
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -89,7 +89,7 @@ BOOL LLDriverParamInfo::parseXml(LLXmlTreeNode* node)
}
else
{
- llerrs << " Unable to resolve driven parameter: " << driven_id << llendl;
+ LL_ERRS() << " Unable to resolve driven parameter: " << driven_id << LL_ENDL;
return FALSE;
}
}
@@ -139,9 +139,9 @@ void LLDriverParamInfo::toStream(std::ostream &out)
}
else
{
- llwarns << "could not get parameter " << driven.mDrivenID << " from avatar "
+ LL_WARNS() << "could not get parameter " << driven.mDrivenID << " from avatar "
<< mDriverParam->getAvatarAppearance()
- << " for driver parameter " << getID() << llendl;
+ << " for driver parameter " << getID() << LL_ENDL;
}
out << std::endl;
}
diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h
index 040c9cf5be..2420db76e7 100644
--- a/indra/llappearance/lldriverparam.h
+++ b/indra/llappearance/lldriverparam.h
@@ -29,6 +29,7 @@
#include "llviewervisualparam.h"
#include "llwearabletype.h"
+#include
class LLAvatarAppearance;
class LLDriverParam;
diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp
index 7e36a06797..f49cf21512 100644
--- a/indra/llappearance/lllocaltextureobject.cpp
+++ b/indra/llappearance/lllocaltextureobject.cpp
@@ -64,7 +64,7 @@ LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) :
LLTexLayer* original_layer = lto.getTexLayer(index);
if (!original_layer)
{
- llerrs << "could not clone Local Texture Object: unable to extract texlayer!" << llendl;
+ LL_ERRS() << "could not clone Local Texture Object: unable to extract texlayer!" << LL_ENDL;
continue;
}
diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp
index a01457246e..0a7a8d27bb 100644
--- a/indra/llappearance/llpolymesh.cpp
+++ b/indra/llappearance/llpolymesh.cpp
@@ -161,8 +161,8 @@ void LLPolyMeshSharedData::freeMeshData()
// mVertFaceMap.deleteAllData();
}
-// compate_int is used by the qsort function to sort the index array
-int compare_int(const void *a, const void *b);
+// compare_int is used by the qsort function to sort the index array
+S32 compare_int(const void *a, const void *b);
//-----------------------------------------------------------------------------
// genIndices()
@@ -277,13 +277,13 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
//-------------------------------------------------------------------------
if(fileName.empty())
{
- llerrs << "Filename is Empty!" << llendl;
+ LL_ERRS() << "Filename is Empty!" << LL_ENDL;
return FALSE;
}
LLFILE* fp = LLFile::fopen(fileName, "rb"); /*Flawfinder: ignore*/
if (!fp)
{
- llerrs << "can't open: " << fileName << llendl;
+ LL_ERRS() << "can't open: " << fileName << LL_ENDL;
return FALSE;
}
@@ -293,7 +293,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
char header[128]; /*Flawfinder: ignore*/
if (fread(header, sizeof(char), 128, fp) != 128)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
}
//-------------------------------------------------------------------------
@@ -302,7 +302,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
BOOL status = FALSE;
if ( strncmp(header, HEADER_BINARY, strlen(HEADER_BINARY)) == 0 ) /*Flawfinder: ignore*/
{
- lldebugs << "Loading " << fileName << llendl;
+ LL_DEBUGS() << "Loading " << fileName << LL_ENDL;
//----------------------------------------------------------------
// File Header (seek past it)
@@ -316,7 +316,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
size_t numRead = fread(&hasWeights, sizeof(U8), 1, fp);
if (numRead != 1)
{
- llerrs << "can't read HasWeights flag from " << fileName << llendl;
+ LL_ERRS() << "can't read HasWeights flag from " << fileName << LL_ENDL;
return FALSE;
}
if (!isLOD())
@@ -331,7 +331,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
numRead = fread(&hasDetailTexCoords, sizeof(U8), 1, fp);
if (numRead != 1)
{
- llerrs << "can't read HasDetailTexCoords flag from " << fileName << llendl;
+ LL_ERRS() << "can't read HasDetailTexCoords flag from " << fileName << LL_ENDL;
return FALSE;
}
@@ -343,7 +343,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(position.mV, sizeof(float), 3);
if (numRead != 3)
{
- llerrs << "can't read Position from " << fileName << llendl;
+ LL_ERRS() << "can't read Position from " << fileName << LL_ENDL;
return FALSE;
}
setPosition( position );
@@ -356,7 +356,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(rotationAngles.mV, sizeof(float), 3);
if (numRead != 3)
{
- llerrs << "can't read RotationAngles from " << fileName << llendl;
+ LL_ERRS() << "can't read RotationAngles from " << fileName << LL_ENDL;
return FALSE;
}
@@ -365,7 +365,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
if (numRead != 1)
{
- llerrs << "can't read RotationOrder from " << fileName << llendl;
+ LL_ERRS() << "can't read RotationOrder from " << fileName << LL_ENDL;
return FALSE;
}
@@ -384,7 +384,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(scale.mV, sizeof(float), 3);
if (numRead != 3)
{
- llerrs << "can't read Scale from " << fileName << llendl;
+ LL_ERRS() << "can't read Scale from " << fileName << LL_ENDL;
return FALSE;
}
setScale( scale );
@@ -405,7 +405,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&numVertices, sizeof(U16), 1);
if (numRead != 1)
{
- llerrs << "can't read NumVertices from " << fileName << llendl;
+ LL_ERRS() << "can't read NumVertices from " << fileName << LL_ENDL;
return FALSE;
}
@@ -420,7 +420,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&mBaseCoords[i], sizeof(float), 3);
if (numRead != 3)
{
- llerrs << "can't read Coordinates from " << fileName << llendl;
+ LL_ERRS() << "can't read Coordinates from " << fileName << LL_ENDL;
return FALSE;
}
}
@@ -434,7 +434,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&mBaseNormals[i], sizeof(float), 3);
if (numRead != 3)
{
- llerrs << " can't read Normals from " << fileName << llendl;
+ LL_ERRS() << " can't read Normals from " << fileName << LL_ENDL;
return FALSE;
}
}
@@ -448,7 +448,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&mBaseBinormals[i], sizeof(float), 3);
if (numRead != 3)
{
- llerrs << " can't read Binormals from " << fileName << llendl;
+ LL_ERRS() << " can't read Binormals from " << fileName << LL_ENDL;
return FALSE;
}
}
@@ -460,7 +460,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(mTexCoords, sizeof(float), 2*numVertices);
if (numRead != numVertices)
{
- llerrs << "can't read TexCoords from " << fileName << llendl;
+ LL_ERRS() << "can't read TexCoords from " << fileName << LL_ENDL;
return FALSE;
}
@@ -473,7 +473,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(mDetailTexCoords, sizeof(float), 2*numVertices);
if (numRead != numVertices)
{
- llerrs << "can't read DetailTexCoords from " << fileName << llendl;
+ LL_ERRS() << "can't read DetailTexCoords from " << fileName << LL_ENDL;
return FALSE;
}
}
@@ -487,7 +487,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(mWeights, sizeof(float), numVertices);
if (numRead != numVertices)
{
- llerrs << "can't read Weights from " << fileName << llendl;
+ LL_ERRS() << "can't read Weights from " << fileName << LL_ENDL;
return FALSE;
}
}
@@ -501,7 +501,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&numFaces, sizeof(U16), 1);
if (numRead != 1)
{
- llerrs << "can't read NumFaces from " << fileName << llendl;
+ LL_ERRS() << "can't read NumFaces from " << fileName << LL_ENDL;
return FALSE;
}
allocateFaceData( numFaces );
@@ -519,7 +519,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(face, sizeof(U16), 3);
if (numRead != 3)
{
- llerrs << "can't read Face[" << i << "] from " << fileName << llendl;
+ LL_ERRS() << "can't read Face[" << i << "] from " << fileName << LL_ENDL;
return FALSE;
}
if (mReferenceData)
@@ -547,10 +547,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
// S32 j;
// for(j = 0; j < 3; j++)
// {
-// LLDynamicArray *face_list = mVertFaceMap.getIfThere(face[j]);
+// std::vector *face_list = mVertFaceMap.getIfThere(face[j]);
// if (!face_list)
// {
-// face_list = new LLDynamicArray;
+// face_list = new std::vector;
// mVertFaceMap.addData(face[j], face_list);
// }
// face_list->put(i);
@@ -559,10 +559,10 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
numTris++;
}
- lldebugs << "verts: " << numVertices
+ LL_DEBUGS() << "verts: " << numVertices
<< ", faces: " << numFaces
<< ", tris: " << numTris
- << llendl;
+ << LL_ENDL;
//----------------------------------------------------------------
// NumSkinJoints
@@ -576,7 +576,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
llendianswizzle(&numSkinJoints, sizeof(U16), 1);
if (numRead != 1)
{
- llerrs << "can't read NumSkinJoints from " << fileName << llendl;
+ LL_ERRS() << "can't read NumSkinJoints from " << fileName << LL_ENDL;
return FALSE;
}
allocateJointNames( numSkinJoints );
@@ -592,7 +592,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
jointName[sizeof(jointName)-1] = '\0'; // ensure nul-termination
if (numRead != 1)
{
- llerrs << "can't read Skin[" << i << "].Name from " << fileName << llendl;
+ LL_ERRS() << "can't read Skin[" << i << "].Name from " << fileName << LL_ENDL;
return FALSE;
}
@@ -687,12 +687,12 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
S32 remapDst;
if (fread(&remapSrc, sizeof(S32), 1, fp) != 1)
{
- llerrs << "can't read source vertex in vertex remap data" << llendl;
+ LL_ERRS() << "can't read source vertex in vertex remap data" << LL_ENDL;
break;
}
if (fread(&remapDst, sizeof(S32), 1, fp) != 1)
{
- llerrs << "can't read destination vertex in vertex remap data" << llendl;
+ LL_ERRS() << "can't read destination vertex in vertex remap data" << LL_ENDL;
break;
}
llendianswizzle(&remapSrc, sizeof(S32), 1);
@@ -707,7 +707,7 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
}
else
{
- llerrs << "invalid mesh file header: " << fileName << llendl;
+ LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL;
status = FALSE;
}
@@ -808,15 +808,8 @@ LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_
//-----------------------------------------------------------------------------
LLPolyMesh::~LLPolyMesh()
{
- S32 i;
- for (i = 0; i < mJointRenderData.count(); i++)
- {
- delete mJointRenderData[i];
- mJointRenderData[i] = NULL;
- }
-
- ll_aligned_free_16(mVertexData);
-
+ delete_and_clear(mJointRenderData);
+ ll_aligned_free_16(mVertexData);
}
@@ -831,7 +824,7 @@ LLPolyMesh *LLPolyMesh::getMesh(const std::string &name, LLPolyMesh* reference_m
LLPolyMeshSharedData* meshSharedData = get_if_there(sGlobalSharedMeshList, name, (LLPolyMeshSharedData*)NULL);
if (meshSharedData)
{
-// llinfos << "Polymesh " << name << " found in global mesh table." << llendl;
+// LL_INFOS() << "Polymesh " << name << " found in global mesh table." << LL_ENDL;
LLPolyMesh *poly_mesh = new LLPolyMesh(meshSharedData, reference_mesh);
return poly_mesh;
}
@@ -855,7 +848,7 @@ LLPolyMesh *LLPolyMesh::getMesh(const std::string &name, LLPolyMesh* reference_m
LLPolyMesh *poly_mesh = new LLPolyMesh(mesh_data, reference_mesh);
-// llinfos << "Polymesh " << name << " added to global mesh table." << llendl;
+// LL_INFOS() << "Polymesh " << name << " added to global mesh table." << LL_ENDL;
sGlobalSharedMeshList[name] = poly_mesh->mSharedData;
return poly_mesh;
@@ -889,10 +882,10 @@ void LLPolyMesh::dumpDiagInfo()
std::string buf;
- llinfos << "-----------------------------------------------------" << llendl;
- llinfos << " Global PolyMesh Table (DEBUG only)" << llendl;
- llinfos << " Verts Faces Mem(KB) Name" << llendl;
- llinfos << "-----------------------------------------------------" << llendl;
+ LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
+ LL_INFOS() << " Global PolyMesh Table (DEBUG only)" << LL_ENDL;
+ LL_INFOS() << " Verts Faces Mem(KB) Name" << LL_ENDL;
+ LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
// print each loaded mesh, and it's memory usage
for(LLPolyMeshSharedDataTable::iterator iter = sGlobalSharedMeshList.begin();
@@ -906,17 +899,17 @@ void LLPolyMesh::dumpDiagInfo()
U32 num_kb = mesh->getNumKB();
buf = llformat("%8d %8d %8d %s", num_verts, num_faces, num_kb, mesh_name.c_str());
- llinfos << buf << llendl;
+ LL_INFOS() << buf << LL_ENDL;
total_verts += num_verts;
total_faces += num_faces;
total_kb += num_kb;
}
- llinfos << "-----------------------------------------------------" << llendl;
+ LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
buf = llformat("%8d %8d %8d TOTAL", total_verts, total_faces, total_kb );
- llinfos << buf << llendl;
- llinfos << "-----------------------------------------------------" << llendl;
+ LL_INFOS() << buf << LL_ENDL;
+ LL_INFOS() << "-----------------------------------------------------" << LL_ENDL;
}
//-----------------------------------------------------------------------------
diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h
index ef1dfb1adb..83659d9514 100644
--- a/indra/llappearance/llpolymesh.h
+++ b/indra/llappearance/llpolymesh.h
@@ -36,7 +36,6 @@
#include "llquaternion.h"
#include "llpolymorph.h"
#include "lljoint.h"
-//#include "lldarray.h"
class LLSkinJoint;
class LLAvatarAppearance;
@@ -322,7 +321,7 @@ public:
void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; }
LLAvatarAppearance* getAvatar() { return mAvatarp; }
- LLDynamicArray mJointRenderData;
+ std::vector mJointRenderData;
U32 mFaceVertexOffset;
U32 mFaceVertexCount;
diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp
index 93c2f15a53..ce8a0b0b76 100644
--- a/indra/llappearance/llpolymorph.cpp
+++ b/indra/llappearance/llpolymorph.cpp
@@ -35,6 +35,7 @@
#include "llxmltree.h"
#include "llendianswizzle.h"
#include "llpolymesh.h"
+#include "llfasttimer.h"
//#include "../tools/imdebug/imdebug.h"
@@ -112,7 +113,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&numVertices, sizeof(S32), 1);
if (numRead != 1)
{
- llwarns << "Can't read number of morph target vertices" << llendl;
+ LL_WARNS() << "Can't read number of morph target vertices" << LL_ENDL;
return FALSE;
}
@@ -149,13 +150,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mVertexIndices[v], sizeof(U32), 1);
if (numRead != 1)
{
- llwarns << "Can't read morph target vertex number" << llendl;
+ LL_WARNS() << "Can't read morph target vertex number" << LL_ENDL;
return FALSE;
}
if (mVertexIndices[v] > 10000)
{
- llerrs << "Bad morph index: " << mVertexIndices[v] << llendl;
+ LL_ERRS() << "Bad morph index: " << mVertexIndices[v] << LL_ENDL;
}
@@ -163,7 +164,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mCoords[v], sizeof(F32), 3);
if (numRead != 3)
{
- llwarns << "Can't read morph target vertex coordinates" << llendl;
+ LL_WARNS() << "Can't read morph target vertex coordinates" << LL_ENDL;
return FALSE;
}
@@ -183,7 +184,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mNormals[v], sizeof(F32), 3);
if (numRead != 3)
{
- llwarns << "Can't read morph target normal" << llendl;
+ LL_WARNS() << "Can't read morph target normal" << LL_ENDL;
return FALSE;
}
@@ -191,7 +192,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mBinormals[v], sizeof(F32), 3);
if (numRead != 3)
{
- llwarns << "Can't read morph target binormal" << llendl;
+ LL_WARNS() << "Can't read morph target binormal" << LL_ENDL;
return FALSE;
}
@@ -200,7 +201,7 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
llendianswizzle(&mTexCoords[v].mV, sizeof(F32), 2);
if (numRead != 2)
{
- llwarns << "Can't read morph target uv" << llendl;
+ LL_WARNS() << "Can't read morph target uv" << LL_ENDL;
return FALSE;
}
@@ -268,7 +269,7 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if( !node->getFastAttributeString( name_string, mMorphName ) )
{
- llwarns << "Avatar file: is missing name attribute" << llendl;
+ LL_WARNS() << "Avatar file: is missing name attribute" << LL_ENDL;
return FALSE; // Continue, ignoring this tag
}
@@ -279,8 +280,8 @@ BOOL LLPolyMorphTargetInfo::parseXml(LLXmlTreeNode* node)
if (NULL == paramNode)
{
- llwarns << "Failed to getChildByName(\"param_morph\")"
- << llendl;
+ LL_WARNS() << "Failed to getChildByName(\"param_morph\")"
+ << LL_ENDL;
return FALSE;
}
@@ -376,7 +377,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
}
if (!mMorphData)
{
- llwarns << "No morph target named " << morph_param_name << " found in mesh." << llendl;
+ LL_WARNS() << "No morph target named " << morph_param_name << " found in mesh." << LL_ENDL;
return FALSE; // Continue, ignoring this tag
}
return TRUE;
@@ -524,7 +525,7 @@ F32 LLPolyMorphTarget::getMaxDistortion()
//-----------------------------------------------------------------------------
// apply()
//-----------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_APPLY_MORPH_TARGET("Apply Morph");
+static LLTrace::BlockTimerStatHandle FTM_APPLY_MORPH_TARGET("Apply Morph");
void LLPolyMorphTarget::apply( ESex avatar_sex )
{
@@ -533,7 +534,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
return;
}
- LLFastTimer t(FTM_APPLY_MORPH_TARGET);
+ LL_RECORD_BLOCK_TIME(FTM_APPLY_MORPH_TARGET);
mLastSex = avatar_sex;
@@ -619,9 +620,9 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
tangent.setCross3(scaled_binormals[vert_index_mesh], norm);
LLVector4a& normalized_binormal = binormals[vert_index_mesh];
- normalized_binormal.setCross3(norm, tangent);
+ normalized_binormal.setCross3(norm, tangent);
normalized_binormal.normalize3fast();
-
+
tex_coords[vert_index_mesh] += mMorphData->mTexCoords[vert_index_morph] * delta_weight * maskWeight;
}
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp
index 4ba16691c2..a72b446ace 100644
--- a/indra/llappearance/llpolyskeletaldistortion.cpp
+++ b/indra/llappearance/llpolyskeletaldistortion.cpp
@@ -28,19 +28,12 @@
// Header Files
//-----------------------------------------------------------------------------
#include "llpreprocessor.h"
-#include "llerrorlegacy.h"
-//#include "llcommon.h"
-//#include "llmemory.h"
+#include "llerror.h"
#include "llavatarappearance.h"
#include "llavatarjoint.h"
#include "llpolymorph.h"
-//#include "llviewercontrol.h"
-//#include "llxmltree.h"
-//#include "llvoavatar.h"
#include "llwearable.h"
-//#include "lldir.h"
-//#include "llvolume.h"
-//#include "llendianswizzle.h"
+#include "llfasttimer.h"
#include "llpolyskeletaldistortion.h"
@@ -62,8 +55,8 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
if (NULL == skeletalParam)
{
- llwarns << "Failed to getChildByName(\"param_skeleton\")"
- << llendl;
+ LL_WARNS() << "Failed to getChildByName(\"param_skeleton\")"
+ << LL_ENDL;
return FALSE;
}
@@ -79,14 +72,14 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!bone->getFastAttributeString(name_string, name))
{
- llwarns << "No bone name specified for skeletal param." << llendl;
+ LL_WARNS() << "No bone name specified for skeletal param." << LL_ENDL;
continue;
}
static LLStdStringHandle scale_string = LLXmlTree::addAttributeString("scale");
if (!bone->getFastAttributeVector3(scale_string, scale))
{
- llwarns << "No scale specified for bone " << name << "." << llendl;
+ LL_WARNS() << "No scale specified for bone " << name << "." << LL_ENDL;
continue;
}
@@ -100,7 +93,7 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node)
}
else
{
- llwarns << "Unrecognized element " << bone->getName() << " in skeletal distortion" << llendl;
+ LL_WARNS() << "Unrecognized element " << bone->getName() << " in skeletal distortion" << LL_ENDL;
continue;
}
}
@@ -139,13 +132,13 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
LLJoint* joint = mAvatar->getJoint(bone_info->mBoneName);
if (!joint)
{
- llwarns << "Joint " << bone_info->mBoneName << " not found." << llendl;
+ LL_WARNS() << "Joint " << bone_info->mBoneName << " not found." << LL_ENDL;
continue;
}
if (mJointScales.find(joint) != mJointScales.end())
{
- llwarns << "Scale deformation already supplied for joint " << joint->getName() << "." << llendl;
+ LL_WARNS() << "Scale deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
}
// store it
@@ -168,7 +161,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
{
if (mJointOffsets.find(joint) != mJointOffsets.end())
{
- llwarns << "Offset deformation already supplied for joint " << joint->getName() << "." << llendl;
+ LL_WARNS() << "Offset deformation already supplied for joint " << joint->getName() << "." << LL_ENDL;
}
mJointOffsets[joint] = bone_info->mPositionDeformation;
}
@@ -186,11 +179,11 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
//-----------------------------------------------------------------------------
// apply()
//-----------------------------------------------------------------------------
-static LLFastTimer::DeclareTimer FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion");
+static LLTrace::BlockTimerStatHandle FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion");
void LLPolySkeletalDistortion::apply( ESex avatar_sex )
{
- LLFastTimer t(FTM_POLYSKELETAL_DISTORTION_APPLY);
+ LL_RECORD_BLOCK_TIME(FTM_POLYSKELETAL_DISTORTION_APPLY);
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index 774bc7dfa2..24c9e9ae48 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -39,7 +39,6 @@
//#include "llpolymorph.h"
#include "lljoint.h"
#include "llviewervisualparam.h"
-//#include "lldarray.h"
//class LLSkinJoint;
class LLAvatarAppearance;
diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp
index f38b982104..77be545e05 100644
--- a/indra/llappearance/lltexglobalcolor.cpp
+++ b/indra/llappearance/lltexglobalcolor.cpp
@@ -128,7 +128,7 @@ BOOL LLTexGlobalColorInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name");
if (!node->getFastAttributeString(name_string, mName))
{
- llwarns << " element is missing name attribute." << llendl;
+ LL_WARNS() << " element is missing name attribute." << LL_ENDL;
return FALSE;
}
// sub-element
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index a3a8616864..fb1ea93060 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -30,7 +30,6 @@
#include "llavatarappearance.h"
#include "llcrc.h"
-#include "imageids.h"
#include "llimagej2c.h"
#include "llimagetga.h"
#include "lldir.h"
@@ -38,11 +37,13 @@
#include "llvfs.h"
#include "lltexlayerparams.h"
#include "lltexturemanagerbridge.h"
+#include "lllocaltextureobject.h"
#include "../llui/llui.h"
#include "llwearable.h"
#include "llwearabledata.h"
#include "llvertexbuffer.h"
#include "llviewervisualparam.h"
+#include "llfasttimer.h"
//#include "../tools/imdebug/imdebug.h"
@@ -209,7 +210,7 @@ BOOL LLTexLayerSetInfo::parseXml(LLXmlTreeNode* node)
static LLStdStringHandle body_region_string = LLXmlTree::addAttributeString("body_region");
if( !node->getFastAttributeString( body_region_string, mBodyRegion ) )
{
- llwarns << " is missing body_region attribute" << llendl;
+ LL_WARNS() << " is missing body_region attribute" << LL_ENDL;
return FALSE;
}
@@ -517,10 +518,10 @@ const LLTexLayerSetBuffer* LLTexLayerSet::getComposite() const
return mComposite;
}
-static LLFastTimer::DeclareTimer FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha");
+static LLTrace::BlockTimerStatHandle FTM_GATHER_MORPH_MASK_ALPHA("gatherMorphMaskAlpha");
void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height)
{
- LLFastTimer t(FTM_GATHER_MORPH_MASK_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_GATHER_MORPH_MASK_ALPHA);
memset(data, 255, width * height);
for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ )
@@ -533,10 +534,10 @@ void LLTexLayerSet::gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S
renderAlphaMaskTextures(origin_x, origin_y, width, height, true);
}
-static LLFastTimer::DeclareTimer FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_ALPHA_MASK_TEXTURES("renderAlphaMaskTextures");
void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, bool forceClear)
{
- LLFastTimer t(FTM_RENDER_ALPHA_MASK_TEXTURES);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_MASK_TEXTURES);
const LLTexLayerSetInfo *info = getInfo();
bool use_shaders = LLGLSLShader::sNoFixedFunction;
@@ -734,13 +735,13 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
}
if (mLocalTexture == TEX_NUM_INDICES)
{
- llwarns << " element has invalid local_texture attribute: " << mName << " " << local_texture_name << llendl;
+ LL_WARNS() << " element has invalid local_texture attribute: " << mName << " " << local_texture_name << LL_ENDL;
return FALSE;
}
}
else
{
- llwarns << " element is missing a required attribute. " << mName << llendl;
+ LL_WARNS() << " element is missing a required attribute. " << mName << LL_ENDL;
return FALSE;
}
}
@@ -803,7 +804,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance);
if (!param_color->setInfo(color_info, TRUE))
{
- llwarns << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << llendl;
+ LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_color;
success = FALSE;
}
@@ -817,7 +818,7 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance)
LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance);
if (!param_alpha->setInfo(alpha_info, TRUE))
{
- llwarns << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << llendl;
+ LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL;
delete param_alpha;
success = FALSE;
}
@@ -850,7 +851,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
// Not a critical warning, but could be useful for debugging later issues. -Nyx
if (mInfo != NULL)
{
- llwarns << "mInfo != NULL" << llendl;
+ LL_WARNS() << "mInfo != NULL" << LL_ENDL;
}
mInfo = info;
//mID = info->mID; // No ID
@@ -1206,7 +1207,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
else
{
- llinfos << "lto not defined or image not defined: " << getInfo()->getLocalTexture() << " lto: " << mLocalTextureObject << llendl;
+ LL_INFOS() << "lto not defined or image not defined: " << getInfo()->getLocalTexture() << " lto: " << mLocalTextureObject << LL_ENDL;
}
// if( mTexLayerSet->getAvatarAppearance()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) )
{
@@ -1294,7 +1295,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
if( !success )
{
- llinfos << "LLTexLayer::render() partial: " << getInfo()->mName << llendl;
+ LL_INFOS() << "LLTexLayer::render() partial: " << getInfo()->mName << LL_ENDL;
}
return success;
}
@@ -1426,15 +1427,15 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
addAlphaMask(data, originX, originY, width, height);
}
-static LLFastTimer::DeclareTimer FTM_RENDER_MORPH_MASKS("renderMorphMasks");
+static LLTrace::BlockTimerStatHandle FTM_RENDER_MORPH_MASKS("renderMorphMasks");
void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render)
{
if (!force_render && !hasMorph())
{
- lldebugs << "skipping renderMorphMasks for " << getUUID() << llendl;
+ LL_DEBUGS() << "skipping renderMorphMasks for " << getUUID() << LL_ENDL;
return;
}
- LLFastTimer t(FTM_RENDER_MORPH_MASKS);
+ LL_RECORD_BLOCK_TIME(FTM_RENDER_MORPH_MASKS);
BOOL success = TRUE;
llassert( !mParamAlphaList.empty() );
@@ -1472,7 +1473,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
success &= param->render( x, y, width, height );
if (!success && !force_render)
{
- lldebugs << "Failed to render param " << param->getID() << " ; skipping morph mask." << llendl;
+ LL_DEBUGS() << "Failed to render param " << param->getID() << " ; skipping morph mask." << LL_ENDL;
return;
}
}
@@ -1514,8 +1515,8 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
else
{
- llwarns << "Skipping rendering of " << getInfo()->mStaticImageFileName
- << "; expected 1 or 4 components." << llendl;
+ LL_WARNS() << "Skipping rendering of " << getInfo()->mStaticImageFileName
+ << "; expected 1 or 4 components." << LL_ENDL;
}
}
}
@@ -1577,10 +1578,10 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
}
-static LLFastTimer::DeclareTimer FTM_ADD_ALPHA_MASK("addAlphaMask");
+static LLTrace::BlockTimerStatHandle FTM_ADD_ALPHA_MASK("addAlphaMask");
void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height)
{
- LLFastTimer t(FTM_ADD_ALPHA_MASK);
+ LL_RECORD_BLOCK_TIME(FTM_ADD_ALPHA_MASK);
S32 size = width * height;
const U8* alphaData = getAlphaData();
if (!alphaData && hasAlphaParams())
@@ -1894,18 +1895,18 @@ LLTexLayerStaticImageList::~LLTexLayerStaticImageList()
void LLTexLayerStaticImageList::dumpByteCount() const
{
- llinfos << "Avatar Static Textures " <<
+ LL_INFOS() << "Avatar Static Textures " <<
"KB GL:" << (mGLBytes / 1024) <<
- "KB TGA:" << (mTGABytes / 1024) << "KB" << llendl;
+ "KB TGA:" << (mTGABytes / 1024) << "KB" << LL_ENDL;
}
void LLTexLayerStaticImageList::deleteCachedImages()
{
if( mGLBytes || mTGABytes )
{
- llinfos << "Clearing Static Textures " <<
+ LL_INFOS() << "Clearing Static Textures " <<
"KB GL:" << (mGLBytes / 1024) <<
- "KB TGA:" << (mTGABytes / 1024) << "KB" << llendl;
+ "KB TGA:" << (mTGABytes / 1024) << "KB" << LL_ENDL;
//mStaticImageLists uses LLPointers, clear() will cause deletion
@@ -1923,10 +1924,10 @@ void LLTexLayerStaticImageList::deleteCachedImages()
// Returns an LLImageTGA that contains the encoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
-static LLFastTimer::DeclareTimer FTM_LOAD_STATIC_TGA("getImageTGA");
+static LLTrace::BlockTimerStatHandle FTM_LOAD_STATIC_TGA("getImageTGA");
LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
{
- LLFastTimer t(FTM_LOAD_STATIC_TGA);
+ LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TGA);
const char *namekey = mImageNames.addString(file_name);
image_tga_map_t::const_iterator iter = mStaticImageListTGA.find(namekey);
if( iter != mStaticImageListTGA.end() )
@@ -1953,10 +1954,10 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
// Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
-static LLFastTimer::DeclareTimer FTM_LOAD_STATIC_TEXTURE("getTexture");
+static LLTrace::BlockTimerStatHandle FTM_LOAD_STATIC_TEXTURE("getTexture");
LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask)
{
- LLFastTimer t(FTM_LOAD_STATIC_TEXTURE);
+ LL_RECORD_BLOCK_TIME(FTM_LOAD_STATIC_TEXTURE);
LLPointer tex;
const char *namekey = mImageNames.addString(file_name);
@@ -2003,10 +2004,10 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
// Reads a .tga file, decodes it, and puts the decoded data in image_raw.
// Returns TRUE if successful.
-static LLFastTimer::DeclareTimer FTM_LOAD_IMAGE_RAW("loadImageRaw");
+static LLTrace::BlockTimerStatHandle FTM_LOAD_IMAGE_RAW("loadImageRaw");
BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw)
{
- LLFastTimer t(FTM_LOAD_IMAGE_RAW);
+ LL_RECORD_BLOCK_TIME(FTM_LOAD_IMAGE_RAW);
BOOL success = FALSE;
std::string path;
path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name);
diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp
index 6aae9a8cc1..f1f7d07fa9 100644
--- a/indra/llappearance/lltexlayerparams.cpp
+++ b/indra/llappearance/lltexlayerparams.cpp
@@ -35,6 +35,7 @@
#include "lltexturemanagerbridge.h"
#include "../llui/llui.h"
#include "llwearable.h"
+#include "llfasttimer.h"
//-----------------------------------------------------------------------------
// LLTexLayerParam
@@ -49,7 +50,7 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
else
{
- llerrs << "LLTexLayerParam constructor passed with NULL reference for layer!" << llendl;
+ LL_ERRS() << "LLTexLayerParam constructor passed with NULL reference for layer!" << LL_ENDL;
}
}
@@ -86,7 +87,7 @@ void LLTexLayerParamAlpha::dumpCacheByteCount()
{
S32 gl_bytes = 0;
getCacheByteCount( &gl_bytes);
- llinfos << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << llendl;
+ LL_INFOS() << "Processed Alpha Texture Cache GL:" << (gl_bytes/1024) << "KB" << LL_ENDL;
}
// static
@@ -238,10 +239,10 @@ BOOL LLTexLayerParamAlpha::getSkip() const
}
-static LLFastTimer::DeclareTimer FTM_TEX_LAYER_PARAM_ALPHA("alpha render");
+static LLTrace::BlockTimerStatHandle FTM_TEX_LAYER_PARAM_ALPHA("alpha render");
BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
{
- LLFastTimer t(FTM_TEX_LAYER_PARAM_ALPHA);
+ LL_RECORD_BLOCK_TIME(FTM_TEX_LAYER_PARAM_ALPHA);
BOOL success = TRUE;
if (!mTexLayer)
@@ -278,7 +279,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
if (mStaticImageTGA.isNull())
{
- llwarns << "Unable to load static file: " << info->mStaticImageFileName << llendl;
+ LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL;
mStaticImageInvalid = TRUE; // don't try again.
return FALSE;
}
@@ -309,7 +310,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mStaticImageRaw = new LLImageRaw;
mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight);
mNeedsCreateTexture = TRUE;
- lldebugs << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << llendl;
+ LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL;
}
if (mCachedProcessedTexture)
@@ -380,7 +381,7 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node)
}
// else
// {
-// llwarns << " element is missing tga_file attribute." << llendl;
+// LL_WARNS() << " element is missing tga_file attribute." << LL_ENDL;
// }
static LLStdStringHandle multiply_blend_string = LLXmlTree::addAttributeString("multiply_blend");
@@ -481,7 +482,7 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake)
}
}
-// llinfos << "param " << mName << " = " << new_weight << llendl;
+// LL_INFOS() << "param " << mName << " = " << new_weight << LL_ENDL;
}
}
@@ -556,13 +557,13 @@ BOOL LLTexLayerParamColorInfo::parseXml(LLXmlTreeNode *node)
}
if (!mNumColors)
{
- llwarns << " is missing sub-elements" << llendl;
+ LL_WARNS() << " is missing sub-elements" << LL_ENDL;
return FALSE;
}
if ((mOperation == LLTexLayerParamColor::OP_BLEND) && (mNumColors != 1))
{
- llwarns << " with operation\"blend\" must have exactly one " << llendl;
+ LL_WARNS() << " with operation\"blend\" must have exactly one " << LL_ENDL;
return FALSE;
}
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index d86a460511..389505fa34 100644
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -33,6 +33,7 @@
#include "llvisualparam.h"
#include "llavatarappearancedefines.h"
#include "llwearable.h"
+#include "boost/bind.hpp"
using namespace LLAvatarAppearanceDefines;
@@ -149,7 +150,7 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
{
if( !param->linkDrivenParams(boost::bind(param_function,avatarp,_1 ), true))
{
- llwarns << "could not link driven params for wearable " << getName() << " id: " << param->getID() << llendl;
+ LL_WARNS() << "could not link driven params for wearable " << getName() << " id: " << param->getID() << LL_ENDL;
continue;
}
}
@@ -173,7 +174,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
}
else
{
- llerrs << "could not find layerset for LTO in wearable!" << llendl;
+ LL_ERRS() << "could not find layerset for LTO in wearable!" << LL_ENDL;
}
}
@@ -207,7 +208,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// read header and version
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Failed to read wearable asset input stream." << llendl;
+ LL_WARNS() << "Failed to read wearable asset input stream." << LL_ENDL;
return LLWearable::FAILURE;
}
if ( 1 != sscanf( /* Flawfinder: ignore */
@@ -225,15 +226,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// these wearables get re-saved with version definition 22.
if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion && mDefinitionVersion != 24 )
{
- llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl;
+ LL_WARNS() << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << LL_ENDL;
return LLWearable::FAILURE;
}
// name may be empty
if (!input_stream.good())
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading name" << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading name" << LL_ENDL;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
@@ -242,8 +243,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// description may be empty
if (!input_stream.good())
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading description" << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading description" << LL_ENDL;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
@@ -252,15 +253,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// permissions may have extra empty lines before the correct line
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading permissions" << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading permissions" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 perm_version = -1;
if ( 1 != sscanf( buffer, " permissions %d\n", &perm_version ) ||
perm_version != 0 )
{
- llwarns << "Bad Wearable asset: missing valid permissions" << llendl;
+ LL_WARNS() << "Bad Wearable asset: missing valid permissions" << LL_ENDL;
return LLWearable::FAILURE;
}
if( !mPermissions.importLegacyStream( input_stream ) )
@@ -271,15 +272,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// sale info
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading sale info" << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading sale info" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 sale_info_version = -1;
if ( 1 != sscanf( buffer, " sale_info %d\n", &sale_info_version ) ||
sale_info_version != 0 )
{
- llwarns << "Bad Wearable asset: missing valid sale_info" << llendl;
+ LL_WARNS() << "Bad Wearable asset: missing valid sale_info" << LL_ENDL;
return LLWearable::FAILURE;
}
// Sale info used to contain next owner perm. It is now in the
@@ -305,14 +306,14 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// wearable type
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading type" << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading type" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 type = -1;
if ( 1 != sscanf( buffer, "type %d\n", &type ) )
{
- llwarns << "Bad Wearable asset: bad type" << llendl;
+ LL_WARNS() << "Bad Wearable asset: bad type" << LL_ENDL;
return LLWearable::FAILURE;
}
if( 0 <= type && type < LLWearableType::WT_COUNT )
@@ -322,36 +323,36 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
else
{
mType = LLWearableType::WT_COUNT;
- llwarns << "Bad Wearable asset: bad type #" << type << llendl;
+ LL_WARNS() << "Bad Wearable asset: bad type #" << type << LL_ENDL;
return LLWearable::FAILURE;
}
// parameters header
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading parameters header" << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading parameters header" << LL_ENDL;
return LLWearable::FAILURE;
}
S32 num_parameters = -1;
if ( 1 != sscanf( buffer, "parameters %d\n", &num_parameters ) )
{
- llwarns << "Bad Wearable asset: missing parameters block" << llendl;
+ LL_WARNS() << "Bad Wearable asset: missing parameters block" << LL_ENDL;
return LLWearable::FAILURE;
}
if ( num_parameters > MAX_WEARABLE_ASSET_PARAMETERS )
{
- llwarns << "Bad Wearable asset: too many parameters, "
- << num_parameters << llendl;
+ LL_WARNS() << "Bad Wearable asset: too many parameters, "
+ << num_parameters << LL_ENDL;
return LLWearable::FAILURE;
}
if( num_parameters != mVisualParamIndexMap.size() )
{
- llwarns << "Wearable parameter mismatch. Reading in "
+ LL_WARNS() << "Wearable parameter mismatch. Reading in "
<< num_parameters << " from file, but created "
<< mVisualParamIndexMap.size()
<< " from avatar parameters. type: "
- << getType() << llendl;
+ << getType() << LL_ENDL;
}
// parameters
@@ -360,15 +361,15 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
{
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading parameter #" << i << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading parameter #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
S32 param_id = 0;
F32 param_weight = 0.f;
if ( 2 != sscanf( buffer, "%d %f\n", ¶m_id, ¶m_weight ) )
{
- llwarns << "Bad Wearable asset: bad parameter, #" << i << llendl;
+ LL_WARNS() << "Bad Wearable asset: bad parameter, #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
mSavedVisualParamMap[param_id] = param_weight;
@@ -377,20 +378,20 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// textures header
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading textures header" << i << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading textures header" << i << LL_ENDL;
return LLWearable::FAILURE;
}
S32 num_textures = -1;
if ( 1 != sscanf( buffer, "textures %d\n", &num_textures) )
{
- llwarns << "Bad Wearable asset: missing textures block" << llendl;
+ LL_WARNS() << "Bad Wearable asset: missing textures block" << LL_ENDL;
return LLWearable::FAILURE;
}
if ( num_textures > MAX_WEARABLE_ASSET_TEXTURES )
{
- llwarns << "Bad Wearable asset: too many textures, "
- << num_textures << llendl;
+ LL_WARNS() << "Bad Wearable asset: too many textures, "
+ << num_textures << LL_ENDL;
return LLWearable::FAILURE;
}
@@ -399,8 +400,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
{
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
- llwarns << "Bad Wearable asset: early end of input stream "
- << "while reading textures #" << i << llendl;
+ LL_WARNS() << "Bad Wearable asset: early end of input stream "
+ << "while reading textures #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
S32 te = 0;
@@ -409,14 +410,14 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
"%d %36s\n",
&te, uuid_buffer) )
{
- llwarns << "Bad Wearable asset: bad texture, #" << i << llendl;
+ LL_WARNS() << "Bad Wearable asset: bad texture, #" << i << LL_ENDL;
return LLWearable::FAILURE;
}
if( !LLUUID::validate( uuid_buffer ) )
{
- llwarns << "Bad Wearable asset: bad texture uuid: "
- << uuid_buffer << llendl;
+ LL_WARNS() << "Bad Wearable asset: bad texture uuid: "
+ << uuid_buffer << LL_ENDL;
return LLWearable::FAILURE;
}
LLUUID id = LLUUID(uuid_buffer);
@@ -655,7 +656,7 @@ void LLWearable::setVisualParamWeight(S32 param_index, F32 value, BOOL upload_ba
}
else
{
- llerrs << "LLWearable::setVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << llendl;
+ LL_ERRS() << "LLWearable::setVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << LL_ENDL;
}
}
@@ -668,7 +669,7 @@ F32 LLWearable::getVisualParamWeight(S32 param_index) const
}
else
{
- llwarns << "LLWerable::getVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << llendl;
+ LL_WARNS() << "LLWerable::getVisualParam passed invalid parameter index: " << param_index << " for wearable type: " << this->getName() << LL_ENDL;
}
return (F32)-1.0;
}
diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h
index 6f5a1e14e8..132c153bcd 100644
--- a/indra/llappearance/llwearable.h
+++ b/indra/llappearance/llwearable.h
@@ -28,16 +28,15 @@
#define LL_LLWEARABLE_H
#include "llavatarappearancedefines.h"
-#include "llextendedstatus.h"
#include "llpermissions.h"
#include "llsaleinfo.h"
#include "llwearabletype.h"
-#include "lllocaltextureobject.h"
class LLMD5;
class LLVisualParam;
class LLTexGlobalColorInfo;
class LLTexGlobalColor;
+class LLLocalTextureObject;
class LLAvatarAppearance;
// Abstract class.
diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp
index 68fdcca782..089370dbc4 100644
--- a/indra/llappearance/llwearabledata.cpp
+++ b/indra/llappearance/llwearabledata.cpp
@@ -75,13 +75,13 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL
wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
- llwarns << "invalid type, type " << type << " index " << index << llendl;
+ LL_WARNS() << "invalid type, type " << type << " index " << index << LL_ENDL;
return;
}
wearableentry_vec_t& wearable_vec = wearable_iter->second;
if (index>=wearable_vec.size())
{
- llwarns << "invalid index, type " << type << " index " << index << llendl;
+ LL_WARNS() << "invalid index, type " << type << " index " << index << LL_ENDL;
}
else
{
@@ -99,7 +99,7 @@ U32 LLWearableData::pushWearable(const LLWearableType::EType type,
if (wearable == NULL)
{
// no null wearables please!
- llwarns << "Null wearable sent for type " << type << llendl;
+ LL_WARNS() << "Null wearable sent for type " << type << LL_ENDL;
return MAX_CLOTHING_PER_TYPE;
}
if (type < LLWearableType::WT_COUNT || mWearableDatas[type].size() < MAX_CLOTHING_PER_TYPE)
@@ -221,7 +221,7 @@ U32 LLWearableData::getWearableIndex(const LLWearable *wearable) const
wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
- llwarns << "tried to get wearable index with an invalid type!" << llendl;
+ LL_WARNS() << "tried to get wearable index with an invalid type!" << LL_ENDL;
return MAX_CLOTHING_PER_TYPE;
}
const wearableentry_vec_t& wearable_vec = wearable_iter->second;
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index 6c97a64ed7..79eb58d24d 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -40,6 +40,8 @@
#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"
+#include
+#include
extern LLAudioEngine *gAudiop;
@@ -113,7 +115,7 @@ size_t vfs_read(void *ptr, size_t size, size_t nmemb, void *datasource)
}
}
-int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
+S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence)
{
LLVFile *file = (LLVFile *)datasource;
@@ -135,7 +137,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
origin = -1;
break;
default:
- llerrs << "Invalid whence argument to vfs_seek" << llendl;
+ LL_ERRS() << "Invalid whence argument to vfs_seek" << LL_ENDL;
return -1;
}
@@ -149,7 +151,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
}
}
-int vfs_close (void *datasource)
+S32 vfs_close (void *datasource)
{
LLVFile *file = (LLVFile *)datasource;
delete file;
@@ -197,21 +199,21 @@ BOOL LLVorbisDecodeState::initDecode()
vfs_callbacks.close_func = vfs_close;
vfs_callbacks.tell_func = vfs_tell;
- //llinfos << "Initing decode from vfile: " << mUUID << llendl;
+ //LL_INFOS() << "Initing decode from vfile: " << mUUID << LL_ENDL;
mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND);
if (!mInFilep || !mInFilep->getSize())
{
- llwarns << "unable to open vorbis source vfile for reading" << llendl;
+ LL_WARNS() << "unable to open vorbis source vfile for reading" << LL_ENDL;
delete mInFilep;
mInFilep = NULL;
return FALSE;
}
- int r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
+ S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
if(r < 0)
{
- llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl;
+ LL_WARNS() << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL;
return(FALSE);
}
@@ -229,36 +231,36 @@ BOOL LLVorbisDecodeState::initDecode()
if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS )
{
abort_decode = true;
- llwarns << "Bad channel count: " << vi->channels << llendl;
+ LL_WARNS() << "Bad channel count: " << vi->channels << LL_ENDL;
}
}
else // !vi
{
abort_decode = true;
- llwarns << "No default bitstream found" << llendl;
+ LL_WARNS() << "No default bitstream found" << LL_ENDL;
}
if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES ||
(size_t)sample_count <= 0)
{
abort_decode = true;
- llwarns << "Illegal sample count: " << sample_count << llendl;
+ LL_WARNS() << "Illegal sample count: " << sample_count << LL_ENDL;
}
if( size_guess > LLVORBIS_CLIP_REJECT_SIZE ||
size_guess < 0)
{
abort_decode = true;
- llwarns << "Illegal sample size: " << size_guess << llendl;
+ LL_WARNS() << "Illegal sample size: " << size_guess << LL_ENDL;
}
if( abort_decode )
{
- llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl;
+ LL_WARNS() << "Canceling initDecode. Bad asset: " << mUUID << LL_ENDL;
vorbis_comment* comment = ov_comment(&mVF,-1);
if (comment && comment->vendor)
{
- llwarns << "Bad asset encoded by: " << comment->vendor << llendl;
+ LL_WARNS() << "Bad asset encoded by: " << comment->vendor << LL_ENDL;
}
delete mInFilep;
mInFilep = NULL;
@@ -359,12 +361,12 @@ BOOL LLVorbisDecodeState::decodeSection()
{
if (!mInFilep)
{
- llwarns << "No VFS file to decode in vorbis!" << llendl;
+ LL_WARNS() << "No VFS file to decode in vorbis!" << LL_ENDL;
return TRUE;
}
if (mDone)
{
-// llwarns << "Already done with decode, aborting!" << llendl;
+// LL_WARNS() << "Already done with decode, aborting!" << LL_ENDL;
return TRUE;
}
char pcmout[4096]; /*Flawfinder: ignore*/
@@ -377,14 +379,14 @@ BOOL LLVorbisDecodeState::decodeSection()
eof = TRUE;
mDone = TRUE;
mValid = TRUE;
-// llinfos << "Vorbis EOF" << llendl;
+// LL_INFOS() << "Vorbis EOF" << LL_ENDL;
}
else if (ret < 0)
{
/* error in the stream. Not a problem, just reporting it in
case we (the app) cares. In this case, we don't. */
- llwarns << "BAD vorbis decode in decodeSection." << llendl;
+ LL_WARNS() << "BAD vorbis decode in decodeSection." << LL_ENDL;
mValid = FALSE;
mDone = TRUE;
@@ -393,7 +395,7 @@ BOOL LLVorbisDecodeState::decodeSection()
}
else
{
-// llinfos << "Vorbis read " << ret << "bytes" << llendl;
+// LL_INFOS() << "Vorbis read " << ret << "bytes" << LL_ENDL;
/* we don't bother dealing with sample rate changes, etc, but.
you'll have to*/
std::copy(pcmout, pcmout+ret, std::back_inserter(mWAVBuffer));
@@ -405,7 +407,7 @@ BOOL LLVorbisDecodeState::finishDecode()
{
if (!isValid())
{
- llwarns << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << llendl;
+ LL_WARNS() << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL;
return TRUE; // We've finished
}
@@ -480,7 +482,7 @@ BOOL LLVorbisDecodeState::finishDecode()
if (36 == data_length)
{
- llwarns << "BAD Vorbis decode in finishDecode!" << llendl;
+ LL_WARNS() << "BAD Vorbis decode in finishDecode!" << LL_ENDL;
mValid = FALSE;
return TRUE; // we've finished
}
@@ -497,7 +499,7 @@ BOOL LLVorbisDecodeState::finishDecode()
{
if (mBytesRead == 0)
{
- llwarns << "Unable to write file in LLVorbisDecodeState::finishDecode" << llendl;
+ LL_WARNS() << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL;
mValid = FALSE;
return TRUE; // we've finished
}
@@ -515,7 +517,7 @@ BOOL LLVorbisDecodeState::finishDecode()
LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV);
output.write(&mWAVBuffer[0], mWAVBuffer.size());
#endif
- //llinfos << "Finished decode for " << getUUID() << llendl;
+ //LL_INFOS() << "Finished decode for " << getUUID() << LL_ENDL;
return TRUE;
}
@@ -524,7 +526,7 @@ void LLVorbisDecodeState::flushBadFile()
{
if (mInFilep)
{
- llwarns << "Flushing bad vorbis file from VFS for " << mUUID << llendl;
+ LL_WARNS() << "Flushing bad vorbis file from VFS for " << mUUID << LL_ENDL;
mInFilep->remove();
}
}
@@ -541,7 +543,7 @@ public:
void processQueue(const F32 num_secs = 0.005);
protected:
- LLLinkedQueue mDecodeQueue;
+ std::deque mDecodeQueue;
LLPointer mCurrentDecodep;
};
@@ -568,7 +570,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (mCurrentDecodep->isDone() && !mCurrentDecodep->isValid())
{
// We had an error when decoding, abort.
- llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl;
+ LL_WARNS() << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << LL_ENDL;
mCurrentDecodep->flushBadFile();
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
adp->setHasValidData(false);
@@ -590,7 +592,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
if (!adp)
{
- llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl;
+ LL_WARNS() << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << LL_ENDL;
}
else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone())
{
@@ -601,12 +603,12 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
// At this point, we could see if anyone needs this sound immediately, but
// I'm not sure that there's a reason to - we need to poll all of the playing
// sounds anyway.
- //llinfos << "Finished the vorbis decode, now what?" << llendl;
+ //LL_INFOS() << "Finished the vorbis decode, now what?" << LL_ENDL;
}
else
{
adp->setHasCompletedDecode(true);
- llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl;
+ LL_INFOS() << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << LL_ENDL;
}
mCurrentDecodep = NULL;
}
@@ -616,7 +618,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (!done)
{
- if (!mDecodeQueue.getLength())
+ if (mDecodeQueue.empty())
{
// Nothing else on the queue.
done = TRUE;
@@ -624,14 +626,15 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
else
{
LLUUID uuid;
- mDecodeQueue.pop(uuid);
+ uuid = mDecodeQueue.front();
+ mDecodeQueue.pop_front();
if (gAudiop->hasDecodedFile(uuid))
{
// This file has already been decoded, don't decode it again.
continue;
}
- lldebugs << "Decoding " << uuid << " from audio queue!" << llendl;
+ LL_DEBUGS() << "Decoding " << uuid << " from audio queue!" << LL_ENDL;
std::string uuid_str;
std::string d_path;
@@ -674,19 +677,19 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
if (gAudiop->hasDecodedFile(uuid))
{
// Already have a decoded version, don't need to decode it.
- //llinfos << "addDecodeRequest for " << uuid << " has decoded file already" << llendl;
+ //LL_INFOS() << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL;
return TRUE;
}
if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
{
// Just put it on the decode queue.
- //llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl;
- mImpl->mDecodeQueue.push(uuid);
+ //LL_INFOS() << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
+ mImpl->mDecodeQueue.push_back(uuid);
return TRUE;
}
- //llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl;
+ //LL_INFOS() << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL;
return FALSE;
}
diff --git a/indra/llaudio/llaudiodecodemgr.h b/indra/llaudio/llaudiodecodemgr.h
index e42fe8a40d..7a9b807d04 100755
--- a/indra/llaudio/llaudiodecodemgr.h
+++ b/indra/llaudio/llaudiodecodemgr.h
@@ -28,7 +28,6 @@
#include "stdtypes.h"
-#include "lllinkedqueue.h"
#include "lluuid.h"
#include "llassettype.h"
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 06e752cf34..399333d994 100755
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -123,7 +123,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata)
// Initialize the decode manager
gAudioDecodeMgrp = new LLAudioDecodeMgr;
- llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl;
+ LL_INFOS() << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL;
return true;
}
@@ -187,7 +187,7 @@ void LLAudioEngine::stopInternetStream()
}
// virtual
-void LLAudioEngine::pauseInternetStream(int pause)
+void LLAudioEngine::pauseInternetStream(S32 pause)
{
if (mStreamingAudioImpl)
mStreamingAudioImpl->pause(pause);
@@ -308,7 +308,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
LLAudioChannel *channelp = getFreeChannel(max_priority);
if (channelp)
{
- //llinfos << "Replacing source in channel due to priority!" << llendl;
+ //LL_INFOS() << "Replacing source in channel due to priority!" << LL_ENDL;
max_sourcep->setChannel(channelp);
channelp->setSource(max_sourcep);
if (max_sourcep->isSyncSlave())
@@ -479,7 +479,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
{
if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f)
{
- //llinfos << "Flushing unused buffer!" << llendl;
+ //LL_INFOS() << "Flushing unused buffer!" << LL_ENDL;
mBuffers[i]->mAudioDatap->mBufferp = NULL;
delete mBuffers[i];
mBuffers[i] = NULL;
@@ -591,8 +591,8 @@ LLAudioBuffer * LLAudioEngine::getFreeBuffer()
if (buffer_id >= 0)
{
- lldebugs << "Taking over unused buffer " << buffer_id << llendl;
- //llinfos << "Flushing unused buffer!" << llendl;
+ LL_DEBUGS() << "Taking over unused buffer " << buffer_id << LL_ENDL;
+ //LL_INFOS() << "Flushing unused buffer!" << LL_ENDL;
mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL;
delete mBuffers[buffer_id];
mBuffers[buffer_id] = createBuffer();
@@ -684,7 +684,7 @@ bool LLAudioEngine::preloadSound(const LLUUID &uuid)
// At some point we need to have the audio/asset system check the static VFS
// before it goes off and fetches stuff from the server.
- //llwarns << "Used internal preload for non-local sound" << llendl;
+ //LL_WARNS() << "Used internal preload for non-local sound" << LL_ENDL;
return false;
}
@@ -815,7 +815,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
const S32 type, const LLVector3d &pos_global)
{
// Create a new source (since this can't be associated with an existing source.
- //llinfos << "Localized: " << audio_uuid << llendl;
+ //LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL;
if (mMuted)
{
@@ -982,7 +982,7 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp)
iter = mAllSources.find(asp->getID());
if (iter == mAllSources.end())
{
- llwarns << "Cleaning up unknown audio source!" << llendl;
+ LL_WARNS() << "Cleaning up unknown audio source!" << LL_ENDL;
return;
}
delete asp;
@@ -1019,10 +1019,10 @@ bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)
void LLAudioEngine::startNextTransfer()
{
- //llinfos << "LLAudioEngine::startNextTransfer()" << llendl;
+ //LL_INFOS() << "LLAudioEngine::startNextTransfer()" << LL_ENDL;
if (mCurrentTransfer.notNull() || getMuted())
{
- //llinfos << "Transfer in progress, aborting" << llendl;
+ //LL_INFOS() << "Transfer in progress, aborting" << LL_ENDL;
return;
}
@@ -1203,7 +1203,7 @@ void LLAudioEngine::startNextTransfer()
if (asset_id.notNull())
{
- llinfos << "Getting asset data for: " << asset_id << llendl;
+ LL_INFOS() << "Getting asset data for: " << asset_id << LL_ENDL;
gAudiop->mCurrentTransfer = asset_id;
gAudiop->mCurrentTransferTimer.reset();
gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND,
@@ -1211,7 +1211,7 @@ void LLAudioEngine::startNextTransfer()
}
else
{
- //llinfos << "No pending transfers?" << llendl;
+ //LL_INFOS() << "No pending transfers?" << LL_ENDL;
}
}
@@ -1221,7 +1221,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
{
if (result_code)
{
- llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl;
+ LL_INFOS() << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << LL_ENDL;
// Need to mark data as bad to avoid constant rerequests.
LLAudioData *adp = gAudiop->getAudioData(uuid);
if (adp)
@@ -1238,11 +1238,11 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
if (!adp)
{
// Should never happen
- llwarns << "Got asset callback without audio data for " << uuid << llendl;
+ LL_WARNS() << "Got asset callback without audio data for " << uuid << LL_ENDL;
}
else
{
- // llinfos << "Got asset callback with good audio data for " << uuid << ", making decode request" << llendl;
+ // LL_INFOS() << "Got asset callback with good audio data for " << uuid << ", making decode request" << LL_ENDL;
adp->setHasValidData(true);
adp->setHasLocalData(true);
gAudioDecodeMgrp->addDecodeRequest(uuid);
@@ -1321,7 +1321,7 @@ void LLAudioSource::update()
}
else if (adp->hasCompletedDecode()) // Only mark corrupted after decode is done
{
- llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
+ LL_WARNS() << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL;
mCorrupted = true ;
}
}
@@ -1357,7 +1357,7 @@ bool LLAudioSource::setupChannel()
if (!adp->getBuffer())
{
// We're not ready to play back the sound yet, so don't try and allocate a channel for it.
- //llwarns << "Aborting, no buffer" << llendl;
+ //LL_WARNS() << "Aborting, no buffer" << LL_ENDL;
return false;
}
@@ -1375,7 +1375,7 @@ bool LLAudioSource::setupChannel()
// Ugh, we don't have any free channels.
// Now we have to reprioritize.
// For now, just don't play the sound.
- //llwarns << "Aborting, no free channels" << llendl;
+ //LL_WARNS() << "Aborting, no free channels" << LL_ENDL;
return false;
}
@@ -1474,7 +1474,7 @@ bool LLAudioSource::isDone() const
{
// We don't have a channel assigned, and it's been
// over 15 seconds since we tried to play it. Don't bother.
- //llinfos << "No channel assigned, source is done" << llendl;
+ //LL_INFOS() << "No channel assigned, source is done" << LL_ENDL;
return true;
}
else
@@ -1640,7 +1640,7 @@ LLAudioChannel::LLAudioChannel() :
LLAudioChannel::~LLAudioChannel()
{
// Need to disconnect any sources which are using this channel.
- //llinfos << "Cleaning up audio channel" << llendl;
+ //LL_INFOS() << "Cleaning up audio channel" << LL_ENDL;
if (mCurrentSourcep)
{
mCurrentSourcep->setChannel(NULL);
@@ -1651,12 +1651,12 @@ LLAudioChannel::~LLAudioChannel()
void LLAudioChannel::setSource(LLAudioSource *sourcep)
{
- //llinfos << this << ": setSource(" << sourcep << ")" << llendl;
+ //LL_INFOS() << this << ": setSource(" << sourcep << ")" << LL_ENDL;
if (!sourcep)
{
// Clearing the source for this channel, don't need to do anything.
- //llinfos << "Clearing source for channel" << llendl;
+ //LL_INFOS() << "Clearing source for channel" << LL_ENDL;
cleanup();
mCurrentSourcep = NULL;
mWaiting = false;
@@ -1666,7 +1666,7 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep)
if (sourcep == mCurrentSourcep)
{
// Don't reallocate the channel, this will make FMOD goofy.
- //llinfos << "Calling setSource with same source!" << llendl;
+ //LL_INFOS() << "Calling setSource with same source!" << LL_ENDL;
}
mCurrentSourcep = sourcep;
@@ -1768,7 +1768,7 @@ bool LLAudioData::load()
if (mBufferp)
{
// We already have this sound in a buffer, don't do anything.
- llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl;
+ LL_INFOS() << "Already have a buffer for this sound, don't bother loading!" << LL_ENDL;
return true;
}
@@ -1776,7 +1776,7 @@ bool LLAudioData::load()
if (!mBufferp)
{
// No free buffers, abort.
- llinfos << "Not able to allocate a new audio buffer, aborting." << llendl;
+ LL_INFOS() << "Not able to allocate a new audio buffer, aborting." << LL_ENDL;
return true;
}
diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index da1629a1db..f1e1b4e308 100755
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -88,7 +88,7 @@ public:
enum LLAudioPlayState
{
- // isInternetStreamPlaying() returns an *int*, with
+ // isInternetStreamPlaying() returns an *S32*, with
// 0 = stopped, 1 = playing, 2 = paused.
AUDIO_STOPPED = 0,
AUDIO_PLAYING = 1,
@@ -160,7 +160,7 @@ public:
// Internet stream methods - these will call down into the *mStreamingAudioImpl if it exists
void startInternetStream(const std::string& url);
void stopInternetStream();
- void pauseInternetStream(int pause);
+ void pauseInternetStream(S32 pause);
void updateInternetStream(); // expected to be called often
LLAudioPlayState isInternetStreamPlaying();
// use a value from 0.0 to 1.0, inclusive
diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp
index e9b74b8f41..6bbabbed5a 100644
--- a/indra/llaudio/llaudioengine_fmodex.cpp
+++ b/indra/llaudio/llaudioengine_fmodex.cpp
@@ -67,7 +67,7 @@ inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string)
{
if(result == FMOD_OK)
return false;
- lldebugs << string << " Error: " << FMOD_ErrorString(result) << llendl;
+ LL_DEBUGS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL;
return true;
}
@@ -75,11 +75,11 @@ void* F_STDCALL decode_alloc(unsigned int size, FMOD_MEMORY_TYPE type, const cha
{
if(type & FMOD_MEMORY_STREAM_DECODE)
{
- llinfos << "Decode buffer size: " << size << llendl;
+ LL_INFOS() << "Decode buffer size: " << size << LL_ENDL;
}
else if(type & FMOD_MEMORY_STREAM_FILE)
{
- llinfos << "Strean buffer size: " << size << llendl;
+ LL_INFOS() << "Strean buffer size: " << size << LL_ENDL;
}
return new char[size];
}
@@ -305,7 +305,7 @@ void LLAudioEngine_FMODEX::allocateListener(void)
mListenerp = (LLListener *) new LLListener_FMODEX(mSystem);
if (!mListenerp)
{
- llwarns << "Listener creation failed" << llendl;
+ LL_WARNS() << "Listener creation failed" << LL_ENDL;
}
}
@@ -314,16 +314,16 @@ void LLAudioEngine_FMODEX::shutdown()
{
stopInternetStream();
- llinfos << "About to LLAudioEngine::shutdown()" << llendl;
+ LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL;
LLAudioEngine::shutdown();
- llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl;
+ LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << LL_ENDL;
if ( mSystem ) // speculative fix for MAINT-2657
{
mSystem->close();
mSystem->release();
}
- llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl;
+ LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << LL_ENDL;
delete mListenerp;
mListenerp = NULL;
@@ -472,7 +472,7 @@ bool LLAudioChannelFMODEX::updateBuffer()
{
// This is bad, there should ALWAYS be a sound associated with a legit
// buffer.
- llerrs << "No FMOD sound!" << llendl;
+ LL_ERRS() << "No FMOD sound!" << LL_ENDL;
return false;
}
@@ -485,7 +485,7 @@ bool LLAudioChannelFMODEX::updateBuffer()
Check_FMOD_Error(result, "FMOD::System::playSound");
}
- //llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl;
+ //LL_INFOS() << "Setting up channel " << std::hex << mChannelID << std::dec << LL_ENDL;
}
// If we have a source for the channel, we need to update its gain.
@@ -502,8 +502,8 @@ bool LLAudioChannelFMODEX::updateBuffer()
{
S32 index;
mChannelp->getIndex(&index);
- llwarns << "Channel " << index << "Source ID: " << mCurrentSourcep->getID()
- << " at " << mCurrentSourcep->getPositionGlobal() << llendl;
+ LL_WARNS() << "Channel " << index << "Source ID: " << mCurrentSourcep->getID()
+ << " at " << mCurrentSourcep->getPositionGlobal() << LL_ENDL;
}*/
}
@@ -573,11 +573,11 @@ void LLAudioChannelFMODEX::cleanup()
{
if (!mChannelp)
{
- //llinfos << "Aborting cleanup with no channel handle." << llendl;
+ //LL_INFOS() << "Aborting cleanup with no channel handle." << LL_ENDL;
return;
}
- //llinfos << "Cleaning up channel: " << mChannelID << llendl;
+ //LL_INFOS() << "Cleaning up channel: " << mChannelID << LL_ENDL;
Check_FMOD_Error(mChannelp->stop(),"FMOD::Channel::stop");
mCurrentBufferp = NULL;
@@ -589,7 +589,7 @@ void LLAudioChannelFMODEX::play()
{
if (!mChannelp)
{
- llwarns << "Playing without a channel handle, aborting" << llendl;
+ LL_WARNS() << "Playing without a channel handle, aborting" << LL_ENDL;
return;
}
@@ -697,7 +697,7 @@ bool LLAudioBufferFMODEX::loadWAV(const std::string& filename)
if (result != FMOD_OK)
{
// We failed to load the file for some reason.
- llwarns << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << llendl;
+ LL_WARNS() << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << LL_ENDL;
//
// If we EVER want to load wav files provided by end users, we need
diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp
index 34a057dcc0..e6ac586618 100755
--- a/indra/llaudio/llaudioengine_openal.cpp
+++ b/indra/llaudio/llaudioengine_openal.cpp
@@ -59,33 +59,33 @@ bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata)
if(!alutInit(NULL, NULL))
{
- llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
return false;
}
- llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL;
- llinfos << "OpenAL version: "
- << ll_safe_string(alGetString(AL_VERSION)) << llendl;
- llinfos << "OpenAL vendor: "
- << ll_safe_string(alGetString(AL_VENDOR)) << llendl;
- llinfos << "OpenAL renderer: "
- << ll_safe_string(alGetString(AL_RENDERER)) << llendl;
+ LL_INFOS() << "OpenAL version: "
+ << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL;
+ LL_INFOS() << "OpenAL vendor: "
+ << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL;
+ LL_INFOS() << "OpenAL renderer: "
+ << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL;
ALint major = alutGetMajorVersion ();
ALint minor = alutGetMinorVersion ();
- llinfos << "ALUT version: " << major << "." << minor << llendl;
+ LL_INFOS() << "ALUT version: " << major << "." << minor << LL_ENDL;
ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext());
alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major);
alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor);
- llinfos << "ALC version: " << major << "." << minor << llendl;
+ LL_INFOS() << "ALC version: " << major << "." << minor << LL_ENDL;
- llinfos << "ALC default device: "
+ LL_INFOS() << "ALC default device: "
<< ll_safe_string(alcGetString(device,
ALC_DEFAULT_DEVICE_SPECIFIER))
- << llendl;
+ << LL_ENDL;
return true;
}
@@ -125,24 +125,24 @@ void LLAudioEngine_OpenAL::allocateListener()
mListenerp = (LLListener *) new LLListener_OpenAL();
if(!mListenerp)
{
- llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL;
}
}
// virtual
void LLAudioEngine_OpenAL::shutdown()
{
- llinfos << "About to LLAudioEngine::shutdown()" << llendl;
+ LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL;
LLAudioEngine::shutdown();
- llinfos << "About to alutExit()" << llendl;
+ LL_INFOS() << "About to alutExit()" << LL_ENDL;
if(!alutExit())
{
- llwarns << "Nuts." << llendl;
- llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl;
+ LL_WARNS() << "Nuts." << LL_ENDL;
+ LL_WARNS() << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
}
- llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL;
delete mListenerp;
mListenerp = NULL;
@@ -160,7 +160,7 @@ LLAudioChannel *LLAudioEngine_OpenAL::createChannel()
void LLAudioEngine_OpenAL::setInternalGain(F32 gain)
{
- //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl;
+ //LL_INFOS() << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL;
alListenerf(AL_GAIN, gain);
}
@@ -188,7 +188,7 @@ void LLAudioChannelOpenAL::play()
{
if (mALSource == AL_NONE)
{
- llwarns << "Playing without a mALSource, aborting" << llendl;
+ LL_WARNS() << "Playing without a mALSource, aborting" << LL_ENDL;
return;
}
@@ -213,8 +213,8 @@ void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp)
alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET,
&master_offset);
- llinfos << "Syncing with master at " << master_offset
- << "sec" << llendl;
+ LL_INFOS() << "Syncing with master at " << master_offset
+ << "sec" << LL_ENDL;
// *TODO: detect when this fails, maybe use AL_SAMPLE_
alSourcef(mALSource, AL_SEC_OFFSET, master_offset);
}
@@ -334,18 +334,18 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename)
ALenum error = alutGetError();
if (gDirUtilp->fileExists(filename))
{
- llwarns <<
+ LL_WARNS() <<
"LLAudioBufferOpenAL::loadWAV() Error loading "
<< filename
- << " " << alutGetErrorString(error) << llendl;
+ << " " << alutGetErrorString(error) << LL_ENDL;
}
else
{
// It's common for the file to not actually exist.
- lldebugs <<
+ LL_DEBUGS() <<
"LLAudioBufferOpenAL::loadWAV() Error loading "
<< filename
- << " " << alutGetErrorString(error) << llendl;
+ << " " << alutGetErrorString(error) << LL_ENDL;
}
return false;
}
@@ -369,7 +369,7 @@ U32 LLAudioBufferOpenAL::getLength()
bool LLAudioEngine_OpenAL::initWind()
{
ALenum error;
- llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL;
mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS;
@@ -379,7 +379,7 @@ bool LLAudioEngine_OpenAL::initWind()
if((error=alGetError()) != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<;
@@ -392,18 +392,18 @@ bool LLAudioEngine_OpenAL::initWind()
if(mWindBuf==NULL)
{
- llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl;
+ LL_ERRS() << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL;
return false;
}
- llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL;
return true;
}
void LLAudioEngine_OpenAL::cleanupWind()
{
- llinfos << "LLAudioEngine_OpenAL::cleanupWind()" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL;
if (mWindSource != AL_NONE)
{
@@ -479,7 +479,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed);
mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
- //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl;
+ //LL_INFOS() << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL;
while(processed--) // unqueue old buffers
{
@@ -490,7 +490,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
error = alGetError();
if(error != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL;
}
else
{
@@ -506,7 +506,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
alGenBuffers(1,&buffer);
if((error=alGetError()) != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << LL_ENDL;
break;
}
@@ -519,14 +519,14 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
error = alGetError();
if(error != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL;
}
alSourceQueueBuffers(mWindSource, 1, &buffer);
error = alGetError();
if(error != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL;
}
--mNumEmptyWindALBuffers;
@@ -538,7 +538,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
{
alSourcePlay(mWindSource);
- lldebugs << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl;
+ LL_DEBUGS() << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL;
}
}
diff --git a/indra/llaudio/lllistener_openal.cpp b/indra/llaudio/lllistener_openal.cpp
index b3d4b02f09..9dd4c86854 100755
--- a/indra/llaudio/lllistener_openal.cpp
+++ b/indra/llaudio/lllistener_openal.cpp
@@ -41,13 +41,13 @@ LLListener_OpenAL::~LLListener_OpenAL()
void LLListener_OpenAL::translate(LLVector3 offset)
{
- //llinfos << "LLListener_OpenAL::translate() : " << offset << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::translate() : " << offset << LL_ENDL;
LLListener::translate(offset);
}
void LLListener_OpenAL::setPosition(LLVector3 pos)
{
- //llinfos << "LLListener_OpenAL::setPosition() : " << pos << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::setPosition() : " << pos << LL_ENDL;
LLListener::setPosition(pos);
}
@@ -58,7 +58,7 @@ void LLListener_OpenAL::setVelocity(LLVector3 vel)
void LLListener_OpenAL::orient(LLVector3 up, LLVector3 at)
{
- //llinfos << "LLListener_OpenAL::orient() up: " << up << " at: " << at << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::orient() up: " << up << " at: " << at << LL_ENDL;
LLListener::orient(up, at);
}
@@ -84,7 +84,7 @@ void LLListener_OpenAL::commitDeferredChanges()
void LLListener_OpenAL::setDopplerFactor(F32 factor)
{
- //llinfos << "LLListener_OpenAL::setDopplerFactor() : " << factor << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::setDopplerFactor() : " << factor << LL_ENDL;
alDopplerFactor(factor);
}
@@ -92,7 +92,7 @@ F32 LLListener_OpenAL::getDopplerFactor()
{
ALfloat factor;
factor = alGetFloat(AL_DOPPLER_FACTOR);
- //llinfos << "LLListener_OpenAL::getDopplerFactor() : " << factor << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::getDopplerFactor() : " << factor << LL_ENDL;
return factor;
}
diff --git a/indra/llaudio/llstreamingaudio_fmodex.cpp b/indra/llaudio/llstreamingaudio_fmodex.cpp
index 42f30aa1c4..9c9e85c00c 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.cpp
+++ b/indra/llaudio/llstreamingaudio_fmodex.cpp
@@ -91,7 +91,7 @@ void LLStreamingAudio_FMODEX::start(const std::string& url)
{
//if (!mInited)
//{
- // llwarns << "startInternetStream before audio initialized" << llendl;
+ // LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL;
// return;
//}
@@ -100,13 +100,13 @@ void LLStreamingAudio_FMODEX::start(const std::string& url)
if (!url.empty())
{
- llinfos << "Starting internet stream: " << url << llendl;
+ LL_INFOS() << "Starting internet stream: " << url << LL_ENDL;
mCurrentInternetStreamp = new LLAudioStreamManagerFMODEX(mSystem,url);
mURL = url;
}
else
{
- llinfos << "Set internet stream to null" << llendl;
+ LL_INFOS() << "Set internet stream to null" << LL_ENDL;
mURL.clear();
}
}
@@ -121,7 +121,7 @@ void LLStreamingAudio_FMODEX::update()
LLAudioStreamManagerFMODEX *streamp = *iter;
if (streamp->stopStream())
{
- llinfos << "Closed dead stream" << llendl;
+ LL_INFOS() << "Closed dead stream" << LL_ENDL;
delete streamp;
mDeadStreams.erase(iter++);
}
@@ -181,7 +181,7 @@ void LLStreamingAudio_FMODEX::update()
{
if (!strcmp(tag.name, "Sample Rate Change"))
{
- llinfos << "Stream forced changing sample rate to " << *((float *)tag.data) << llendl;
+ LL_INFOS() << "Stream forced changing sample rate to " << *((float *)tag.data) << LL_ENDL;
mFMODInternetStreamChannelp->setFrequency(*((float *)tag.data));
}
continue;
@@ -195,9 +195,9 @@ void LLStreamingAudio_FMODEX::update()
mFMODInternetStreamChannelp->getPaused(&paused);
if(!paused)
{
- llinfos << "Stream starvation detected! Pausing stream until buffer nearly full." << llendl;
- llinfos << " (diskbusy="<setPaused(true);
}
}
@@ -220,14 +220,14 @@ void LLStreamingAudio_FMODEX::stop()
if (mCurrentInternetStreamp)
{
- llinfos << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << llendl;
+ LL_INFOS() << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << LL_ENDL;
if (mCurrentInternetStreamp->stopStream())
{
delete mCurrentInternetStreamp;
}
else
{
- llwarns << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << llendl;
+ LL_WARNS() << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << LL_ENDL;
mDeadStreams.push_back(mCurrentInternetStreamp);
}
mCurrentInternetStreamp = NULL;
@@ -314,9 +314,9 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con
if (result!= FMOD_OK)
{
- llwarns << "Couldn't open fmod stream, error "
+ LL_WARNS() << "Couldn't open fmod stream, error "
<< FMOD_ErrorString(result)
- << llendl;
+ << LL_ENDL;
mReady = false;
return;
}
@@ -329,7 +329,7 @@ FMOD::Channel *LLAudioStreamManagerFMODEX::startStream()
// We need a live and opened stream before we try and play it.
if (!mInternetStream || getOpenState() != FMOD_OPENSTATE_READY)
{
- llwarns << "No internet stream to start playing!" << llendl;
+ LL_WARNS() << "No internet stream to start playing!" << LL_ENDL;
return NULL;
}
diff --git a/indra/llaudio/llstreamingaudio_fmodex.h b/indra/llaudio/llstreamingaudio_fmodex.h
index 1dee18ae7d..2787840ba1 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.h
+++ b/indra/llaudio/llstreamingaudio_fmodex.h
@@ -49,9 +49,9 @@ class LLStreamingAudio_FMODEX : public LLStreamingAudioInterface
/*virtual*/ void start(const std::string& url);
/*virtual*/ void stop();
- /*virtual*/ void pause(int pause);
+ /*virtual*/ void pause(S32 pause);
/*virtual*/ void update();
- /*virtual*/ int isPlaying();
+ /*virtual*/ S32 isPlaying();
/*virtual*/ void setGain(F32 vol);
/*virtual*/ F32 getGain();
/*virtual*/ std::string getURL();
diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp
index dfd5da12b3..2e1ed9b505 100755
--- a/indra/llaudio/llvorbisencode.cpp
+++ b/indra/llaudio/llvorbisencode.cpp
@@ -127,7 +127,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
return(LLVORBISENC_CHUNK_SIZE_ERR);
}
-// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
+// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
{
@@ -224,7 +224,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
std::string error_msg;
if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg)))
{
- llwarns << error_msg << ": " << in_fname << llendl;
+ LL_WARNS() << error_msg << ": " << in_fname << LL_ENDL;
return(format_error);
}
@@ -237,8 +237,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
infile.open(in_fname,LL_APR_RB);
if (!infile.getFileHandle())
{
- llwarns << "Couldn't open temporary ogg file for writing: " << in_fname
- << llendl;
+ LL_WARNS() << "Couldn't open temporary ogg file for writing: " << in_fname
+ << LL_ENDL;
return(LLVORBISENC_SOURCE_OPEN_ERR);
}
@@ -246,8 +246,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
outfile.open(out_fname,LL_APR_WPB);
if (!outfile.getFileHandle())
{
- llwarns << "Couldn't open upload sound file for reading: " << in_fname
- << llendl;
+ LL_WARNS() << "Couldn't open upload sound file for reading: " << in_fname
+ << LL_ENDL;
return(LLVORBISENC_DEST_OPEN_ERR);
}
@@ -265,7 +265,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
+ ((U32) wav_header[5] << 8)
+ wav_header[4];
-// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
+// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
{
@@ -308,8 +308,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
// vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE_AVG,NULL) ||
// vorbis_encode_setup_init(&vi))
{
- llwarns << "unable to initialize vorbis codec at quality " << quality << llendl;
- // llwarns << "unable to initialize vorbis codec at bitrate " << bitrate << llendl;
+ LL_WARNS() << "unable to initialize vorbis codec at quality " << quality << LL_ENDL;
+ // LL_WARNS() << "unable to initialize vorbis codec at bitrate " << bitrate << LL_ENDL;
return(LLVORBISENC_DEST_OPEN_ERR);
}
@@ -498,7 +498,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
libvorbis. They're never freed or manipulated directly */
// fprintf(stderr,"Vorbis encoding: Done.\n");
- llinfos << "Vorbis encoding: Done." << llendl;
+ LL_INFOS() << "Vorbis encoding: Done." << LL_ENDL;
#endif
return(LLVORBISENC_NOERR);
diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h
index 84185c3f92..79cbcabdc1 100755
--- a/indra/llcharacter/llanimationstates.h
+++ b/indra/llcharacter/llanimationstates.h
@@ -29,7 +29,7 @@
#include