From 07137131cc145ec37c6f91afcd28b6c7c8d4b5a6 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 28 Oct 2021 22:40:25 -0400 Subject: [PATCH] Fast access to LLRender2D Singleton --- indra/llrender/llrender2dutils.cpp | 2 +- indra/llrender/lluiimage.cpp | 2 +- indra/llui/llui.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 076a55f7b85..026b3c8f098 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -965,7 +965,7 @@ void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha) } else { //polygon stipple is deprecated, use "Checker" texture - LLUIImagePtr img = LLRender2D::getInstance()->getUIImage("Checker"); + LLUIImagePtr img = LLRender2D::getInstanceFast()->getUIImage("Checker"); gGL.getTexUnit(0)->bind(img->getImage()); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_WRAP); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); diff --git a/indra/llrender/lluiimage.cpp b/indra/llrender/lluiimage.cpp index db6b1c0c7bb..1f555cbed39 100644 --- a/indra/llrender/lluiimage.cpp +++ b/indra/llrender/lluiimage.cpp @@ -138,7 +138,7 @@ namespace LLInitParam return; } - LLUIImage* imagep = LLRender2D::getInstance()->getUIImage(name()); + LLUIImage* imagep = LLRender2D::getInstanceFast()->getUIImage(name()); if (imagep) { updateValue(imagep); diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 3c485f2a53c..46b54b38770 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -318,9 +318,9 @@ class LLUI final : public LLParamSingleton<LLUI> static void setScaleFactor(const LLVector2& scale_factor); static void setLineWidth(F32 width) { LLRender2D::setLineWidth(width); } static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0) - { return LLRender2D::getInstance()->getUIImageByID(image_id, priority); } + { return LLRender2D::getInstanceFast()->getUIImageByID(image_id, priority); } static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0) - { return LLRender2D::getInstance()->getUIImage(name, priority); } + { return LLRender2D::getInstanceFast()->getUIImage(name, priority); } // // Data -- GitLab