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
8465167d
Commit
8465167d
authored
9 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
Backed out changeset: 490da610307f
parent
dbce6e93
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llavatarrendernotifier.cpp
+65
-41
65 additions, 41 deletions
indra/newview/llavatarrendernotifier.cpp
indra/newview/llavatarrendernotifier.h
+1
-0
1 addition, 0 deletions
indra/newview/llavatarrendernotifier.h
with
66 additions
and
41 deletions
indra/newview/llavatarrendernotifier.cpp
+
65
−
41
View file @
8465167d
...
@@ -99,7 +99,6 @@ std::string LLAvatarRenderNotifier::overLimitMessage()
...
@@ -99,7 +99,6 @@ std::string LLAvatarRenderNotifier::overLimitMessage()
void
LLAvatarRenderNotifier
::
displayNotification
()
void
LLAvatarRenderNotifier
::
displayNotification
()
{
{
mAgentComplexity
=
mLatestAgentComplexity
;
static
LLCachedControl
<
U32
>
expire_delay
(
gSavedSettings
,
"ShowMyComplexityChanges"
,
20
);
static
LLCachedControl
<
U32
>
expire_delay
(
gSavedSettings
,
"ShowMyComplexityChanges"
,
20
);
LLDate
expire_date
(
LLDate
::
now
().
secondsSinceEpoch
()
+
expire_delay
);
LLDate
expire_date
(
LLDate
::
now
().
secondsSinceEpoch
()
+
expire_delay
);
...
@@ -108,10 +107,6 @@ void LLAvatarRenderNotifier::displayNotification()
...
@@ -108,10 +107,6 @@ void LLAvatarRenderNotifier::displayNotification()
std
::
string
notification_name
;
std
::
string
notification_name
;
if
(
mShowOverLimitAgents
)
if
(
mShowOverLimitAgents
)
{
{
mAgentsCount
=
mLatestAgentsCount
;
mOverLimitAgents
=
mLatestOverLimitAgents
;
mOverLimitPct
=
mLatestOverLimitPct
;
std
::
string
notification_message
=
overLimitMessage
();
std
::
string
notification_message
=
overLimitMessage
();
notification_name
=
"RegionAndAgentComplexity"
;
notification_name
=
"RegionAndAgentComplexity"
;
args
[
"OVERLIMIT_MSG"
]
=
notification_message
;
args
[
"OVERLIMIT_MSG"
]
=
notification_message
;
...
@@ -139,6 +134,69 @@ bool LLAvatarRenderNotifier::isNotificationVisible()
...
@@ -139,6 +134,69 @@ bool LLAvatarRenderNotifier::isNotificationVisible()
return
mNotificationPtr
!=
NULL
&&
mNotificationPtr
->
isActive
();
return
mNotificationPtr
!=
NULL
&&
mNotificationPtr
->
isActive
();
}
}
void
LLAvatarRenderNotifier
::
updateNotification
()
{
if
(
mAgentsCount
==
mLatestAgentsCount
&&
mOverLimitAgents
==
mLatestOverLimitAgents
&&
mAgentComplexity
==
mLatestAgentComplexity
)
{
//no changes since last notification
return
;
}
if
(
mLatestAgentComplexity
==
0
||
!
gAgentWearables
.
areWearablesLoaded
())
{
// data not ready, nothing to show.
return
;
}
bool
display_notification
=
false
;
bool
is_visible
=
isNotificationVisible
();
if
(
mLatestOverLimitPct
>
0
||
mOverLimitPct
>
0
)
{
//include 'over limit' information into notification
mShowOverLimitAgents
=
true
;
}
else
{
// make sure that 'over limit' won't be displayed only to be hidden in a second
mShowOverLimitAgents
&=
is_visible
;
}
if
(
mAgentComplexity
!=
mLatestAgentComplexity
)
{
// if we have an agent complexity update, we always display it
display_notification
=
true
;
// next 'over limit' update should be displayed after delay to make sure information got updated at server side
mPopUpDelayTimer
.
resetWithExpiry
(
OVER_LIMIT_UPDATE_DELAY
);
}
else
if
(
(
mPopUpDelayTimer
.
hasExpired
()
||
is_visible
)
&&
(
mOverLimitPct
>
0
||
mLatestOverLimitPct
>
0
)
&&
std
::
abs
(
mOverLimitPct
-
mLatestOverLimitPct
)
>
mLatestOverLimitPct
*
RENDER_ALLOWED_CHANGE_PCT
)
{
// display in case of drop to/from zero and in case of significant (RENDER_ALLOWED_CHANGE_PCT) changes
display_notification
=
true
;
// default timeout before next notification
static
LLCachedControl
<
U32
>
pop_up_delay
(
gSavedSettings
,
"ComplexityChangesPopUpDelay"
,
300
);
mPopUpDelayTimer
.
resetWithExpiry
(
pop_up_delay
);
}
if
(
display_notification
)
{
mAgentComplexity
=
mLatestAgentComplexity
;
mAgentsCount
=
mLatestAgentsCount
;
mOverLimitAgents
=
mLatestOverLimitAgents
;
mOverLimitPct
=
mLatestOverLimitPct
;
displayNotification
();
}
}
void
LLAvatarRenderNotifier
::
updateNotificationRegion
(
U32
agentcount
,
U32
overLimit
)
void
LLAvatarRenderNotifier
::
updateNotificationRegion
(
U32
agentcount
,
U32
overLimit
)
{
{
if
(
agentcount
==
0
)
if
(
agentcount
==
0
)
...
@@ -152,27 +210,7 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi
...
@@ -152,27 +210,7 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi
mLatestOverLimitAgents
=
overLimit
;
mLatestOverLimitAgents
=
overLimit
;
mLatestOverLimitPct
=
mLatestAgentsCount
!=
0
?
((
F32
)
overLimit
/
(
F32
)
mLatestAgentsCount
)
*
100.0
:
0
;
mLatestOverLimitPct
=
mLatestAgentsCount
!=
0
?
((
F32
)
overLimit
/
(
F32
)
mLatestAgentsCount
)
*
100.0
:
0
;
if
(
mAgentsCount
==
mLatestAgentsCount
updateNotification
();
&&
mOverLimitAgents
==
mLatestOverLimitAgents
)
{
//no changes since last notification
return
;
}
if
((
mPopUpDelayTimer
.
hasExpired
()
||
(
isNotificationVisible
()
&&
mShowOverLimitAgents
))
&&
(
mOverLimitPct
>
0
||
mLatestOverLimitPct
>
0
)
&&
std
::
abs
(
mOverLimitPct
-
mLatestOverLimitPct
)
>
mLatestOverLimitPct
*
RENDER_ALLOWED_CHANGE_PCT
)
{
// display in case of drop to/from zero and in case of significant (RENDER_ALLOWED_CHANGE_PCT) changes
mShowOverLimitAgents
=
true
;
displayNotification
();
// default timeout before next notification
static
LLCachedControl
<
U32
>
pop_up_delay
(
gSavedSettings
,
"ComplexityChangesPopUpDelay"
,
300
);
mPopUpDelayTimer
.
resetWithExpiry
(
pop_up_delay
);
}
}
}
void
LLAvatarRenderNotifier
::
updateNotificationAgent
(
U32
agentComplexity
)
void
LLAvatarRenderNotifier
::
updateNotificationAgent
(
U32
agentComplexity
)
...
@@ -180,12 +218,6 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity)
...
@@ -180,12 +218,6 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity)
// save the value for use in following messages
// save the value for use in following messages
mLatestAgentComplexity
=
agentComplexity
;
mLatestAgentComplexity
=
agentComplexity
;
if
(
!
gAgentWearables
.
areWearablesLoaded
())
{
// data not ready, nothing to show.
return
;
}
if
(
!
mNotifyOutfitLoading
)
if
(
!
mNotifyOutfitLoading
)
{
{
// We should not notify about initial outfit and it's load process without reason
// We should not notify about initial outfit and it's load process without reason
...
@@ -212,14 +244,6 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity)
...
@@ -212,14 +244,6 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity)
}
}
}
}
if
(
mAgentComplexity
!=
mLatestAgentComplexity
)
updateNotification
();
{
// if we have an agent complexity change, we always display it and hide 'over limit'
mShowOverLimitAgents
=
false
;
displayNotification
();
// next 'over limit' update should be displayed after delay to make sure information got updated at server side
mPopUpDelayTimer
.
resetWithExpiry
(
OVER_LIMIT_UPDATE_DELAY
);
}
}
}
This diff is collapsed.
Click to expand it.
indra/newview/llavatarrendernotifier.h
+
1
−
0
View file @
8465167d
...
@@ -43,6 +43,7 @@ class LLAvatarRenderNotifier : public LLSingleton<LLAvatarRenderNotifier>
...
@@ -43,6 +43,7 @@ class LLAvatarRenderNotifier : public LLSingleton<LLAvatarRenderNotifier>
void
displayNotification
();
void
displayNotification
();
bool
isNotificationVisible
();
bool
isNotificationVisible
();
void
updateNotification
();
void
updateNotificationRegion
(
U32
agentcount
,
U32
overLimit
);
void
updateNotificationRegion
(
U32
agentcount
,
U32
overLimit
);
void
updateNotificationAgent
(
U32
agentComplexity
);
void
updateNotificationAgent
(
U32
agentComplexity
);
...
...
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