summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallum_linden <none@none>2019-06-10 14:09:31 -0700
committercallum_linden <none@none>2019-06-10 14:09:31 -0700
commit7bce446b28fc7f7f93b2c4927dac2f9da0835264 (patch)
tree580586202d78518f49fdc903f11100891d5de2cf
parent2672194b1d3eb03648861a29e57d81a38f527746 (diff)
Changes from @andreyk for improved mouse scroll wheel performance and pull in new Dullahan with CEF 74.1.19_gb62bacf_chromium-74.0.3729.157
-rw-r--r--autobuild.xml14
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/llplugin/llpluginclassmedia.h2
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp7
-rw-r--r--indra/newview/llmediactrl.cpp5
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp16
-rw-r--r--indra/newview/llviewermedia.cpp4
-rw-r--r--indra/newview/llviewermedia.h2
-rw-r--r--indra/newview/llviewermediafocus.cpp7
9 files changed, 32 insertions, 29 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 5f072512c1..88900a4f29 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -580,9 +580,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>23aeaf23e7db2484a1850017141860dd</string>
+ <string>c3c10098d8c9c86bd3392c3441591554</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/34069/283470/dullahan-1.1.1320_3.3626.1895.g7001d56-darwin64-525361.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/38807/327515/dullahan-1.1.2200_74.1.19_gb62bacf_chromium-74.0.3729.157-darwin64-527989.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -592,9 +592,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>71fa66203326aca918796e874976c080</string>
+ <string>f8a1da6f464b3a19d2e087525ab97855</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/34070/283477/dullahan-1.1.1320_3.3626.1895.g7001d56-windows-525361.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/38808/327521/dullahan-1.1.2200_74.1.19_gb62bacf_chromium-74.0.3729.157-windows-527989.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -604,16 +604,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c7162e4805f50a3609f5dc63d0cf2bc0</string>
+ <string>bd481e6adfe1280fef7d9f840133421e</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/34071/283480/dullahan-1.1.1320_3.3626.1895.g7001d56-windows64-525361.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/38809/327525/dullahan-1.1.2200_74.1.19_gb62bacf_chromium-74.0.3729.157-windows64-527989.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
- <string>1.1.1320_3.3626.1895.g7001d56</string>
+ <string>1.1.2200_74.1.19_gb62bacf_chromium-74.0.3729.157</string>
</map>
<key>elfio</key>
<map>
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 9d447b0f37..cdf2ddde6c 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -656,12 +656,14 @@ bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifie
return result;
}
-void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
+void LLPluginClassMedia::scrollEvent(int x, int y, int clicks_x, int clicks_y, MASK modifiers)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
message.setValueS32("x", x);
message.setValueS32("y", y);
+ message.setValueS32("clicks_x", clicks_x);
+ message.setValueS32("clicks_y", clicks_y);
message.setValue("modifiers", translateModifiers(modifiers));
sendMessage(message);
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 4f52afb317..9d11ee0421 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -118,7 +118,7 @@ public:
bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
- void scrollEvent(int x, int y, MASK modifiers);
+ void scrollEvent(int x, int y, int clicks_x, int clicks_y, MASK modifiers);
// enable/disable media plugin debugging messages and info spam
void enableMediaPluginDebugging( bool enable );
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 66b316df90..40b480a84e 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -652,10 +652,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
{
S32 x = message_in.getValueS32("x");
S32 y = message_in.getValueS32("y");
+ S32 delta_x = message_in.getValueS32("clicks_x");
+ S32 delta_y = message_in.getValueS32("clicks_y");
const int scaling_factor = 40;
- y *= -scaling_factor;
+ delta_x *= -scaling_factor;
+ delta_y *= -scaling_factor;
- mCEFLib->mouseWheel(x, y);
+ mCEFLib->mouseWheel(x, y, delta_x, delta_y);
}
else if (message_name == "text_event")
{
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 7f6955d08c..1d3a026049 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -202,7 +202,10 @@ BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
if (LLPanel::handleScrollWheel(x, y, clicks)) return TRUE;
if (mMediaSource && mMediaSource->hasMedia())
- mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE));
+ {
+ convertInputCoords(x, y);
+ mMediaSource->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(TRUE));
+ }
return TRUE;
}
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 5f413fc3c0..c74c2e0fd8 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -547,17 +547,17 @@ void LLPanelPrimMediaControls::updateShape()
switch (mScrollState)
{
case SCROLL_UP:
- media_impl->scrollWheel(0, -1, MASK_NONE);
+ media_impl->scrollWheel(0, 0, 0, -1, MASK_NONE);
break;
case SCROLL_DOWN:
- media_impl->scrollWheel(0, 1, MASK_NONE);
+ media_impl->scrollWheel(0, 0, 0, 1, MASK_NONE);
break;
case SCROLL_LEFT:
- media_impl->scrollWheel(1, 0, MASK_NONE);
+ media_impl->scrollWheel(0, 0, 1, 0, MASK_NONE);
// media_impl->handleKeyHere(KEY_LEFT, MASK_NONE);
break;
case SCROLL_RIGHT:
- media_impl->scrollWheel(-1, 0, MASK_NONE);
+ media_impl->scrollWheel(0, 0, -1, 0, MASK_NONE);
// media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
break;
case SCROLL_NONE:
@@ -1134,7 +1134,7 @@ void LLPanelPrimMediaControls::onScrollUp(void* user_data)
if(impl)
{
- impl->scrollWheel(0, -1, MASK_NONE);
+ impl->scrollWheel(0, 0, 0, -1, MASK_NONE);
}
}
void LLPanelPrimMediaControls::onScrollUpHeld(void* user_data)
@@ -1151,7 +1151,7 @@ void LLPanelPrimMediaControls::onScrollRight(void* user_data)
if(impl)
{
- impl->scrollWheel(-1, 0, MASK_NONE);
+ impl->scrollWheel(0, 0, -1, 0, MASK_NONE);
// impl->handleKeyHere(KEY_RIGHT, MASK_NONE);
}
}
@@ -1170,7 +1170,7 @@ void LLPanelPrimMediaControls::onScrollLeft(void* user_data)
if(impl)
{
- impl->scrollWheel(1, 0, MASK_NONE);
+ impl->scrollWheel(0, 0, 1, 0, MASK_NONE);
// impl->handleKeyHere(KEY_LEFT, MASK_NONE);
}
}
@@ -1189,7 +1189,7 @@ void LLPanelPrimMediaControls::onScrollDown(void* user_data)
if(impl)
{
- impl->scrollWheel(0, 1, MASK_NONE);
+ impl->scrollWheel(0, 0, 0, 1, MASK_NONE);
}
}
void LLPanelPrimMediaControls::onScrollDownHeld(void* user_data)
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index d8745b1eca..faad6bdb82 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -2322,14 +2322,14 @@ void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button)
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, MASK mask)
+void LLViewerMediaImpl::scrollWheel(S32 x, S32 y, S32 scroll_x, S32 scroll_y, MASK mask)
{
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
if (mMediaSource)
{
- mMediaSource->scrollEvent(x, y, mask);
+ mMediaSource->scrollEvent(x, y, scroll_x, scroll_y, mask);
}
}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index e2e758befb..bea024e952 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -230,7 +230,7 @@ public:
void mouseMove(const LLVector2& texture_coords, MASK mask);
void mouseDoubleClick(const LLVector2& texture_coords, MASK mask);
void mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button = 0);
- void scrollWheel(S32 x, S32 y, MASK mask);
+ void scrollWheel(S32 x, S32 y, S32 scroll_x, S32 scroll_y, MASK mask);
void mouseCapture();
void navigateBack();
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index 59165c1d71..b86d678196 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -377,12 +377,7 @@ BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks)
LLViewerMediaImpl* media_impl = getFocusedMediaImpl();
if(media_impl && media_impl->hasMedia())
{
- // the scrollEvent() API's x and y are not the same as handleScrollWheel's x and y.
- // The latter is the position of the mouse at the time of the event
- // The former is the 'scroll amount' in x and y, respectively.
- // All we have for 'scroll amount' here is 'clicks'.
- // We're also not passed the keyboard modifier mask, but we can get that from gKeyboard.
- media_impl->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE));
+ media_impl->scrollWheel(x, y, 0, clicks, gKeyboard->currentMask(TRUE));
retval = TRUE;
}
return retval;