diff options
author | Ruslan Teliuk <ruslantproductengine@lindenlab.com> | 2018-07-02 15:10:54 +0300 |
---|---|---|
committer | Ruslan Teliuk <ruslantproductengine@lindenlab.com> | 2018-07-02 15:10:54 +0300 |
commit | 27b5ee16f29e2fd3377b343362443075638e059a (patch) | |
tree | 6f4d1d3dc6c8146f44dafcb03656c45adfc32adf /indra/newview/llviewertexture.cpp | |
parent | 3991a0f765d3d493bcc08ac2aadc707934f4d640 (diff) | |
parent | 3008962f0c990f4bfd270bee38152d2531ddfcd2 (diff) |
Merged lindenlab/viewer-cougar into default
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 39ffbfc989..712d0883d3 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1189,9 +1189,17 @@ void LLViewerFetchedTexture::loadFromFastCache() } mInFastCacheList = FALSE; + add(LLTextureFetch::sCacheAttempt, 1.0); + + LLTimer fastCacheTimer; mRawImage = LLAppViewer::getTextureCache()->readFromFastCache(getID(), mRawDiscardLevel); if(mRawImage.notNull()) { + F32 cachReadTime = fastCacheTimer.getElapsedTimeF32(); + + add(LLTextureFetch::sCacheHit, 1.0); + sample(LLTextureFetch::sCacheReadLatency, cachReadTime); + mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; setTexelsPerImage(); |