Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Archive
Alchemy Viewer
Commits
e77ac4ca
Commit
e77ac4ca
authored
14 years ago
by
Aimee Linden
Browse files
Options
Downloads
Plain Diff
Merge
parents
dea12663
d3db9dd2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llviewerregion.cpp
+22
-10
22 additions, 10 deletions
indra/newview/llviewerregion.cpp
indra/newview/llviewerregion.h
+6
-4
6 additions, 4 deletions
indra/newview/llviewerregion.h
with
28 additions
and
14 deletions
indra/newview/llviewerregion.cpp
+
22
−
10
View file @
e77ac4ca
...
...
@@ -79,6 +79,8 @@
// format changes. JC
const
U32
INDRA_OBJECT_CACHE_VERSION
=
14
;
// Format string used to construct filename for the object cache
static
const
char
OBJECT_CACHE_FILENAME
[]
=
"objects_%d_%d.slc"
;
extern
BOOL
gNoRender
;
...
...
@@ -323,13 +325,25 @@ LLViewerRegion::~LLViewerRegion()
delete
mEventPoll
;
LLHTTPSender
::
clearSender
(
mHost
);
saveCache
();
save
Object
Cache
();
std
::
for_each
(
mObjectPartition
.
begin
(),
mObjectPartition
.
end
(),
DeletePointer
());
}
void
LLViewerRegion
::
loadCache
()
const
std
::
string
LLViewerRegion
::
getObjectCacheFilename
(
U64
mHandle
)
const
{
std
::
string
filename
;
U32
region_x
,
region_y
;
grid_from_region_handle
(
mHandle
,
&
region_x
,
&
region_y
);
filename
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_CACHE
,
llformat
(
OBJECT_CACHE_FILENAME
,
region_x
,
region_y
));
return
filename
;
}
void
LLViewerRegion
::
loadObjectCache
()
{
if
(
mCacheLoaded
)
{
...
...
@@ -341,9 +355,8 @@ void LLViewerRegion::loadCache()
LLVOCacheEntry
*
entry
;
std
::
string
filename
;
filename
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_CACHE
,
""
)
+
gDirUtilp
->
getDirDelimiter
()
+
llformat
(
"objects_%d_%d.slc"
,
U32
(
mHandle
>>
32
)
/
REGION_WIDTH_UNITS
,
U32
(
mHandle
)
/
REGION_WIDTH_UNITS
);
std
::
string
filename
=
getObjectCacheFilename
(
mHandle
);
LL_DEBUGS
(
"ObjectCache"
)
<<
filename
<<
LL_ENDL
;
LLFILE
*
fp
=
LLFile
::
fopen
(
filename
,
"rb"
);
/* Flawfinder: ignore */
if
(
!
fp
)
...
...
@@ -414,7 +427,7 @@ void LLViewerRegion::loadCache()
}
void
LLViewerRegion
::
saveCache
()
void
LLViewerRegion
::
save
Object
Cache
()
{
if
(
!
mCacheLoaded
)
{
...
...
@@ -427,9 +440,8 @@ void LLViewerRegion::saveCache()
return
;
}
std
::
string
filename
;
filename
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_CACHE
,
""
)
+
gDirUtilp
->
getDirDelimiter
()
+
llformat
(
"objects_%d_%d.slc"
,
U32
(
mHandle
>>
32
)
/
REGION_WIDTH_UNITS
,
U32
(
mHandle
)
/
REGION_WIDTH_UNITS
);
std
::
string
filename
=
getObjectCacheFilename
(
mHandle
);
LL_DEBUGS
(
"ObjectCache"
)
<<
filename
<<
LL_ENDL
;
LLFILE
*
fp
=
LLFile
::
fopen
(
filename
,
"wb"
);
/* Flawfinder: ignore */
if
(
!
fp
)
...
...
@@ -1454,7 +1466,7 @@ void LLViewerRegion::unpackRegionHandshake()
// Now that we have the name, we can load the cache file
// off disk.
loadCache
();
load
Object
Cache
();
// After loading cache, signal that simulator can start
// sending data.
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llviewerregion.h
+
6
−
4
View file @
e77ac4ca
...
...
@@ -99,9 +99,8 @@ public:
~
LLViewerRegion
();
// Call this after you have the region name and handle.
void
loadCache
();
void
saveCache
();
void
loadObjectCache
();
void
saveObjectCache
();
void
sendMessage
();
// Send the current message to this region's simulator
void
sendReliableMessage
();
// Send the current message to this region's simulator
...
...
@@ -330,6 +329,9 @@ public:
LLDynamicArray
<
LLUUID
>
mMapAvatarIDs
;
private
:
// determine the cache filename for the region from the region handle
const
std
::
string
LLViewerRegion
::
getObjectCacheFilename
(
U64
mHandle
)
const
;
// The surfaces and other layers
LLSurface
*
mLandp
;
...
...
@@ -404,7 +406,7 @@ private:
// Cache ID is unique per-region, across renames, moving locations,
// etc.
LLUUID
mCacheID
;
typedef
std
::
map
<
std
::
string
,
std
::
string
>
CapabilityMap
;
CapabilityMap
mCapabilities
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment