summaryrefslogtreecommitdiff
path: root/indra/newview/llcolorswatch.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-05-07 11:14:26 -0700
committerdolphin <dolphin@lindenlab.com>2014-05-07 11:14:26 -0700
commit48fece44737fa8b9614fd864354d9287a216ea33 (patch)
treef68426d79f4631c6b49be142a92e59086870fa38 /indra/newview/llcolorswatch.cpp
parentae856ef31830912cec0f4de37167858a24e4ba30 (diff)
parentd0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff)
Merge with 3.7.7-release
Diffstat (limited to 'indra/newview/llcolorswatch.cpp')
-rwxr-xr-xindra/newview/llcolorswatch.cpp15
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
{