diff options
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 42976ed..e29ea78 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -288,7 +288,9 @@ BOOL LLVOAvatar::sJointDebug = FALSE; | |||
288 | S32 LLVOAvatar::sCurJoint = 0; | 288 | S32 LLVOAvatar::sCurJoint = 0; |
289 | S32 LLVOAvatar::sCurVolume = 0; | 289 | S32 LLVOAvatar::sCurVolume = 0; |
290 | F32 LLVOAvatar::sUnbakedTime = 0.f; | 290 | F32 LLVOAvatar::sUnbakedTime = 0.f; |
291 | F32 LLVOAvatar::sUnbakedUpdateTime = 0.f; | ||
291 | F32 LLVOAvatar::sGreyTime = 0.f; | 292 | F32 LLVOAvatar::sGreyTime = 0.f; |
293 | F32 LLVOAvatar::sGreyUpdateTime = 0.f; | ||
292 | 294 | ||
293 | struct LLAvatarTexData | 295 | struct LLAvatarTexData |
294 | { | 296 | { |
@@ -4721,7 +4723,7 @@ void LLVOAvatar::addLocalTextureStats( LLVOAvatar::ELocTexIndex idx, LLViewerIma | |||
4721 | desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_OTHER ); | 4723 | desired_pixels = llmin(mPixelArea, (F32)LOCTEX_IMAGE_AREA_OTHER ); |
4722 | imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR); | 4724 | imagep->setBoostLevel(LLViewerImage::BOOST_AVATAR); |
4723 | } | 4725 | } |
4724 | imagep->addTextureStats( desired_pixels, texel_area_ratio ); | 4726 | imagep->addTextureStats( desired_pixels / texel_area_ratio ); |
4725 | if (imagep->getDiscardLevel() < 0) | 4727 | if (imagep->getDiscardLevel() < 0) |
4726 | { | 4728 | { |
4727 | mHasGrey = TRUE; // for statistics gathering | 4729 | mHasGrey = TRUE; // for statistics gathering |
@@ -4743,7 +4745,7 @@ void LLVOAvatar::addBakedTextureStats( LLViewerImage* imagep, F32 pixel_area, F3 | |||
4743 | { | 4745 | { |
4744 | mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); | 4746 | mMaxPixelArea = llmax(pixel_area, mMaxPixelArea); |
4745 | mMinPixelArea = llmin(pixel_area, mMinPixelArea); | 4747 | mMinPixelArea = llmin(pixel_area, mMinPixelArea); |
4746 | imagep->addTextureStats(pixel_area, texel_area_ratio); | 4748 | imagep->addTextureStats(pixel_area / texel_area_ratio); |
4747 | imagep->setBoostLevel(boost_level); | 4749 | imagep->setBoostLevel(boost_level); |
4748 | } | 4750 | } |
4749 | 4751 | ||
@@ -9171,9 +9173,19 @@ void LLVOAvatar::cullAvatarsByPixelArea() | |||
9171 | } | 9173 | } |
9172 | else | 9174 | else |
9173 | { | 9175 | { |
9174 | sUnbakedTime += gFrameTimeSeconds; | 9176 | if (gFrameTimeSeconds != sUnbakedUpdateTime) // only update once per frame |
9177 | { | ||
9178 | sUnbakedUpdateTime = gFrameTimeSeconds; | ||
9179 | sUnbakedTime += gFrameIntervalSeconds; | ||
9180 | } | ||
9175 | if (grey_avatars > 0) | 9181 | if (grey_avatars > 0) |
9176 | sGreyTime += gFrameTimeSeconds; | 9182 | { |
9183 | if (gFrameTimeSeconds != sGreyUpdateTime) // only update once per frame | ||
9184 | { | ||
9185 | sGreyUpdateTime = gFrameTimeSeconds; | ||
9186 | sGreyTime += gFrameIntervalSeconds; | ||
9187 | } | ||
9188 | } | ||
9177 | } | 9189 | } |
9178 | } | 9190 | } |
9179 | 9191 | ||