aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltexlayer.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2011-01-30 11:04:53 +0100
committerArmin Weatherwax2011-01-30 11:04:53 +0100
commitc710a9f5bdec08933ade898a207061c8df3f3066 (patch)
tree2e99e725c8d944ad132553becb16ff4bd536987a /linden/indra/newview/lltexlayer.cpp
parentBeeks: Serious fix for the Tintable tattoos! (diff)
downloadmeta-impy-c710a9f5bdec08933ade898a207061c8df3f3066.zip
meta-impy-c710a9f5bdec08933ade898a207061c8df3f3066.tar.gz
meta-impy-c710a9f5bdec08933ade898a207061c8df3f3066.tar.bz2
meta-impy-c710a9f5bdec08933ade898a207061c8df3f3066.tar.xz
fix 2 regressions introduced by 76c8494525b8e2b1
Diffstat (limited to 'linden/indra/newview/lltexlayer.cpp')
-rw-r--r--linden/indra/newview/lltexlayer.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp
index 139b1b0..ceef28b 100644
--- a/linden/indra/newview/lltexlayer.cpp
+++ b/linden/indra/newview/lltexlayer.cpp
@@ -211,7 +211,7 @@ void LLTexLayerSetBuffer::popProjection()
211BOOL LLTexLayerSetBuffer::needsRender() 211BOOL LLTexLayerSetBuffer::needsRender()
212{ 212{
213 LLVOAvatar* avatar = mTexLayerSet->getAvatar(); 213 LLVOAvatar* avatar = mTexLayerSet->getAvatar();
214 BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgent.mNumPendingQueries == 0; 214 BOOL upload_now = needsUploadNow();
215 BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating; 215 BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating;
216 216
217 if (needs_update) 217 if (needs_update)
@@ -276,14 +276,16 @@ BOOL LLTexLayerSetBuffer::render()
276 } 276 }
277 else 277 else
278 { 278 {
279 mUploadPending = FALSE; 279 //mUploadPending = FALSE;//see...
280 mNeedsUpload = FALSE; 280 //mNeedsUpload = FALSE;// ...below...
281 LLVOAvatar* avatar = mTexLayerSet->getAvatar(); 281 LLVOAvatar* avatar = mTexLayerSet->getAvatar();
282 if (avatar) 282 if (avatar)
283 { 283 {
284 avatar->setNewBakedTexture(avatar->getBakedTE(mTexLayerSet), IMG_INVISIBLE); 284 avatar->setNewBakedTexture(avatar->getBakedTE(mTexLayerSet), IMG_INVISIBLE);
285 llinfos << "Invisible baked texture set for " << mTexLayerSet->getBodyRegion() << llendl; 285 llinfos << "Invisible baked texture set for " << mTexLayerSet->getBodyRegion() << llendl;
286 } 286 }
287 readBackAndUpload(); //... here: Opensim is not happy if we don't
288 //TODO: find out if SL is happy if we do
287 } 289 }
288 } 290 }
289 } 291 }
@@ -456,7 +458,7 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* user
456 458
457 LLVOAvatar* avatar = gAgent.getAvatarObject(); 459 LLVOAvatar* avatar = gAgent.getAvatarObject();
458 460
459 if (0 == result && avatar && !avatar->isDead() && 461 if (avatar && !avatar->isDead() &&
460 baked_upload_data && 462 baked_upload_data &&
461 baked_upload_data->mAvatar == avatar && // Sanity check: only the user's avatar should be uploading textures. 463 baked_upload_data->mAvatar == avatar && // Sanity check: only the user's avatar should be uploading textures.
462 baked_upload_data->mLayerSet->hasComposite()) 464 baked_upload_data->mLayerSet->hasComposite())
@@ -491,10 +493,21 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* user
491 } 493 }
492 else 494 else
493 { 495 {
494 // Avatar appearance is changing, ignore the upload results 496 ++failures;
495 llinfos << "Baked upload failed. Reason: " << result << llendl; 497 llinfos << "Baked upload failed (attempt " << failures << "/" << MAX_BAKE_UPLOAD_ATTEMPTS << "), ";
496 // *FIX: retry upload after n seconds, asset server could be busy 498 if (failures >= MAX_BAKE_UPLOAD_ATTEMPTS)
497 } 499 {
500 llcont << "giving up.";
501 }
502 else
503 {
504 const F32 delay = 5.f;
505 llcont << llformat("retrying in %.2f seconds.", delay);
506 layerset_buffer->mUploadFailCount = failures;
507 layerset_buffer->requestDelayedUpload((U64)(delay * 1000000));
508 }
509 llcont << llendl;
510 }
498 } 511 }
499 else 512 else
500 { 513 {