diff options
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rw-r--r-- | indra/newview/lltextureview.cpp | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 62703e3499..9ccb2f419f 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -107,7 +107,7 @@ public: {} virtual void draw(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual LLRect getRequiredRect(); // Return the height of this object, given the set options. // Used for sorting @@ -343,12 +343,12 @@ void LLTextureBar::draw() } -BOOL LLTextureBar::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLTextureBar::handleMouseDown(S32 x, S32 y, MASK mask) { if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == MASK_ALT) { LLAppViewer::getTextureFetch()->mDebugID = mImagep->getID(); - return TRUE; + return true; } return LLView::handleMouseDown(x,y,mask); } @@ -384,7 +384,7 @@ public: {} virtual void draw(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual LLRect getRequiredRect(); // Return the height of this object, given the set options. private: @@ -440,9 +440,9 @@ void LLAvatarTexBar::draw() header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); } -BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) { - return FALSE; + return false; } LLRect LLAvatarTexBar::getRequiredRect() @@ -475,7 +475,7 @@ public: {} virtual void draw(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual LLRect getRequiredRect(); // Return the height of this object, given the set options. private: @@ -529,11 +529,12 @@ void LLGLTexMemBar::draw() U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f); U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f); - text = llformat("GL Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB", + text = llformat("GL Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f(%d MB) Cache: %.1f/%.1f MB", gViewerWindow->getWindow()->getAvailableVRAMMegabytes(), LLMemory::getAvailableMemKB()/1024, LLRenderTarget::sBytesAllocated/(1024*1024), discard_bias, + (S32)LLViewerTexture::sFreeVRAMMegabytes, cache_usage, cache_max_usage); //, cache_entries, cache_max_entries @@ -589,7 +590,7 @@ void LLGLTexMemBar::draw() LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, - &x_right, FALSE); + &x_right, false); F32Kilobits bandwidth(LLAppViewer::getTextureFetch()->getTextureBandwidth()); F32Kilobits max_bandwidth(gSavedSettings.getF32("ThrottleBandwidthKBPS")); @@ -643,9 +644,9 @@ void LLGLTexMemBar::draw() text_color, LLFontGL::LEFT, LLFontGL::TOP); } -BOOL LLGLTexMemBar::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLGLTexMemBar::handleMouseDown(S32 x, S32 y, MASK mask) { - return FALSE; + return false; } LLRect LLGLTexMemBar::getRequiredRect() @@ -674,7 +675,7 @@ public: void setTop(S32 loaded, S32 bound, F32 scale) {mTopLoaded = loaded ; mTopBound = bound; mScale = scale ;} void draw(); - BOOL handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) ; + bool handleHover(S32 x, S32 y, MASK mask, bool set_pick_size) ; private: S32 mIndex ; @@ -687,13 +688,13 @@ private: F32 mScale ; }; -BOOL LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) +bool LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, bool set_pick_size) { if(y > mBottom && (y < mBottom + (S32)(mTopLoaded * mScale) || y < mBottom + (S32)(mTopBound * mScale))) { LLImageGL::setCurTexSizebar(mIndex, set_pick_size); } - return TRUE ; + return true ; } void LLGLTexSizeBar::draw() { @@ -722,14 +723,14 @@ void LLGLTexSizeBar::draw() LLTextureView::LLTextureView(const LLTextureView::Params& p) : LLContainerView(p), - mFreezeView(FALSE), - mOrderFetch(FALSE), - mPrintList(FALSE), + mFreezeView(false), + mOrderFetch(false), + mPrintList(false), mNumTextureBars(0) { - setVisible(FALSE); + setVisible(false); - setDisplayChildren(TRUE); + setDisplayChildren(true); mGLTexMemBar = 0; mAvatarTexBar = 0; } @@ -901,7 +902,7 @@ void LLTextureView::draw() if (mPrintList) { - mPrintList = FALSE; + mPrintList = false; } static S32 max_count = 50; @@ -950,7 +951,7 @@ void LLTextureView::draw() addChild(mAvatarTexBar); sendChildToFront(mAvatarTexBar); - reshape(getRect().getWidth(), getRect().getHeight(), TRUE); + reshape(getRect().getWidth(), getRect().getHeight(), true); LLUI::popMatrix(); LLUI::pushMatrix(); @@ -962,7 +963,7 @@ void LLTextureView::draw() LLView *viewp = *child_iter; if (viewp->getRect().mBottom < 0) { - viewp->setVisible(FALSE); + viewp->setVisible(false); } } } @@ -971,7 +972,7 @@ void LLTextureView::draw() } -BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) +bool LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) { llassert(imagep); @@ -991,42 +992,42 @@ BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) addChild(barp); mTextureBars.push_back(barp); - return TRUE; + return true; } -BOOL LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask) { if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == (MASK_ALT|MASK_SHIFT)) { - mPrintList = TRUE; - return TRUE; + mPrintList = true; + return true; } if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == (MASK_CONTROL|MASK_SHIFT)) { LLAppViewer::getTextureFetch()->mDebugPause = !LLAppViewer::getTextureFetch()->mDebugPause; - return TRUE; + return true; } if (mask & MASK_SHIFT) { mFreezeView = !mFreezeView; - return TRUE; + return true; } if (mask & MASK_CONTROL) { mOrderFetch = !mOrderFetch; - return TRUE; + return true; } return LLView::handleMouseDown(x,y,mask); } -BOOL LLTextureView::handleMouseUp(S32 x, S32 y, MASK mask) +bool LLTextureView::handleMouseUp(S32 x, S32 y, MASK mask) { - return FALSE; + return false; } -BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent) +bool LLTextureView::handleKey(KEY key, MASK mask, bool called_from_parent) { - return FALSE; + return false; } |