diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-18 16:57:57 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-18 17:27:12 +0300 |
commit | 0d7f6d917af2e0b19a32a925ded6fab4b1a6725e (patch) | |
tree | bf99cbd68261b3b4c61b1f3d042044eb76db6fa2 /indra/newview | |
parent | a5c8b1cbe20c2ccd609f550ff4983741f622fc27 (diff) |
SL-13729 Performance of LLUI and LLRender2D #3
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 2 |
2 files changed, 17 insertions, 18 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index f025863072..b4361b3968 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1524,10 +1524,9 @@ void render_ui_2d() if (gSavedSettings.getBOOL("RenderUIBuffer")) { - LLUI* ui_inst = LLUI::getInstance(); - if (ui_inst->mDirty) + if (LLView::sIsRectDirty) { - ui_inst->mDirty = FALSE; + LLView::sIsRectDirty = false; LLRect t_rect; gPipeline.mUIScreen.bindTarget(); @@ -1535,25 +1534,25 @@ void render_ui_2d() { static const S32 pad = 8; - ui_inst->mDirtyRect.mLeft -= pad; - ui_inst->mDirtyRect.mRight += pad; - ui_inst->mDirtyRect.mBottom -= pad; - ui_inst->mDirtyRect.mTop += pad; + LLView::sDirtyRect.mLeft -= pad; + LLView::sDirtyRect.mRight += pad; + LLView::sDirtyRect.mBottom -= pad; + LLView::sDirtyRect.mTop += pad; LLGLEnable scissor(GL_SCISSOR_TEST); - static LLRect last_rect = ui_inst->mDirtyRect; + static LLRect last_rect = LLView::sDirtyRect; //union with last rect to avoid mouse poop - last_rect.unionWith(ui_inst->mDirtyRect); + last_rect.unionWith(LLView::sDirtyRect); - t_rect = ui_inst->mDirtyRect; - ui_inst->mDirtyRect = last_rect; + t_rect = LLView::sDirtyRect; + LLView::sDirtyRect = last_rect; last_rect = t_rect; - - last_rect.mLeft = LLRect::tCoordType(last_rect.mLeft / ui_inst->getScaleFactor().mV[0]); - last_rect.mRight = LLRect::tCoordType(last_rect.mRight / ui_inst->getScaleFactor().mV[0]); - last_rect.mTop = LLRect::tCoordType(last_rect.mTop / ui_inst->getScaleFactor().mV[1]); - last_rect.mBottom = LLRect::tCoordType(last_rect.mBottom / ui_inst->getScaleFactor().mV[1]); + + last_rect.mLeft = LLRect::tCoordType(last_rect.mLeft / LLUI::getScaleFactor().mV[0]); + last_rect.mRight = LLRect::tCoordType(last_rect.mRight / LLUI::getScaleFactor().mV[0]); + last_rect.mTop = LLRect::tCoordType(last_rect.mTop / LLUI::getScaleFactor().mV[1]); + last_rect.mBottom = LLRect::tCoordType(last_rect.mBottom / LLUI::getScaleFactor().mV[1]); LLRect clip_rect(last_rect); @@ -1565,7 +1564,7 @@ void render_ui_2d() gPipeline.mUIScreen.flush(); gGL.setColorMask(true, false); - ui_inst->mDirtyRect = t_rect; + LLView::sDirtyRect = t_rect; } LLGLDisable cull(GL_CULL_FACE); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0cc1e0df06..85c8b42da9 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2580,7 +2580,7 @@ void LLViewerWindow::draw() if (!gSavedSettings.getBOOL("RenderUIBuffer")) { - LLUI::getInstance()->mDirtyRect = getWindowRectScaled(); + LLView::sDirtyRect = getWindowRectScaled(); } // HACK for timecode debugging |