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
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
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 Viewer
Alchemy Viewer
Commits
ac875d18
Commit
ac875d18
authored
4 years ago
by
Andrey Kleshchev
Browse files
Options
Downloads
Patches
Plain Diff
SL-14150 Comment for clarity and removed redundant check
parent
0bf11e45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/lltexturecache.cpp
+4
-66
4 additions, 66 deletions
indra/newview/lltexturecache.cpp
with
4 additions
and
66 deletions
indra/newview/lltexturecache.cpp
+
4
−
66
View file @
ac875d18
...
...
@@ -2090,46 +2090,6 @@ LLPointer<LLImageRaw> LLTextureCache::readFromFastCache(const LLUUID& id, S32& d
return
raw
;
}
#if LL_WINDOWS
static
const
U32
STATUS_MSC_EXCEPTION
=
0xE06D7363
;
// compiler specific
U32
exception_dupe_filter
(
U32
code
,
struct
_EXCEPTION_POINTERS
*
exception_infop
)
{
if
(
code
==
STATUS_MSC_EXCEPTION
)
{
// C++ exception, go on
return
EXCEPTION_CONTINUE_SEARCH
;
}
else
{
// handle it
return
EXCEPTION_EXECUTE_HANDLER
;
}
}
//due to unwinding
void
dupe
(
LLPointer
<
LLImageRaw
>
&
raw
)
{
raw
=
raw
->
duplicate
();
}
void
logExceptionDupplicate
(
LLPointer
<
LLImageRaw
>
&
raw
)
{
__try
{
dupe
(
raw
);
}
__except
(
exception_dupe_filter
(
GetExceptionCode
(),
GetExceptionInformation
()))
{
// convert to C++ styled exception
char
integer_string
[
32
];
sprintf
(
integer_string
,
"SEH, code: %lu
\n
"
,
GetExceptionCode
());
throw
std
::
exception
(
integer_string
);
}
}
#endif
//return the fast cache location
bool
LLTextureCache
::
writeToFastCache
(
LLUUID
image_id
,
S32
id
,
LLPointer
<
LLImageRaw
>
raw
,
S32
discardlevel
)
{
...
...
@@ -2146,7 +2106,8 @@ bool LLTextureCache::writeToFastCache(LLUUID image_id, S32 id, LLPointer<LLImage
c
=
raw
->
getComponents
();
S32
i
=
0
;
// Search for a discard level that will fit into fast cache
while
(((
w
>>
i
)
*
(
h
>>
i
)
*
c
)
>
TEXTURE_FAST_CACHE_DATA_SIZE
)
{
++
i
;
...
...
@@ -2158,31 +2119,8 @@ bool LLTextureCache::writeToFastCache(LLUUID image_id, S32 id, LLPointer<LLImage
h
>>=
i
;
if
(
w
*
h
*
c
>
0
)
//valid
{
//make a duplicate to keep the original raw image untouched.
try
{
#if LL_WINDOWS
// Temporary diagnostics for scale/duplicate crash
logExceptionDupplicate
(
raw
);
#else
raw
=
raw
->
duplicate
();
#endif
}
catch
(...)
{
removeFromCache
(
image_id
);
LL_ERRS
()
<<
"Failed to cache image: "
<<
image_id
<<
" local id: "
<<
id
<<
" Exception: "
<<
boost
::
current_exception_diagnostic_information
()
<<
" Image new width: "
<<
w
<<
" Image new height: "
<<
h
<<
" Image new components: "
<<
c
<<
" Image discard difference: "
<<
i
<<
LL_ENDL
;
return
false
;
}
// make a duplicate to keep the original raw image untouched.
raw
=
raw
->
duplicate
();
if
(
raw
->
isBufferInvalid
())
{
...
...
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