summaryrefslogtreecommitdiff
path: root/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-03-09 19:43:11 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-03-09 19:43:11 +0200
commitcbbddc8eaa694d7a8e37d188350fcb6ca88124fe (patch)
tree4f583ff144e637560c88069ef79d199d9b449686 /indra/newview/lltextureview.cpp
parentb513811c7be5e4d71dfc2c2a8d07e738c990293a (diff)
parentcaa1435ae0afa0e4ac2fe42fc8dc67dd93cdb524 (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rw-r--r--indra/newview/lltextureview.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 98731f90f4..6cd8a78b25 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -658,6 +658,14 @@ struct compare_decode_pair
}
};
+struct KillView
+{
+ void operator()(LLView* viewp) const
+ {
+ viewp->die();
+ }
+};
+
void LLTextureView::draw()
{
if (!mFreezeView)
@@ -665,12 +673,12 @@ void LLTextureView::draw()
// LLViewerObject *objectp;
// S32 te;
- for_each(mTextureBars.begin(), mTextureBars.end(), DeletePointer());
+ for_each(mTextureBars.begin(), mTextureBars.end(), KillView());
mTextureBars.clear();
-
- delete mGLTexMemBar;
+
+ delete mGLTexMemBar;
mGLTexMemBar = 0;
-
+
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
display_list_t display_image_list;
@@ -683,6 +691,10 @@ void LLTextureView::draw()
iter != gTextureList.mImageList.end(); )
{
LLPointer<LLViewerFetchedTexture> imagep = *iter++;
+ if(!imagep->hasFetcher())
+ {
+ continue ;
+ }
S32 cur_discard = imagep->getDiscardLevel();
S32 desired_discard = imagep->mDesiredDiscardLevel;