Bug 1238137 - Telemetry pings for main thread touch scrolling (Windows only). r=kats draft
authorBotond Ballo <botond@mozilla.com>
Fri, 05 Feb 2016 18:16:55 -0500
changeset 329634 28a5b2525fc682fdca1dfe8a858c25fafb574b3e
parent 329633 4802e71c166fe2bc9cca25a1f3b63a58b32ebd32
child 329741 a0baac98abafc214cc168be111b166ce2a3177be
push id10576
push userbballo@mozilla.com
push dateMon, 08 Feb 2016 21:49:16 +0000
reviewerskats
bugs1238137
milestone47.0a1
Bug 1238137 - Telemetry pings for main thread touch scrolling (Windows only). r=kats
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -184,16 +184,17 @@
 #endif
 
 #if !defined(WM_DPICHANGED)
 #define WM_DPICHANGED 0x02E0
 #endif
 
 #include "mozilla/layers/APZCTreeManager.h"
 #include "mozilla/layers/InputAPZContext.h"
+#include "mozilla/layers/ScrollInputMethods.h"
 #include "ClientLayerManager.h"
 #include "InputData.h"
 
 #include "mozilla/Telemetry.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
@@ -6540,16 +6541,18 @@ bool nsWindow::OnGesture(WPARAM wParam, 
     wheelEvent.button      = 0;
     wheelEvent.time        = ::GetMessageTime();
     wheelEvent.timeStamp   = GetMessageTimeStamp(wheelEvent.time);
     wheelEvent.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
 
     bool endFeedback = true;
 
     if (mGesture.PanDeltaToPixelScroll(wheelEvent)) {
+      mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
+          (uint32_t) ScrollInputMethod::MainThreadTouch);
       DispatchEvent(&wheelEvent, status);
     }
 
     if (mDisplayPanFeedback) {
       mGesture.UpdatePanFeedbackX(mWnd,
                                   DeprecatedAbs(RoundDown(wheelEvent.overflowDeltaX)),
                                   endFeedback);
       mGesture.UpdatePanFeedbackY(mWnd,