summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp7
-rw-r--r--indra/llplugin/llpluginclassmedia.h6
2 files changed, 11 insertions, 2 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 1a382643da..ed8d10a88c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -124,7 +124,8 @@ void LLPluginClassMedia::reset()
mCanPaste = false;
mMediaName.clear();
mMediaDescription.clear();
-
+ mBackgroundColor = LLColor4::white;
+
// media_browser class
mNavigateURI.clear();
mNavigateResultCode = -1;
@@ -234,6 +235,10 @@ void LLPluginClassMedia::idle(void)
message.setValueS32("height", mRequestedMediaHeight);
message.setValueS32("texture_width", mRequestedTextureWidth);
message.setValueS32("texture_height", mRequestedTextureHeight);
+ message.setValueReal("background_r", mBackgroundColor.mV[VX]);
+ message.setValueReal("background_g", mBackgroundColor.mV[VY]);
+ message.setValueReal("background_b", mBackgroundColor.mV[VZ]);
+ message.setValueReal("background_a", mBackgroundColor.mV[VW]);
mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue.
LL_DEBUGS("Plugin") << "Sending size_change" << LL_ENDL;
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index b58067733b..5a1928ab1d 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -39,7 +39,7 @@
#include "llrect.h"
#include "llpluginclassmediaowner.h"
#include <queue>
-
+#include "v4color.h"
class LLPluginClassMedia : public LLPluginProcessParentOwner
{
@@ -86,6 +86,8 @@ public:
void setSize(int width, int height);
void setAutoScale(bool auto_scale);
+ void setBackgroundColor(LLColor4 color) { mBackgroundColor = color; };
+
// Returns true if all of the texture parameters (depth, format, size, and texture size) are set up and consistent.
// This will initially be false, and will also be false for some time after setSize while the resize is processed.
// Note that if this returns true, it is safe to use all the get() functions above without checking for invalid return values
@@ -328,6 +330,8 @@ protected:
std::string mMediaName;
std::string mMediaDescription;
+ LLColor4 mBackgroundColor;
+
/////////////////////////////////////////
// media_browser class
std::string mNavigateURI;