diff options
| author | Baker Linden <baker@lindenlab.com> | 2014-05-08 14:00:55 -0700 |
|---|---|---|
| committer | Baker Linden <baker@lindenlab.com> | 2014-05-08 14:00:55 -0700 |
| commit | 37bfd025aeef7292abb1708577eee80b6e1b91d5 (patch) | |
| tree | 3dab7c728f3a4b67eae30cbbf838dec8747c5e6e /indra/newview/llcolorswatch.cpp | |
| parent | 1cf659d4481983684c4d5d749d95d56832dbc621 (diff) | |
| parent | d0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff) | |
viewer-release merge (to 3.7.8)
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 { |
