summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-27 21:10:46 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-27 21:10:46 +0300
commit97c372047c14ce9966a41744c15b79d27ce8fba4 (patch)
treec76f295a414ebcfae6e64f85d7ff9d1467e7067d /indra/newview
parent5828d061144fe1d15580dc6f9e00d7dcf93456ea (diff)
parent07e78807a8b3657ee2303dc22187d858cf8be625 (diff)
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermedia.cpp9
-rw-r--r--indra/newview/llviewermedia.h2
-rw-r--r--indra/newview/llviewermedia_streamingaudio.cpp3
-rw-r--r--indra/newview/llwlparamset.cpp17
4 files changed, 26 insertions, 5 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 00d14f1fd5..43b4102bca 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1576,7 +1576,7 @@ void LLViewerMedia::createSpareBrowserMediaSource()
// The null owner will keep the browser plugin from fully initializing
// (specifically, it keeps LLPluginClassMedia from negotiating a size change,
// which keeps MediaPluginWebkit::initBrowserWindow from doing anything until we have some necessary data, like the background color)
- sSpareBrowserMediaSource = LLViewerMediaImpl::newSourceFromMediaType(HTTP_CONTENT_TEXT_HTML, NULL, 0, 0);
+ sSpareBrowserMediaSource = LLViewerMediaImpl::newSourceFromMediaType(HTTP_CONTENT_TEXT_HTML, NULL, 0, 0, 1.0);
}
}
@@ -1848,7 +1848,7 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type)
//////////////////////////////////////////////////////////////////////////////////////////
/*static*/
-LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target, bool clean_browser)
+LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, F64 zoom_factor, const std::string target, bool clean_browser)
{
std::string plugin_basename = LLMIMETypes::implType(media_type);
LLPluginClassMedia* media_source = NULL;
@@ -1865,6 +1865,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
media_source->setOwner(owner);
media_source->setTarget(target);
media_source->setSize(default_width, default_height);
+ media_source->setZoomFactor(zoom_factor);
return media_source;
}
@@ -1913,6 +1914,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
media_source->setSize(default_width, default_height);
media_source->setUserDataPath(user_data_path_cache, user_data_path_cookies);
media_source->setLanguageCode(LLUI::getLanguage());
+ media_source->setZoomFactor(zoom_factor);
// collect 'cookies enabled' setting from prefs and send to embedded browser
bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" );
@@ -1969,6 +1971,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
// Save the previous media source's last set size before destroying it.
mMediaWidth = mMediaSource->getSetWidth();
mMediaHeight = mMediaSource->getSetHeight();
+ mZoomFactor = mMediaSource->getZoomFactor();
}
// Always delete the old media impl first.
@@ -1991,7 +1994,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
// Save the MIME type that really caused the plugin to load
mCurrentMimeType = mMimeType;
- LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight, mTarget, mCleanBrowser);
+ LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight, mZoomFactor, mTarget, mCleanBrowser);
if (media_source)
{
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index db07f4115b..5c876861c4 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -302,7 +302,7 @@ public:
void setTarget(const std::string& target) { mTarget = target; }
// utility function to create a ready-to-use media instance from a desired media type.
- static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null, bool clean_browser = false);
+ static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, F64 zoom_factor, const std::string target = LLStringUtil::null, bool clean_browser = false);
// Internally set our desired browser user agent string, including
// the Second Life version and skin name. Used because we can
diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp
index c107e8472c..3ccf3070ab 100644
--- a/indra/newview/llviewermedia_streamingaudio.cpp
+++ b/indra/newview/llviewermedia_streamingaudio.cpp
@@ -154,7 +154,8 @@ LLPluginClassMedia* LLStreamingAudio_MediaPlugins::initializeMedia(const std::st
{
LLPluginClassMediaOwner* owner = NULL;
S32 default_size = 1; // audio-only - be minimal, doesn't matter
- LLPluginClassMedia* media_source = LLViewerMediaImpl::newSourceFromMediaType(media_type, owner, default_size, default_size);
+ F64 default_zoom = 1.0;
+ LLPluginClassMedia* media_source = LLViewerMediaImpl::newSourceFromMediaType(media_type, owner, default_size, default_size, default_zoom);
if (media_source)
{
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 482a2a61e2..066cb9a0ac 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -288,6 +288,14 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
{
// set up the iterators
+ // keep cloud positions and coverage the same
+ /// TODO masking will do this later
+ F32 cloudPos1X = (F32) mParamValues["cloud_pos_density1"][0].asReal();
+ F32 cloudPos1Y = (F32) mParamValues["cloud_pos_density1"][1].asReal();
+ F32 cloudPos2X = (F32) mParamValues["cloud_pos_density2"][0].asReal();
+ F32 cloudPos2Y = (F32) mParamValues["cloud_pos_density2"][1].asReal();
+ F32 cloudCover = (F32) mParamValues["cloud_shadow"][0].asReal();
+
LLSD srcVal;
LLSD destVal;
@@ -371,6 +379,15 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
setSunAngle((1 - weight) * srcSunAngle + weight * destSunAngle);
setEastAngle((1 - weight) * srcEastAngle + weight * destEastAngle);
+
+ // now setup the sun properly
+
+ // reset those cloud positions
+ mParamValues["cloud_pos_density1"][0] = cloudPos1X;
+ mParamValues["cloud_pos_density1"][1] = cloudPos1Y;
+ mParamValues["cloud_pos_density2"][0] = cloudPos2X;
+ mParamValues["cloud_pos_density2"][1] = cloudPos2Y;
+ mParamValues["cloud_shadow"][0] = cloudCover;
}
void LLWLParamSet::updateCloudScrolling(void)