diff options
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rw-r--r-- | indra/newview/lltextureview.cpp | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 84cd6e2da7..f410217387 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 @@ -642,9 +643,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() @@ -673,7 +674,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 ; @@ -686,13 +687,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() { @@ -721,14 +722,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; } @@ -900,7 +901,7 @@ void LLTextureView::draw() if (mPrintList) { - mPrintList = FALSE; + mPrintList = false; } static S32 max_count = 50; @@ -949,7 +950,7 @@ void LLTextureView::draw() addChild(mAvatarTexBar); sendChildToFront(mAvatarTexBar); - reshape(getRect().getWidth(), getRect().getHeight(), TRUE); + reshape(getRect().getWidth(), getRect().getHeight(), true); LLUI::popMatrix(); LLUI::pushMatrix(); @@ -961,7 +962,7 @@ void LLTextureView::draw() LLView *viewp = *child_iter; if (viewp->getRect().mBottom < 0) { - viewp->setVisible(FALSE); + viewp->setVisible(false); } } } @@ -970,7 +971,7 @@ void LLTextureView::draw() } -BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) +bool LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite) { llassert(imagep); @@ -990,42 +991,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; } |