aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/lltextureview.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/lltextureview.cpp')
-rw-r--r--linden/indra/newview/lltextureview.cpp63
1 files changed, 32 insertions, 31 deletions
diff --git a/linden/indra/newview/lltextureview.cpp b/linden/indra/newview/lltextureview.cpp
index a2b3d47..49bc968 100644
--- a/linden/indra/newview/lltextureview.cpp
+++ b/linden/indra/newview/lltextureview.cpp
@@ -61,11 +61,11 @@ std::set<LLViewerImage*> LLTextureView::sDebugImages;
61 61
62//////////////////////////////////////////////////////////////////////////// 62////////////////////////////////////////////////////////////////////////////
63 63
64static LLString title_string1a("Tex UUID Area DDis(Req) DecodePri(Fetch) [download] pk/max"); 64static std::string title_string1a("Tex UUID Area DDis(Req) DecodePri(Fetch) [download] pk/max");
65static LLString title_string1b("Tex UUID Area DDis(Req) Fetch(DecodePri) [download] pk/max"); 65static std::string title_string1b("Tex UUID Area DDis(Req) Fetch(DecodePri) [download] pk/max");
66static LLString title_string2("State"); 66static std::string title_string2("State");
67static LLString title_string3("Pkt Bnd"); 67static std::string title_string3("Pkt Bnd");
68static LLString title_string4(" W x H (Dis) Mem"); 68static std::string title_string4(" W x H (Dis) Mem");
69 69
70static S32 title_x1 = 0; 70static S32 title_x1 = 0;
71static S32 title_x2 = 440; 71static S32 title_x2 = 440;
@@ -175,7 +175,7 @@ void LLTextureBar::draw()
175 // The texture UUID or name 175 // The texture UUID or name
176 // The progress bar for the texture, highlighted if it's being download 176 // The progress bar for the texture, highlighted if it's being download
177 // Various numerical stats. 177 // Various numerical stats.
178 char tex_str[256]; 178 std::string tex_str;
179 S32 left, right; 179 S32 left, right;
180 S32 top = 0; 180 S32 top = 0;
181 S32 bottom = top + 6; 181 S32 bottom = top + 6;
@@ -184,28 +184,28 @@ void LLTextureBar::draw()
184 LLGLSUIDefault gls_ui; 184 LLGLSUIDefault gls_ui;
185 185
186 // Name, pixel_area, requested pixel area, decode priority 186 // Name, pixel_area, requested pixel area, decode priority
187 char uuid_str[255]; 187 std::string uuid_str;
188 mImagep->mID.toString(uuid_str); 188 mImagep->mID.toString(uuid_str);
189 uuid_str[8] = 0; 189 uuid_str = uuid_str.substr(0,7);
190 if (mTextureView->mOrderFetch) 190 if (mTextureView->mOrderFetch)
191 { 191 {
192 sprintf(tex_str, "%s %7.0f %d(%d) 0x%08x(%8.0f)", 192 tex_str = llformat("%s %7.0f %d(%d) 0x%08x(%8.0f)",
193 uuid_str, 193 uuid_str.c_str(),
194 mImagep->mMaxVirtualSize, 194 mImagep->mMaxVirtualSize,
195 mImagep->mDesiredDiscardLevel, 195 mImagep->mDesiredDiscardLevel,
196 mImagep->mRequestedDiscardLevel, 196 mImagep->mRequestedDiscardLevel,
197 mImagep->mFetchPriority, 197 mImagep->mFetchPriority,
198 mImagep->getDecodePriority()); 198 mImagep->getDecodePriority());
199 } 199 }
200 else 200 else
201 { 201 {
202 sprintf(tex_str, "%s %7.0f %d(%d) %8.0f(0x%08x)", 202 tex_str = llformat("%s %7.0f %d(%d) %8.0f(0x%08x)",
203 uuid_str, 203 uuid_str.c_str(),
204 mImagep->mMaxVirtualSize, 204 mImagep->mMaxVirtualSize,
205 mImagep->mDesiredDiscardLevel, 205 mImagep->mDesiredDiscardLevel,
206 mImagep->mRequestedDiscardLevel, 206 mImagep->mRequestedDiscardLevel,
207 mImagep->getDecodePriority(), 207 mImagep->getDecodePriority(),
208 mImagep->mFetchPriority); 208 mImagep->mFetchPriority);
209 } 209 }
210 210
211 LLFontGL::sMonospace->renderUTF8(tex_str, 0, title_x1, getRect().getHeight(), 211 LLFontGL::sMonospace->renderUTF8(tex_str, 0, title_x1, getRect().getHeight(),
@@ -213,7 +213,7 @@ void LLTextureBar::draw()
213 213
214 // State 214 // State
215 // Hack: mirrored from lltexturefetch.cpp 215 // Hack: mirrored from lltexturefetch.cpp
216 struct { const char* desc; LLColor4 color; } fetch_state_desc[] = { 216 struct { const std::string desc; LLColor4 color; } fetch_state_desc[] = {
217 { "---", LLColor4::red }, // INVALID 217 { "---", LLColor4::red }, // INVALID
218 { "INI", LLColor4::white }, // INIT 218 { "INI", LLColor4::white }, // INIT
219 { "DSK", LLColor4::cyan }, // LOAD_FROM_TEXTURE_CACHE 219 { "DSK", LLColor4::cyan }, // LOAD_FROM_TEXTURE_CACHE
@@ -325,14 +325,14 @@ void LLTextureBar::draw()
325 LLGLSUIDefault gls_ui; 325 LLGLSUIDefault gls_ui;
326 // draw the packet data 326 // draw the packet data
327// { 327// {
328// LLString num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets); 328// std::string num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets);
329// LLFontGL::sMonospace->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color, 329// LLFontGL::sMonospace->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color,
330// LLFontGL::LEFT, LLFontGL::TOP); 330// LLFontGL::LEFT, LLFontGL::TOP);
331// } 331// }
332 332
333 // draw the image size at the end 333 // draw the image size at the end
334 { 334 {
335 LLString num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(), 335 std::string num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(),
336 mImagep->getDiscardLevel(), mImagep->mTextureMemory); 336 mImagep->getDiscardLevel(), mImagep->mTextureMemory);
337 LLFontGL::sMonospace->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color, 337 LLFontGL::sMonospace->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color,
338 LLFontGL::LEFT, LLFontGL::TOP); 338 LLFontGL::LEFT, LLFontGL::TOP);
@@ -459,14 +459,15 @@ void LLGLTexMemBar::draw()
459 459
460 //---------------------------------------------------------------------------- 460 //----------------------------------------------------------------------------
461 461
462 text = llformat("Textures: Count: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d(%d) RAW:%d", 462 text = llformat("Textures: Count: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d(%d) RAW:%d mRaw:%d mAux:%d CB:%d",
463 gImageList.getNumImages(), 463 gImageList.getNumImages(),
464 LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), 464 LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
465 LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount, 465 LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
466 LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(), 466 LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(),
467 LLLFSThread::sLocal->getPending(), 467 LLLFSThread::sLocal->getPending(),
468 LLImageWorker::sCount, LLImageWorker::getWorkerThread()->getNumDeletes(), 468 LLImageWorker::sCount, LLImageWorker::getWorkerThread()->getNumDeletes(),
469 LLImageRaw::sRawImageCount); 469 LLImageRaw::sRawImageCount, LLViewerImage::sRawCount, LLViewerImage::sAuxCount,
470 gImageList.mCallbackList.size());
470 471
471 LLFontGL::sMonospace->renderUTF8(text, 0, 0, line_height*2, 472 LLFontGL::sMonospace->renderUTF8(text, 0, 0, line_height*2,
472 text_color, LLFontGL::LEFT, LLFontGL::TOP); 473 text_color, LLFontGL::LEFT, LLFontGL::TOP);
@@ -474,13 +475,13 @@ void LLGLTexMemBar::draw()
474 S32 dx1 = 0; 475 S32 dx1 = 0;
475 if (LLAppViewer::getTextureFetch()->mDebugPause) 476 if (LLAppViewer::getTextureFetch()->mDebugPause)
476 { 477 {
477 LLFontGL::sMonospace->renderUTF8("!", 0, title_x1, line_height, 478 LLFontGL::sMonospace->renderUTF8(std::string("!"), 0, title_x1, line_height,
478 text_color, LLFontGL::LEFT, LLFontGL::TOP); 479 text_color, LLFontGL::LEFT, LLFontGL::TOP);
479 dx1 += 8; 480 dx1 += 8;
480 } 481 }
481 if (mTextureView->mFreezeView) 482 if (mTextureView->mFreezeView)
482 { 483 {
483 LLFontGL::sMonospace->renderUTF8("*", 0, title_x1, line_height, 484 LLFontGL::sMonospace->renderUTF8(std::string("*"), 0, title_x1, line_height,
484 text_color, LLFontGL::LEFT, LLFontGL::TOP); 485 text_color, LLFontGL::LEFT, LLFontGL::TOP);
485 dx1 += 8; 486 dx1 += 8;
486 } 487 }
@@ -713,8 +714,8 @@ void LLTextureView::draw()
713 714
714 /* 715 /*
715 count = gImageList.getNumImages(); 716 count = gImageList.getNumImages();
716 char info_string[512]; 717 std::string info_string;
717 sprintf(info_string, "Global Info:\nTexture Count: %d", count); 718 info_string = llformat("Global Info:\nTexture Count: %d", count);
718 mInfoTextp->setText(info_string); 719 mInfoTextp->setText(info_string);
719 */ 720 */
720 721