Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
NiranV
Black Dragon Viewer
Commits
87d22c63
Commit
87d22c63
authored
Feb 03, 2021
by
NiranV
Browse files
Options
Browse Files
Download
Plain Diff
Merged Linden Release.
parents
b73c2a1b
21565a1f
Changes
118
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1130 additions
and
368 deletions
+1130
-368
autobuild.xml
autobuild.xml
+10
-10
build.sh
build.sh
+2
-0
indra/llappearance/llavatarappearance.cpp
indra/llappearance/llavatarappearance.cpp
+28
-22
indra/llappearance/llavatarappearance.h
indra/llappearance/llavatarappearance.h
+5
-4
indra/llappearance/llavatarappearancedefines.cpp
indra/llappearance/llavatarappearancedefines.cpp
+7
-11
indra/llappearance/llavatarappearancedefines.h
indra/llappearance/llavatarappearancedefines.h
+8
-7
indra/llappearance/lltexlayer.cpp
indra/llappearance/lltexlayer.cpp
+3
-3
indra/llappearance/llwearable.cpp
indra/llappearance/llwearable.cpp
+2
-2
indra/llappearance/llwearabledata.cpp
indra/llappearance/llwearabledata.cpp
+2
-2
indra/llcorehttp/_httpoprequest.cpp
indra/llcorehttp/_httpoprequest.cpp
+4
-10
indra/llimage/llimage.cpp
indra/llimage/llimage.cpp
+22
-12
indra/llimage/llimage.h
indra/llimage/llimage.h
+15
-17
indra/llimage/llimagej2c.cpp
indra/llimage/llimagej2c.cpp
+2
-2
indra/llinventory/llinventory.h
indra/llinventory/llinventory.h
+1
-1
indra/llmath/llvolume.cpp
indra/llmath/llvolume.cpp
+3
-3
indra/llmessage/llavatarnamecache.cpp
indra/llmessage/llavatarnamecache.cpp
+17
-0
indra/llmessage/llavatarnamecache.h
indra/llmessage/llavatarnamecache.h
+4
-0
indra/llmessage/llproxy.cpp
indra/llmessage/llproxy.cpp
+28
-17
indra/llmessage/llproxy.h
indra/llmessage/llproxy.h
+7
-1
indra/llplugin/llpluginprocessparent.cpp
indra/llplugin/llpluginprocessparent.cpp
+12
-2
indra/llprimitive/lldaeloader.cpp
indra/llprimitive/lldaeloader.cpp
+2
-1
indra/llrender/llfontregistry.cpp
indra/llrender/llfontregistry.cpp
+3
-0
indra/llrender/llgl.cpp
indra/llrender/llgl.cpp
+74
-0
indra/llrender/llgl.h
indra/llrender/llgl.h
+2
-0
indra/llrender/llimagegl.cpp
indra/llrender/llimagegl.cpp
+9
-0
indra/llrender/llimagegl.h
indra/llrender/llimagegl.h
+2
-1
indra/llrender/llrender2dutils.h
indra/llrender/llrender2dutils.h
+1
-0
indra/llui/llfloater.cpp
indra/llui/llfloater.cpp
+4
-6
indra/llui/llfolderviewmodel.h
indra/llui/llfolderviewmodel.h
+1
-1
indra/llui/llscrolllistctrl.cpp
indra/llui/llscrolllistctrl.cpp
+50
-14
indra/llui/llurlentry.cpp
indra/llui/llurlentry.cpp
+41
-1
indra/llui/llurlentry.h
indra/llui/llurlentry.h
+14
-0
indra/llui/llurlregistry.cpp
indra/llui/llurlregistry.cpp
+1
-0
indra/llui/tests/llurlentry_test.cpp
indra/llui/tests/llurlentry_test.cpp
+34
-0
indra/llwindow/llwindow.h
indra/llwindow/llwindow.h
+4
-0
indra/llwindow/llwindowwin32.cpp
indra/llwindow/llwindowwin32.cpp
+41
-0
indra/llwindow/llwindowwin32.h
indra/llwindow/llwindowwin32.h
+3
-0
indra/llxml/llcontrol.cpp
indra/llxml/llcontrol.cpp
+18
-0
indra/llxml/llcontrol.h
indra/llxml/llcontrol.h
+2
-0
indra/newview/VIEWER_VERSION.txt
indra/newview/VIEWER_VERSION.txt
+1
-1
indra/newview/app_settings/settings.xml
indra/newview/app_settings/settings.xml
+22
-0
indra/newview/llagent.cpp
indra/newview/llagent.cpp
+23
-1
indra/newview/llagent.h
indra/newview/llagent.h
+2
-0
indra/newview/llappearancemgr.cpp
indra/newview/llappearancemgr.cpp
+2
-2
indra/newview/llappearancemgr.h
indra/newview/llappearancemgr.h
+1
-1
indra/newview/llappviewer.cpp
indra/newview/llappviewer.cpp
+151
-111
indra/newview/llappviewer.h
indra/newview/llappviewer.h
+3
-2
indra/newview/llcurrencyuimanager.cpp
indra/newview/llcurrencyuimanager.cpp
+5
-0
indra/newview/llcurrencyuimanager.h
indra/newview/llcurrencyuimanager.h
+2
-0
indra/newview/llenvironment.cpp
indra/newview/llenvironment.cpp
+12
-1
indra/newview/lleventpoll.cpp
indra/newview/lleventpoll.cpp
+9
-1
indra/newview/llfloateravatartextures.cpp
indra/newview/llfloateravatartextures.cpp
+4
-4
indra/newview/llfloaterbuycurrency.cpp
indra/newview/llfloaterbuycurrency.cpp
+1
-0
indra/newview/llfloaterdeleteprefpreset.cpp
indra/newview/llfloaterdeleteprefpreset.cpp
+11
-2
indra/newview/llfloaterimcontainer.cpp
indra/newview/llfloaterimcontainer.cpp
+15
-11
indra/newview/llfloaterimsession.cpp
indra/newview/llfloaterimsession.cpp
+0
-1
indra/newview/llfloaterjoystick.cpp
indra/newview/llfloaterjoystick.cpp
+133
-7
indra/newview/llfloaterjoystick.h
indra/newview/llfloaterjoystick.h
+10
-1
indra/newview/llfloaterloadprefpreset.cpp
indra/newview/llfloaterloadprefpreset.cpp
+11
-3
indra/newview/llfloatersidepanelcontainer.cpp
indra/newview/llfloatersidepanelcontainer.cpp
+13
-1
indra/newview/llfloatersidepanelcontainer.h
indra/newview/llfloatersidepanelcontainer.h
+2
-0
indra/newview/llgiveinventory.cpp
indra/newview/llgiveinventory.cpp
+2
-11
indra/newview/llimview.cpp
indra/newview/llimview.cpp
+50
-12
indra/newview/llinventorybridge.cpp
indra/newview/llinventorybridge.cpp
+3
-4
indra/newview/llinventorybridge.h
indra/newview/llinventorybridge.h
+1
-1
indra/newview/llinventoryfunctions.cpp
indra/newview/llinventoryfunctions.cpp
+10
-7
indra/newview/llinventorypanel.cpp
indra/newview/llinventorypanel.cpp
+33
-13
indra/newview/llinventorypanel.h
indra/newview/llinventorypanel.h
+17
-4
indra/newview/lllocationinputctrl.cpp
indra/newview/lllocationinputctrl.cpp
+0
-6
indra/newview/lllocationinputctrl.h
indra/newview/lllocationinputctrl.h
+0
-1
indra/newview/lllogininstance.cpp
indra/newview/lllogininstance.cpp
+1
-0
indra/newview/llmutelist.cpp
indra/newview/llmutelist.cpp
+78
-4
indra/newview/llmutelist.h
indra/newview/llmutelist.h
+5
-1
indra/newview/lloutputmonitorctrl.cpp
indra/newview/lloutputmonitorctrl.cpp
+7
-3
indra/newview/lloutputmonitorctrl.h
indra/newview/lloutputmonitorctrl.h
+2
-1
No files found.
autobuild.xml
View file @
87d22c63
...
...
@@ -244,9 +244,9 @@
<key>
archive
</key>
<map>
<key>
hash
</key>
<string>
322dd6c45c384d454ae14ef127984a4e
</string>
<string>
ae90d19cdcddf539f6d0b41cab12f918
</string>
<key>
url
</key>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/
65457/612879
/bugsplat-1.0.7.5
46418
-darwin64-5
46418
.tar.bz2
</string>
<string>
http
s
://automated-builds-secondlife-com.s3.amazonaws.com/ct2/
72773/702861
/bugsplat-1.0.7.5
52580
-darwin64-5
52580
.tar.bz2
</string>
</map>
<key>
name
</key>
<string>
darwin64
</string>
...
...
@@ -256,9 +256,9 @@
<key>
archive
</key>
<map>
<key>
hash
</key>
<string>
010a0e73c0fddaa2316411803fad8e69
</string>
<string>
f5936eceb6a33ff0f1cc31996a40f29c
</string>
<key>
url
</key>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/
65456/612876
/bugsplat-3.6.0.8.5
46418
-windows-5
46418
.tar.bz2
</string>
<string>
http
s
://automated-builds-secondlife-com.s3.amazonaws.com/ct2/
72774/702905
/bugsplat-3.6.0.8.5
52580
-windows-5
52580
.tar.bz2
</string>
</map>
<key>
name
</key>
<string>
windows
</string>
...
...
@@ -268,16 +268,16 @@
<key>
archive
</key>
<map>
<key>
hash
</key>
<string>
7e8530762e7b50663708a888c23b8780
</string>
<string>
9cd940754e53e0670030b3da5ba8f373
</string>
<key>
url
</key>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/
65455/612874
/bugsplat-3.6.0.8.5
46418
-windows64-5
46418
.tar.bz2
</string>
<string>
http
s
://automated-builds-secondlife-com.s3.amazonaws.com/ct2/
72775/702906
/bugsplat-3.6.0.8.5
52580
-windows64-5
52580
.tar.bz2
</string>
</map>
<key>
name
</key>
<string>
windows64
</string>
</map>
</map>
<key>
version
</key>
<string>
3.6.0.8.5
46418
</string>
<string>
3.6.0.8.5
52580
</string>
</map>
<key>
colladadom
</key>
<map>
...
...
@@ -2185,18 +2185,18 @@
<key>
archive
</key>
<map>
<key>
hash
</key>
<string>
9f4687d7d328b0c13a9e651e805e880a
</string>
<string>
c541838a933e0714a954e9ef6c89345d
</string>
<key>
hash_algorithm
</key>
<string>
md5
</string>
<key>
url
</key>
<string>
https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7
1501/691487
/llca-20201
1
01
0215.551526
-common-55
1526
.tar.bz2
</string>
<string>
https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7
3387/708088
/llca-20201
2
01
1600.553112
-common-55
3112
.tar.bz2
</string>
</map>
<key>
name
</key>
<string>
common
</string>
</map>
</map>
<key>
version
</key>
<string>
20201
1
01
0215.551526
</string>
<string>
20201
2
01
1600.553112
</string>
</map>
<key>
llphysicsextensions_source
</key>
<map>
...
...
build.sh
View file @
87d22c63
...
...
@@ -480,10 +480,12 @@ then
fi
# Run upload extensions
# Ex: bugsplat
if
[
-d
${
build_dir
}
/packages/upload-extensions
]
;
then
for
extension
in
${
build_dir
}
/packages/upload-extensions/
*
.sh
;
do
begin_section
"Upload Extension
$extension
"
.
$extension
[
$?
-eq
0
]
||
fatal
"Upload of extension
$extension
failed"
end_section
"Upload Extension
$extension
"
done
fi
...
...
indra/llappearance/llavatarappearance.cpp
View file @
87d22c63
...
...
@@ -173,10 +173,9 @@ LLAvatarAppearance::LLAvatarXmlInfo::~LLAvatarXmlInfo()
//-----------------------------------------------------------------------------
// Static Data
//-----------------------------------------------------------------------------
LLXmlTree
LLAvatarAppearance
::
sXMLTree
;
LLXmlTree
LLAvatarAppearance
::
sSkeletonXMLTree
;
LLAvatarSkeletonInfo
*
LLAvatarAppearance
::
sAvatarSkeletonInfo
=
NULL
;
LLAvatarAppearance
::
LLAvatarXmlInfo
*
LLAvatarAppearance
::
sAvatarXmlInfo
=
NULL
;
LLAvatarAppearanceDefines
::
LLAvatarAppearanceDictionary
*
LLAvatarAppearance
::
sAvatarDictionary
=
NULL
;
LLAvatarAppearance
::
LLAvatarAppearance
(
LLWearableData
*
wearable_data
)
:
...
...
@@ -204,7 +203,7 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mBakedTextureDatas
[
i
].
mIsLoaded
=
false
;
mBakedTextureDatas
[
i
].
mIsUsed
=
false
;
mBakedTextureDatas
[
i
].
mMaskTexName
=
0
;
mBakedTextureDatas
[
i
].
mTextureIndex
=
LLAvatarAppearanceDefines
::
LLAvatarAppearance
Dictionary
::
bakedToLocalTextureIndex
((
LLAvatarAppearanceDefines
::
EBakedTextureIndex
)
i
);
mBakedTextureDatas
[
i
].
mTextureIndex
=
sAvatar
Dictionary
->
bakedToLocalTextureIndex
((
LLAvatarAppearanceDefines
::
EBakedTextureIndex
)
i
);
}
}
...
...
@@ -217,8 +216,8 @@ void LLAvatarAppearance::initInstance()
mRoot
=
createAvatarJoint
();
mRoot
->
setName
(
"mRoot"
);
for
(
LLAvatarAppearanceDictionary
::
MeshEntries
::
const_iterator
iter
=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getMeshEntries
().
begin
();
iter
!=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getMeshEntries
().
end
();
for
(
LLAvatarAppearanceDictionary
::
MeshEntries
::
const_iterator
iter
=
s
Avatar
Dictionary
->
getMeshEntries
().
begin
();
iter
!=
s
Avatar
Dictionary
->
getMeshEntries
().
end
();
++
iter
)
{
const
EMeshIndex
mesh_index
=
iter
->
first
;
...
...
@@ -263,8 +262,8 @@ void LLAvatarAppearance::initInstance()
//-------------------------------------------------------------------------
// associate baked textures with meshes
//-------------------------------------------------------------------------
for
(
LLAvatarAppearanceDictionary
::
MeshEntries
::
const_iterator
iter
=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getMeshEntries
().
begin
();
iter
!=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getMeshEntries
().
end
();
for
(
LLAvatarAppearanceDictionary
::
MeshEntries
::
const_iterator
iter
=
s
Avatar
Dictionary
->
getMeshEntries
().
begin
();
iter
!=
s
Avatar
Dictionary
->
getMeshEntries
().
end
();
++
iter
)
{
const
EMeshIndex
mesh_index
=
iter
->
first
;
...
...
@@ -338,6 +337,12 @@ void LLAvatarAppearance::initClass()
//static
void
LLAvatarAppearance
::
initClass
(
const
std
::
string
&
avatar_file_name_arg
,
const
std
::
string
&
skeleton_file_name_arg
)
{
// init dictionary (don't repeat on second login attempt)
if
(
!
sAvatarDictionary
)
{
sAvatarDictionary
=
new
LLAvatarAppearanceDefines
::
LLAvatarAppearanceDictionary
();
}
std
::
string
avatar_file_name
;
if
(
!
avatar_file_name_arg
.
empty
())
...
...
@@ -348,14 +353,15 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
{
avatar_file_name
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_CHARACTER
,
AVATAR_DEFAULT_CHAR
+
"_lad.xml"
);
}
BOOL
success
=
sXMLTree
.
parseFile
(
avatar_file_name
,
FALSE
);
LLXmlTree
xml_tree
;
BOOL
success
=
xml_tree
.
parseFile
(
avatar_file_name
,
FALSE
);
if
(
!
success
)
{
LL_ERRS
()
<<
"Problem reading avatar configuration file:"
<<
avatar_file_name
<<
LL_ENDL
;
}
// now sanity check xml file
LLXmlTreeNode
*
root
=
sXMLT
ree
.
getRoot
();
LLXmlTreeNode
*
root
=
xml_t
ree
.
getRoot
();
if
(
!
root
)
{
LL_ERRS
()
<<
"No root node found in avatar configuration file: "
<<
avatar_file_name
<<
LL_ENDL
;
...
...
@@ -400,8 +406,9 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
}
std
::
string
skeleton_path
;
LLXmlTree
skeleton_xml_tree
;
skeleton_path
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_CHARACTER
,
skeleton_file_name
);
if
(
!
parseSkeletonFile
(
skeleton_path
))
if
(
!
parseSkeletonFile
(
skeleton_path
,
skeleton_xml_tree
))
{
LL_ERRS
()
<<
"Error parsing skeleton file: "
<<
skeleton_path
<<
LL_ENDL
;
}
...
...
@@ -414,7 +421,7 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
delete
sAvatarSkeletonInfo
;
}
sAvatarSkeletonInfo
=
new
LLAvatarSkeletonInfo
;
if
(
!
sAvatarSkeletonInfo
->
parseXml
(
s
S
keleton
XMLT
ree
.
getRoot
()))
if
(
!
sAvatarSkeletonInfo
->
parseXml
(
skeleton
_xml_t
ree
.
getRoot
()))
{
LL_ERRS
()
<<
"Error parsing skeleton XML file: "
<<
skeleton_path
<<
LL_ENDL
;
}
...
...
@@ -453,9 +460,8 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons
void
LLAvatarAppearance
::
cleanupClass
()
{
delete_and_clear
(
sAvatarXmlInfo
);
delete_and_clear
(
sAvatarSkeletonInfo
);
sSkeletonXMLTree
.
cleanup
();
sXMLTree
.
cleanup
();
delete_and_clear
(
sAvatarDictionary
);
delete_and_clear
(
sAvatarSkeletonInfo
);
}
using
namespace
LLAvatarAppearanceDefines
;
...
...
@@ -577,12 +583,12 @@ void LLAvatarAppearance::computeBodySize()
//-----------------------------------------------------------------------------
// parseSkeletonFile()
//-----------------------------------------------------------------------------
BOOL
LLAvatarAppearance
::
parseSkeletonFile
(
const
std
::
string
&
filename
)
BOOL
LLAvatarAppearance
::
parseSkeletonFile
(
const
std
::
string
&
filename
,
LLXmlTree
&
skeleton_xml_tree
)
{
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
BOOL
parsesuccess
=
s
S
keleton
XMLT
ree
.
parseFile
(
filename
,
FALSE
);
BOOL
parsesuccess
=
skeleton
_xml_t
ree
.
parseFile
(
filename
,
FALSE
);
if
(
!
parsesuccess
)
{
...
...
@@ -591,7 +597,7 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
}
// now sanity check xml file
LLXmlTreeNode
*
root
=
s
S
keleton
XMLT
ree
.
getRoot
();
LLXmlTreeNode
*
root
=
skeleton
_xml_t
ree
.
getRoot
();
if
(
!
root
)
{
LL_ERRS
()
<<
"No root node found in avatar skeleton file: "
<<
filename
<<
LL_ENDL
;
...
...
@@ -1012,7 +1018,7 @@ BOOL LLAvatarAppearance::loadAvatar()
{
LLAvatarXmlInfo
::
LLAvatarMorphInfo
*
info
=
*
iter
;
EBakedTextureIndex
baked
=
LL
Avatar
Appearance
Dictionary
::
findBakedByRegionName
(
info
->
mRegion
);
EBakedTextureIndex
baked
=
s
AvatarDictionary
->
findBakedByRegionName
(
info
->
mRegion
);
if
(
baked
!=
BAKED_NUM_INDICES
)
{
LLVisualParam
*
morph_param
;
...
...
@@ -1148,8 +1154,8 @@ BOOL LLAvatarAppearance::loadMeshNodes()
switch(lod)
case 0:
mesh = &mHairMesh0; */
for
(
LLAvatarAppearanceDictionary
::
MeshEntries
::
const_iterator
mesh_iter
=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getMeshEntries
().
begin
();
mesh_iter
!=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getMeshEntries
().
end
();
for
(
LLAvatarAppearanceDictionary
::
MeshEntries
::
const_iterator
mesh_iter
=
s
Avatar
Dictionary
->
getMeshEntries
().
begin
();
mesh_iter
!=
s
Avatar
Dictionary
->
getMeshEntries
().
end
();
++
mesh_iter
)
{
const
EMeshIndex
mesh_index
=
mesh_iter
->
first
;
...
...
@@ -1277,8 +1283,8 @@ BOOL LLAvatarAppearance::loadLayersets()
// scan baked textures and associate the layerset with the appropriate one
EBakedTextureIndex
baked_index
=
BAKED_NUM_INDICES
;
for
(
LLAvatarAppearanceDictionary
::
BakedTextures
::
const_iterator
baked_iter
=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getBakedTextures
().
begin
();
baked_iter
!=
LL
Avatar
AppearanceDictionary
::
getInstance
()
->
getBakedTextures
().
end
();
for
(
LLAvatarAppearanceDictionary
::
BakedTextures
::
const_iterator
baked_iter
=
s
Avatar
Dictionary
->
getBakedTextures
().
begin
();
baked_iter
!=
s
Avatar
Dictionary
->
getBakedTextures
().
end
();
++
baked_iter
)
{
const
LLAvatarAppearanceDictionary
::
BakedEntry
*
baked_dict
=
baked_iter
->
second
;
...
...
indra/llappearance/llavatarappearance.h
View file @
87d22c63
...
...
@@ -156,7 +156,7 @@ class LLAvatarAppearance : public LLCharacter
protected:
static
BOOL
parseSkeletonFile
(
const
std
::
string
&
filename
);
static
BOOL
parseSkeletonFile
(
const
std
::
string
&
filename
,
LLXmlTree
&
skeleton_xml_tree
);
virtual
void
buildCharacter
();
virtual
BOOL
loadAvatar
();
...
...
@@ -216,9 +216,6 @@ class LLAvatarAppearance : public LLCharacter
// XML parse tree
//--------------------------------------------------------------------
protected:
static
LLXmlTree
sXMLTree
;
// avatar config file
static
LLXmlTree
sSkeletonXMLTree
;
// avatar skeleton file
static
LLAvatarSkeletonInfo
*
sAvatarSkeletonInfo
;
static
LLAvatarXmlInfo
*
sAvatarXmlInfo
;
...
...
@@ -260,6 +257,7 @@ class LLAvatarAppearance : public LLCharacter
public:
virtual
void
updateMeshTextures
()
=
0
;
virtual
void
dirtyMesh
()
=
0
;
// Dirty the avatar mesh
static
const
LLAvatarAppearanceDefines
::
LLAvatarAppearanceDictionary
*
getDictionary
()
{
return
sAvatarDictionary
;
}
protected:
virtual
void
dirtyMesh
(
S32
priority
)
=
0
;
// Dirty the avatar mesh, with priority
...
...
@@ -268,6 +266,9 @@ class LLAvatarAppearance : public LLCharacter
polymesh_map_t
mPolyMeshes
;
avatar_joint_list_t
mMeshLOD
;
// mesh entries and backed textures
static
LLAvatarAppearanceDefines
::
LLAvatarAppearanceDictionary
*
sAvatarDictionary
;
/** Meshes
** **
*******************************************************************************/
...
...
indra/llappearance/llavatarappearancedefines.cpp
View file @
87d22c63
...
...
@@ -259,19 +259,17 @@ LLAvatarAppearanceDictionary::BakedEntry::BakedEntry(ETextureIndex tex_index,
va_end
(
argp
);
}
// static
ETextureIndex
LLAvatarAppearanceDictionary
::
bakedToLocalTextureIndex
(
EBakedTextureIndex
index
)
ETextureIndex
LLAvatarAppearanceDictionary
::
bakedToLocalTextureIndex
(
EBakedTextureIndex
index
)
const
{
return
LLAvatarAppearanceDictionary
::
getInstance
()
->
getBakedTexture
(
index
)
->
mTextureIndex
;
return
getBakedTexture
(
index
)
->
mTextureIndex
;
}
// static
EBakedTextureIndex
LLAvatarAppearanceDictionary
::
findBakedByRegionName
(
std
::
string
name
)
{
U8
index
=
0
;
while
(
index
<
BAKED_NUM_INDICES
)
{
const
BakedEntry
*
be
=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getBakedTexture
((
EBakedTextureIndex
)
index
);
const
BakedEntry
*
be
=
getBakedTexture
((
EBakedTextureIndex
)
index
);
if
(
be
&&
be
->
mName
.
compare
(
name
)
==
0
)
{
// baked texture found
...
...
@@ -283,16 +281,15 @@ EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(std::stri
return
BAKED_NUM_INDICES
;
}
// static
EBakedTextureIndex
LLAvatarAppearanceDictionary
::
findBakedByImageName
(
std
::
string
name
)
{
U8
index
=
0
;
while
(
index
<
BAKED_NUM_INDICES
)
{
const
BakedEntry
*
be
=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getBakedTexture
((
EBakedTextureIndex
)
index
);
const
BakedEntry
*
be
=
getBakedTexture
((
EBakedTextureIndex
)
index
);
if
(
be
)
{
const
TextureEntry
*
te
=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getTexture
(
be
->
mTextureIndex
);
const
TextureEntry
*
te
=
getTexture
(
be
->
mTextureIndex
);
if
(
te
&&
te
->
mDefaultImageName
.
compare
(
name
)
==
0
)
{
// baked texture found
...
...
@@ -305,10 +302,9 @@ EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(std::strin
return
BAKED_NUM_INDICES
;
}
// static
LLWearableType
::
EType
LLAvatarAppearanceDictionary
::
getTEWearableType
(
ETextureIndex
index
)
LLWearableType
::
EType
LLAvatarAppearanceDictionary
::
getTEWearableType
(
ETextureIndex
index
)
const
{
return
getInstance
()
->
getTexture
(
index
)
->
mWearableType
;
return
getTexture
(
index
)
->
mWearableType
;
}
// static
...
...
indra/llappearance/llavatarappearancedefines.h
View file @
87d22c63
...
...
@@ -143,13 +143,14 @@ typedef std::vector<LLWearableType::EType> wearables_vec_t;
//
// This holds const data - it is initialized once and the contents never change after that.
//------------------------------------------------------------------------
class
LLAvatarAppearanceDictionary
:
public
LLSingleton
<
LLAvatarAppearanceDictionary
>
class
LLAvatarAppearanceDictionary
{
//--------------------------------------------------------------------
// Constructors and Destructors
//--------------------------------------------------------------------
LLSINGLETON
(
LLAvatarAppearanceDictionary
);
virtual
~
LLAvatarAppearanceDictionary
();
public:
LLAvatarAppearanceDictionary
();
~
LLAvatarAppearanceDictionary
();
private:
void
createAssociations
();
...
...
@@ -235,14 +236,14 @@ class LLAvatarAppearanceDictionary : public LLSingleton<LLAvatarAppearanceDictio
//--------------------------------------------------------------------
public:
// Convert from baked texture to associated texture; e.g. BAKED_HEAD -> TEX_HEAD_BAKED
static
ETextureIndex
bakedToLocalTextureIndex
(
EBakedTextureIndex
t
);
ETextureIndex
bakedToLocalTextureIndex
(
EBakedTextureIndex
t
)
const
;
// find a baked texture index based on its name
static
EBakedTextureIndex
findBakedByRegionName
(
std
::
string
name
);
static
EBakedTextureIndex
findBakedByImageName
(
std
::
string
name
);
EBakedTextureIndex
findBakedByRegionName
(
std
::
string
name
);
EBakedTextureIndex
findBakedByImageName
(
std
::
string
name
);
// Given a texture entry, determine which wearable type owns it.
static
LLWearableType
::
EType
getTEWearableType
(
ETextureIndex
index
);
LLWearableType
::
EType
getTEWearableType
(
ETextureIndex
index
)
const
;
static
BOOL
isBakedImageId
(
const
LLUUID
&
id
);
static
EBakedTextureIndex
assetIdToBakedTextureIndex
(
const
LLUUID
&
id
);
...
...
indra/llappearance/lltexlayer.cpp
View file @
87d22c63
...
...
@@ -728,8 +728,8 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
/* if ("upper_shirt" == local_texture_name)
mLocalTexture = TEX_UPPER_SHIRT; */
mLocalTexture
=
TEX_NUM_INDICES
;
for
(
LLAvatarAppearanceDictionary
::
Textures
::
const_iterator
iter
=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getTextures
().
begin
();
iter
!=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getTextures
().
end
();
for
(
LLAvatarAppearanceDictionary
::
Textures
::
const_iterator
iter
=
LLAvatarAppearance
::
get
Dictionary
()
->
getTextures
().
begin
();
iter
!=
LLAvatarAppearance
::
get
Dictionary
()
->
getTextures
().
end
();
iter
++
)
{
const
LLAvatarAppearanceDictionary
::
TextureEntry
*
texture_dict
=
iter
->
second
;
...
...
@@ -979,7 +979,7 @@ LLWearableType::EType LLTexLayerInterface::getWearableType() const
return
type
;
}
return
LLAvatarAppearanceDictionary
::
getTEWearableType
(
te
);
return
LLAvatarAppearance
::
get
Dictionary
()
->
getTEWearableType
(
te
);
}
LLTexLayerInterface
::
ERenderPass
LLTexLayerInterface
::
getRenderPass
()
const
...
...
indra/llappearance/llwearable.cpp
View file @
87d22c63
...
...
@@ -183,7 +183,7 @@ void LLWearable::createVisualParams(LLAvatarAppearance *avatarp)
void
LLWearable
::
createLayers
(
S32
te
,
LLAvatarAppearance
*
avatarp
)
{
LLTexLayerSet
*
layer_set
=
NULL
;
const
LLAvatarAppearanceDictionary
::
TextureEntry
*
texture_dict
=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getTexture
((
ETextureIndex
)
te
);
const
LLAvatarAppearanceDictionary
::
TextureEntry
*
texture_dict
=
LLAvatarAppearance
::
get
Dictionary
()
->
getTexture
((
ETextureIndex
)
te
);
if
(
texture_dict
&&
texture_dict
->
mIsUsedByBakedTexture
)
{
const
EBakedTextureIndex
baked_index
=
texture_dict
->
mBakedTextureIndex
;
...
...
@@ -606,7 +606,7 @@ void LLWearable::syncImages(te_map_t &src, te_map_t &dst)
// Deep copy of src (copies only those tes that are current, filling in defaults where needed)
for
(
S32
te
=
0
;
te
<
TEX_NUM_INDICES
;
te
++
)
{
if
(
LLAvatarAppearanceDictionary
::
getTEWearableType
((
ETextureIndex
)
te
)
==
mType
)
if
(
LLAvatarAppearance
::
get
Dictionary
()
->
getTEWearableType
((
ETextureIndex
)
te
)
==
mType
)
{
te_map_t
::
const_iterator
iter
=
src
.
find
(
te
);
LLUUID
image_id
;
...
...
indra/llappearance/llwearabledata.cpp
View file @
87d22c63
...
...
@@ -347,7 +347,7 @@ U32 LLWearableData::getWearableCount(const LLWearableType::EType type) const
U32
LLWearableData
::
getWearableCount
(
const
U32
tex_index
)
const
{
const
LLWearableType
::
EType
wearable_type
=
LLAvatarAppearanceDictionary
::
getTEWearableType
((
LLAvatarAppearanceDefines
::
ETextureIndex
)
tex_index
);
const
LLWearableType
::
EType
wearable_type
=
LLAvatarAppearance
::
get
Dictionary
()
->
getTEWearableType
((
LLAvatarAppearanceDefines
::
ETextureIndex
)
tex_index
);
return
getWearableCount
(
wearable_type
);
}
...
...
@@ -357,7 +357,7 @@ LLUUID LLWearableData::computeBakedTextureHash(LLAvatarAppearanceDefines::EBaked
LLUUID
hash_id
;
bool
hash_computed
=
false
;
LLMD5
hash
;
const
LLAvatarAppearanceDictionary
::
BakedEntry
*
baked_dict
=
LLAvatarAppearanceDictionary
::
getInstance
()
->
getBakedTexture
(
baked_index
);
const
LLAvatarAppearanceDictionary
::
BakedEntry
*
baked_dict
=
LLAvatarAppearance
::
get
Dictionary
()
->
getBakedTexture
(
baked_index
);
for
(
U8
i
=
0
;
i
<
baked_dict
->
mWearables
.
size
();
i
++
)
{
...
...
indra/llcorehttp/_httpoprequest.cpp
View file @
87d22c63
...
...
@@ -567,16 +567,9 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
// Use the viewer-based thread-safe API which has a
// fast/safe check for proxy enable. Would like to
// encapsulate this someway...
if
(
LLProxy
::
instanceExists
())
{
// Make sure proxy won't be initialized from here,
// it might conflict with LLStartUp::startLLProxy()
LLProxy
::
getInstance
()
->
applyProxySettings
(
mCurlHandle
);
}
else
{
LL_WARNS
()
<<
"Proxy is not initialized!"
<<
LL_ENDL
;
}
// Make sure proxy won't be getInstance() from here,
// it is not thread safe
LLProxy
::
applyProxySettings
(
mCurlHandle
);
}
else
if
(
gpolicy
.
mHttpProxy
.
size
())
...
...
@@ -817,6 +810,7 @@ size_t HttpOpRequest::readCallback(void * data, size_t size, size_t nmemb, void
const
size_t
do_size
((
std
::
min
)(
req_size
,
body_size
-
op
->
mCurlBodyPos
));
const
size_t
read_size
(
op
->
mReqBody
->
read
(
op
->
mCurlBodyPos
,
static_cast
<
char
*>
(
data
),
do_size
));
// FIXME: singleton's instance() is Thread unsafe! Even if stats accumulators inside are.
HTTPStats
::
instance
().
recordDataUp
(
read_size
);
op
->
mCurlBodyPos
+=
read_size
;
return
read_size
;
...
...
indra/llimage/llimage.cpp
View file @
87d22c63
...
...
@@ -583,29 +583,39 @@ static void bilinear_scale(const U8 *src, U32 srcW, U32 srcH, U32 srcCh, U32 src
// LLImage
//---------------------------------------------------------------------------
LLImage
::
LLImage
(
bool
use_new_byte_range
,
S32
minimal_reverse_byte_range_percent
)
//static
std
::
string
LLImage
::
sLastErrorMessage
;
LLMutex
*
LLImage
::
sMutex
=
NULL
;
bool
LLImage
::
sUseNewByteRange
=
false
;
S32
LLImage
::
sMinimalReverseByteRangePercent
=
75
;
//static
void
LLImage
::
initClass
(
bool
use_new_byte_range
,
S32
minimal_reverse_byte_range_percent
)
{
mMutex
=
new
LLMutex
()
;
mUseNewByteRange
=
use_new
_byte_range
;
mMinimalReverseByteRangePercent
=
minimal_reverse_byte_range_percent
;
sUseNewByteRange
=
use_new_byte_range
;
sMinimalReverseByteRangePercent
=
minimal_reverse
_byte_range
_percent
;
sMutex
=
new
LLMutex
()
;
}
LLImage
::~
LLImage
()
//static
void
LLImage
::
cleanupClass
()
{
delete
m
Mutex
;
m
Mutex
=
NULL
;
delete
s
Mutex
;
s
Mutex
=
NULL
;
}
const
std
::
string
&
LLImage
::
getLastErrorMessage
()
//static
const
std
::
string
&
LLImage
::
getLastError
()
{
static
const
std
::
string
noerr
(
"No Error"
);
return
m
LastErrorMessage
.
empty
()
?
noerr
:
m
LastErrorMessage
;
return
s
LastErrorMessage
.
empty
()
?
noerr
:
s
LastErrorMessage
;
}
void
LLImage
::
setLastErrorMessage
(
const
std
::
string
&
message
)
//static
void
LLImage
::
setLastError
(
const
std
::
string
&
message
)
{
LLMutexLock
m
(
m
Mutex
);
m
LastErrorMessage
=
message
;
LLMutexLock
m
(
s
Mutex
);
s
LastErrorMessage
=
message
;
}
//---------------------------------------------------------------------------
...
...
indra/llimage/llimage.h
View file @
87d22c63
...
...
@@ -30,7 +30,6 @@
#include "lluuid.h"
#include "llstring.h"
#include "llpointer.h"
#include "llsingleton.h"
#include "lltrace.h"
const
S32
MIN_IMAGE_MIP
=
2
;
// 4x4, only used for expand/contract power of 2
...
...
@@ -88,26 +87,25 @@ typedef enum e_image_codec
//============================================================================
// library initialization class
// LLImage is frequently used in threads so do not convert it to LLSingleton
class
LLImage
:
public
LLParamSingleton
<
LLImage
>
class
LLImage
{
LLSINGLETON
(
LLImage
,
bool
use_new_byte_range
=
false
,
S32
minimal_reverse_byte_range_percent
=
75
);
~
LLImage
();
public:
static
void
initClass
(
bool
use_new_byte_range
=
false
,
S32
minimal_reverse_byte_range_percent
=
75
);
static
void
cleanupClass
();
const
std
::
string
&
getLastErrorMessage
();
static
const
std
::
string
&
getLastError
()
{
return
getInstance
()
->
getLastErrorMessage
();
};
void
setLastErrorMessage
(
const
std
::
string
&
message
);
static
void
setLastError
(
const
std
::
string
&
message
)
{
getInstance
()
->
setLastErrorMessage
(
message
);
}
bool
useNewByteRange
()
{
return
mUseNewByteRange
;
}
S32
getReverseByteRangePercent
()
{
return
mMinimalReverseByteRangePercent
;
}
private:
LLMutex
*
mMutex
;
std
::
string
mLastErrorMessage
;
bool
mUseNewByteRange
;
S32
mMinimalReverseByteRangePercent
;
static
const
std
::
string
&
getLastError
();
static
void
setLastError
(
const
std
::
string
&
message
);
static
bool
useNewByteRange
()
{
return
sUseNewByteRange
;
}
static
S32
getReverseByteRangePercent
()
{
return
sMinimalReverseByteRangePercent
;
}
protected:
static
LLMutex
*
sMutex
;
static
std
::
string
sLastErrorMessage
;
static
bool
sUseNewByteRange
;
static
S32
sMinimalReverseByteRangePercent
;
};
//============================================================================
...
...
indra/llimage/llimagej2c.cpp
View file @
87d22c63
...
...
@@ -281,7 +281,7 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
S32
bytes
;
S32
new_bytes
=
(
S32
)
(
sqrt
((
F32
)(
w
*
h
))
*
(
F32
)(
comp
)
*
rate
*
1000.
f
/
layer_factor
);
S32
old_bytes
=
(
S32
)((
F32
)(
w
*
h
*
comp
)
*
rate
);
bytes
=
(
LLImage
::
getInstance
()
->
useNewByteRange
()
&&
(
new_bytes
<
old_bytes
)
?
new_bytes
:
old_bytes
);
bytes
=
(
LLImage
::
useNewByteRange
()
&&
(
new_bytes
<
old_bytes
)
?
new_bytes
:
old_bytes
);
bytes
=
llmax
(
bytes
,
calcHeaderSizeJ2C
());
return
bytes
;
}
...
...
@@ -322,7 +322,7 @@ S32 LLImageJ2C::calcDiscardLevelBytes(S32 bytes)
{
S32
bytes_needed
=
calcDataSize
(
discard_level
);
// Use TextureReverseByteRange percent (see settings.xml) of the optimal size to qualify as correct rendering for the given discard level
if
(
bytes
>=
(
bytes_needed
*
LLImage
::
getInstance
()
->
getReverseByteRangePercent
()
/
100
))
if
(
bytes
>=
(
bytes_needed
*
LLImage
::
getReverseByteRangePercent
()
/
100
))
{
break
;
}
...
...
indra/llinventory/llinventory.h
View file @
87d22c63
...
...
@@ -244,7 +244,7 @@ class LLInventoryCategory : public LLInventoryObject
LLInventoryCategory
(
const
LLInventoryCategory
*
other
);
void
copyCategory
(
const
LLInventoryCategory
*
other
);
// LLRefCount requires custom copy
protected:
~
LLInventoryCategory
();
virtual
~
LLInventoryCategory
();
//--------------------------------------------------------------------