diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-08-11 12:50:24 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-08-11 12:50:24 +0300 |
commit | 1be08814e252654db98ce8c39dc8b4cf89c2e1dc (patch) | |
tree | 2c55d8452d4e5232fec5f49f98f63884ee06da68 | |
parent | c61d0f42973f1d58e4e6b5b8a4e0911ed0602bb7 (diff) |
DRTVWR-493 tiny optimization
-rw-r--r-- | indra/llrender/llrender2dutils.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 0467321e3b..508bccec11 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -106,10 +106,11 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixe top += LLFontGL::sCurOrigin.mY; gGL.loadUIIdentity(); - gl_rect_2d(llfloor((F32)left * LLRender2D::getInstance()->mGLScaleFactor.mV[VX]) - pixel_offset, - llfloor((F32)top * LLRender2D::getInstance()->mGLScaleFactor.mV[VY]) + pixel_offset, - llfloor((F32)right * LLRender2D::getInstance()->mGLScaleFactor.mV[VX]) + pixel_offset, - llfloor((F32)bottom * LLRender2D::getInstance()->mGLScaleFactor.mV[VY]) - pixel_offset, + LLRender2D *r2d_inst = LLRender2D::getInstance(); + gl_rect_2d(llfloor((F32)left * r2d_inst->mGLScaleFactor.mV[VX]) - pixel_offset, + llfloor((F32)top * r2d_inst->mGLScaleFactor.mV[VY]) + pixel_offset, + llfloor((F32)right * r2d_inst->mGLScaleFactor.mV[VX]) + pixel_offset, + llfloor((F32)bottom * r2d_inst->mGLScaleFactor.mV[VY]) - pixel_offset, filled); gGL.popUIMatrix(); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 48eed20861..e1409d31ce 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1508,9 +1508,9 @@ void render_ui_2d() if (gSavedSettings.getBOOL("RenderUIBuffer")) { LLUI* ui_inst = LLUI::getInstance(); - if (LLUI::getInstance()->mDirty) + if (ui_inst->mDirty) { - LLUI::getInstance()->mDirty = FALSE; + ui_inst->mDirty = FALSE; LLRect t_rect; gPipeline.mUIScreen.bindTarget(); |