summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2009-11-16 17:53:18 -0800
committerMonroe Linden <monroe@lindenlab.com>2009-11-16 17:53:18 -0800
commit27a555e443c98ce1a41ef21e6111bdfe903894e8 (patch)
tree6b926bc88089d8e3dcdcc7143b9e424173a68cba /indra/newview/llmediactrl.cpp
parentd504efe3018bd0ce616e67c30b0bb31f5637973a (diff)
Hopefully the final fix for DEV-42800 (white flash at login).
Reinstated the hide_loading parameter to LLMediaCtrl, and made it cause LLMediaCtrl::draw() to early-exit between creating the LLViewerMediaImpl and receiving the initial MEDIA_EVENT_NAVIGATE_COMPLETE.
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;