diff options
author | Dave Parks <davep@lindenlab.com> | 2011-04-19 14:55:11 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-04-19 14:55:11 -0500 |
commit | 3b5d6eed12d928e5a7a0bc3a8d827f676b25d060 (patch) | |
tree | 8cf08a165c11acf92742eacc64248c1e50b2420b /indra/newview/llviewertexture.cpp | |
parent | b8069d1c250c03e9fffda0a9264bfd04a12f8292 (diff) | |
parent | 12b0b52b99e6f6a6538feba8589566d2f73f82c6 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f5fb074992..af06421bf9 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -835,7 +835,7 @@ BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* image llassert(mGLTexturep.notNull()) ; BOOL ret = mGLTexturep->createGLTexture(discard_level, imageraw, usename, to_create, category) ; - + if(ret) { mFullWidth = mGLTexturep->getCurrentWidth() ; @@ -1422,8 +1422,15 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mOrigWidth = mRawImage->getWidth(); mOrigHeight = mRawImage->getHeight(); - // leave black border, do not scale image content - mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, FALSE); + + if (mBoostLevel == BOOST_PREVIEW) + { + mRawImage->biasedScaleToPowerOfTwo(1024); + } + else + { // leave black border, do not scale image content + mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, FALSE); + } mFullWidth = mRawImage->getWidth(); mFullHeight = mRawImage->getHeight(); @@ -1583,7 +1590,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() S32 cur_discard = getCurrentDiscardLevelForFetching(); bool have_all_data = (cur_discard >= 0 && (cur_discard <= mDesiredDiscardLevel)); - F32 pixel_priority = fsqrtf(mMaxVirtualSize); + F32 pixel_priority = (F32) sqrt(mMaxVirtualSize); F32 priority = 0.f; @@ -2711,6 +2718,9 @@ void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard) } void LLViewerFetchedTexture::destroySavedRawImage() { + mForceToSaveRawImage = FALSE ; + mSaveRawImage = FALSE ; + clearCallbackEntryList() ; mSavedRawImage = NULL ; @@ -2870,7 +2880,7 @@ BOOL LLViewerFetchedTexture::insertToAtlas() } //process the waiting_list - for(ll_face_list_t::iterator iter = waiting_list.begin(); iter != waiting_list.end(); ++iter) + for(std::vector<LLFace*>::iterator iter = waiting_list.begin(); iter != waiting_list.end(); ++iter) { facep = (LLFace*)*iter ; groupp = facep->getDrawable()->getSpatialGroup() ; |