summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index e5a1bed48c..6e5193f6a3 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1178,9 +1178,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();