From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llcolorswatch.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'indra/newview/llcolorswatch.cpp') diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index f1f7da5fd1..a03178adf6 100755 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -37,13 +37,11 @@ #include "llui.h" #include "llrender.h" #include "lluiconstants.h" -#include "llviewercontrol.h" #include "llbutton.h" -#include "lltextbox.h" #include "llfloatercolorpicker.h" #include "llviewborder.h" -#include "llviewertexturelist.h" #include "llfocusmgr.h" +#include "lltextbox.h" static LLDefaultChildRegistry::Register r("color_swatch"); @@ -239,16 +237,9 @@ void LLColorSwatchCtrl::draw() } else { - if (!mFallbackImageName.empty()) + if (mFallbackImage.notNull()) { - LLPointer fallback_image = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, FTT_LOCAL_FILE, TRUE, - LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); - if( fallback_image->getComponents() == 4 ) - { - gl_rect_2d_checkerboard( interior ); - } - gl_draw_scaled_image( interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), fallback_image, LLColor4::white % alpha); - fallback_image->addTextureStats( (F32)(interior.getWidth() * interior.getHeight()) ); + mFallbackImage->draw(interior.mLeft, interior.mBottom, interior.getWidth(), interior.getHeight(), LLColor4::white % alpha); } else { -- cgit v1.2.3