diff options
author | Richard Linden <none@none> | 2012-10-17 00:06:22 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-10-17 00:06:22 -0700 |
commit | e6ca5471a2a816a24888ae1b38332531b22b7254 (patch) | |
tree | 8eb0adb0db391bc775e79dee6486e2d51a6e3c04 /indra/newview/lltextureview.cpp | |
parent | 8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 (diff) |
SH-3275 Update viewer metrics system to be more flexible
put template parameter back in LLUnit units
added free function operators for mathematical manipulation of unit values
converted texture memory tracking to units
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rwxr-xr-x | indra/newview/lltextureview.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index c60b4155a0..a88233e120 100755 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -503,13 +503,13 @@ private: void LLGLTexMemBar::draw() { - S32 bound_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes); - S32 max_bound_mem = LLViewerTexture::sMaxBoundTextureMemInMegaBytes; - S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sTotalTextureMemoryInBytes); - S32 max_total_mem = LLViewerTexture::sMaxTotalTextureMemInMegaBytes; + LLUnit::Megabytes<S32> bound_mem = LLViewerTexture::sBoundTextureMemory; + LLUnit::Megabytes<S32> max_bound_mem = LLViewerTexture::sMaxBoundTextureMem; + LLUnit::Megabytes<S32> total_mem = LLViewerTexture::sTotalTextureMemory; + LLUnit::Megabytes<S32> max_total_mem = LLViewerTexture::sMaxTotalTextureMem; F32 discard_bias = LLViewerTexture::sDesiredDiscardBias; - F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ; - F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ; + F32 cache_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getUsage()).value() ; + F32 cache_max_usage = (F32)LLTrace::Megabytes(LLAppViewer::getTextureCache()->getMaxUsage()).value() ; S32 line_height = LLFontGL::getFontMonospace()->getLineHeight(); S32 v_offset = 0;//(S32)((texture_bar_height + 2.2f) * mTextureView->mNumTextureBars + 2.0f); F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024); @@ -526,10 +526,10 @@ void LLGLTexMemBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB", - total_mem, - max_total_mem, - bound_mem, - max_bound_mem, + total_mem.value(), + max_total_mem.value(), + bound_mem.value(), + max_bound_mem.value(), LLRenderTarget::sBytesAllocated/(1024*1024), LLImageRaw::sGlobalRawMemory >> 20, discard_bias, cache_usage, cache_max_usage); |