diff options
author | Richard Linden <none@none> | 2013-07-30 19:15:46 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-07-30 19:15:46 -0700 |
commit | 5762c1d0d727f0050aefe7126ab2d5280bebfb9b (patch) | |
tree | 78bdcc931460dfc45d35cd1707ddf1afdf049a2e /indra/newview/llcolorswatch.cpp | |
parent | 4cca9ba279f908f206fa5e32adccf1038f05cc7f (diff) | |
parent | 910874a7e32bdfc456474e2d0ee84d190be3011e (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-interesting
Diffstat (limited to 'indra/newview/llcolorswatch.cpp')
-rwxr-xr-x | indra/newview/llcolorswatch.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
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<LLColorSwatchCtrl> r("color_swatch"); @@ -239,16 +237,9 @@ void LLColorSwatchCtrl::draw() } else { - if (!mFallbackImageName.empty()) + if (mFallbackImage.notNull()) { - LLPointer<LLViewerFetchedTexture> 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 { |