diff options
| author | Richard Linden <none@none> | 2010-07-23 22:07:15 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2010-07-23 22:07:15 -0700 |
| commit | 6cc6f816780e64c5fb1e17a22fb5e473e75efe69 (patch) | |
| tree | 0fb764971547fc3e8e8fad3ec7a1856b77fb1ac9 /indra/llui/lllocalcliprect.cpp | |
| parent | 4d2daeed21dfba9d6a40e88ecd92aaaa6df92ae1 (diff) | |
first pass ui rendering performance improvements
Diffstat (limited to 'indra/llui/lllocalcliprect.cpp')
| -rw-r--r-- | indra/llui/lllocalcliprect.cpp | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/indra/llui/lllocalcliprect.cpp b/indra/llui/lllocalcliprect.cpp index 43c21e250c..55329f64e4 100644 --- a/indra/llui/lllocalcliprect.cpp +++ b/indra/llui/lllocalcliprect.cpp @@ -33,33 +33,8 @@ #include "lllocalcliprect.h" #include "llfontgl.h" -#include "llgl.h" #include "llui.h" -#include <stack> - -//--------------------------------------------------------------------------- -// LLScreenClipRect -// implementation class in screen space -//--------------------------------------------------------------------------- -class LLScreenClipRect -{ -public: - LLScreenClipRect(const LLRect& rect, BOOL enabled = TRUE); - virtual ~LLScreenClipRect(); - -private: - static void pushClipRect(const LLRect& rect); - static void popClipRect(); - static void updateScissorRegion(); - -private: - LLGLState mScissorState; - BOOL mEnabled; - - static std::stack<LLRect> sClipRectStack; -}; - /*static*/ std::stack<LLRect> LLScreenClipRect::sClipRectStack; @@ -131,16 +106,11 @@ void LLScreenClipRect::updateScissorRegion() // LLLocalClipRect //--------------------------------------------------------------------------- LLLocalClipRect::LLLocalClipRect(const LLRect& rect, BOOL enabled /* = TRUE */) -{ - LLRect screen(rect.mLeft + LLFontGL::sCurOrigin.mX, - rect.mTop + LLFontGL::sCurOrigin.mY, - rect.mRight + LLFontGL::sCurOrigin.mX, - rect.mBottom + LLFontGL::sCurOrigin.mY); - mScreenClipRect = new LLScreenClipRect(screen, enabled); -} +: LLScreenClipRect(LLRect(rect.mLeft + LLFontGL::sCurOrigin.mX, + rect.mTop + LLFontGL::sCurOrigin.mY, + rect.mRight + LLFontGL::sCurOrigin.mX, + rect.mBottom + LLFontGL::sCurOrigin.mY), enabled) +{} LLLocalClipRect::~LLLocalClipRect() -{ - delete mScreenClipRect; - mScreenClipRect = NULL; -} +{} |
