summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-17 17:58:17 -0500
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-11-17 17:58:17 -0500
commit32178873564f86f0ab9ee06d485486fc9d609012 (patch)
tree4beae7908cbdd5e6af5241682110ac958b7c56ae /indra/newview/llmediactrl.cpp
parent064fb26092ac9f73f9d0301f1e214e27e8418839 (diff)
parent2365dbcd459b37942ddacbcb7010232113a126c1 (diff)
Merge of viewer2 into avp
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 8f29f908e5..90c009887d 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -92,6 +92,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mStretchToFill( true ),
mMaintainAspectRatio ( true ),
mHideLoading (false),
+ mHidingInitialLoad (false),
mDecoupleTextureSize ( false ),
mTextureWidth ( 1024 ),
mTextureHeight ( 1024 )
@@ -616,6 +617,11 @@ bool LLMediaCtrl::ensureMediaSourceExists()
mMediaSource->setHomeURL(mHomePageUrl);
mMediaSource->setVisible( getVisible() );
mMediaSource->addObserver( this );
+
+ if(mHideLoading)
+ {
+ mHidingInitialLoad = true;
+ }
}
else
{
@@ -685,7 +691,13 @@ void LLMediaCtrl::draw()
{
setFrequentUpdates( false );
};
-
+
+ if(mHidingInitialLoad)
+ {
+ // If we're hiding loading, don't draw at all.
+ return;
+ }
+
// alpha off for this
LLGLSUIDefault gls_ui;
LLGLDisable gls_alphaTest( GL_ALPHA_TEST );
@@ -865,19 +877,15 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
case MEDIA_EVENT_NAVIGATE_BEGIN:
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_BEGIN, url is " << self->getNavigateURI() << LL_ENDL;
- if(mMediaSource && mHideLoading)
- {
- mMediaSource->suspendUpdates(true);
- }
};
break;
case MEDIA_EVENT_NAVIGATE_COMPLETE:
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL;
- if(mMediaSource && mHideLoading)
+ if(mHidingInitialLoad)
{
- mMediaSource->suspendUpdates(false);
+ mHidingInitialLoad = false;
}
};
break;