summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-11-18 18:17:50 -0800
committercallum_linden <none@none>2015-11-18 18:17:50 -0800
commit32691c441664821fcb29824461ed85277ae418c8 (patch)
tree6bba3ce01bff7d253198751d4fa754bb002580a0
parent311b376ab50bacf2bf113616af2a5bbedfcd5ee5 (diff)
initial support for dropdown menus/select widgits
-rwxr-xr-xautobuild.xml10
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp28
2 files changed, 28 insertions, 10 deletions
diff --git a/autobuild.xml b/autobuild.xml
index c140159999..a62f75a0c1 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1536,11 +1536,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>db32cc2c0d898d69d01ef61df81424e8</string>
+ <string>e632f94b6f94a9563ccdfca6da38fb27</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/307893/arch/Darwin/installer/llceflib-1.4.0.307893-darwin-307893.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308049/arch/Darwin/installer/llceflib-1.4.0.308049-darwin-308049.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1550,18 +1550,18 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>3c7f10479a6c4e0910df91b195be393f</string>
+ <string>41454f05cea1149d5124d28fc3db6ae0</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/307893/arch/CYGWIN/installer/llceflib-1.4.0.307893-windows-307893.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308049/arch/CYGWIN/installer/llceflib-1.4.0.308049-windows-308049.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>version</key>
- <string>1.4.0.307893</string>
+ <string>1.4.0.308049</string>
</map>
<key>llphysicsextensions_source</key>
<map>
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index a53b453b3e..ec3518100b 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -56,7 +56,7 @@ public:
private:
bool init();
- void onPageChangedCallback(unsigned char* pixels, int width, int height);
+ void onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup);
void onCustomSchemeURLCallback(std::string url);
void onConsoleMessageCallback(std::string message, std::string source, int line);
void onStatusMessageCallback(std::string value);
@@ -149,13 +149,31 @@ void MediaPluginCEF::postDebugMessage(const std::string& msg)
////////////////////////////////////////////////////////////////////////////////
//
-void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int width, int height)
+void MediaPluginCEF::onPageChangedCallback(unsigned char* pixels, int x, int y, int width, int height, bool is_popup)
{
if (mPixels && pixels)
{
- if (mWidth == width && mHeight == height)
+ if (is_popup)
{
- memcpy(mPixels, pixels, mWidth * mHeight * mDepth);
+ for (int line = 0; line < height; ++line)
+ {
+ int inverted_y = mHeight - y - height;
+ int src = line * width * mDepth;
+ int dst = (inverted_y + line) * mWidth * mDepth + x * mDepth;
+
+ if (dst + width * mDepth < mWidth * mHeight * mDepth)
+ {
+ memcpy(mPixels + dst, pixels + src, width * mDepth);
+ }
+ }
+ }
+ else
+ {
+ if (mWidth == width && mHeight == height)
+ {
+ memcpy(mPixels, pixels, mWidth * mHeight * mDepth);
+ }
+
}
setDirty(0, 0, mWidth, mHeight);
}
@@ -399,7 +417,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
if (message_name == "init")
{
// event callbacks from LLCefLib
- mLLCEFLib->setOnPageChangedCallback(boost::bind(&MediaPluginCEF::onPageChangedCallback, this, _1, _2, _3));
+ mLLCEFLib->setOnPageChangedCallback(boost::bind(&MediaPluginCEF::onPageChangedCallback, this, _1, _2, _3, _4, _5, _6));
mLLCEFLib->setOnCustomSchemeURLCallback(boost::bind(&MediaPluginCEF::onCustomSchemeURLCallback, this, _1));
mLLCEFLib->setOnConsoleMessageCallback(boost::bind(&MediaPluginCEF::onConsoleMessageCallback, this, _1, _2, _3));
mLLCEFLib->setOnStatusMessageCallback(boost::bind(&MediaPluginCEF::onStatusMessageCallback, this, _1));