Backed out 4 changesets (bug 1583956) for Build bustage in gfx/layers/apz/util/ChromeProcessController.cpp. CLOSED TREE

Backed out changeset f787e3e4a31c (bug 1583956)
Backed out changeset c8eadb4b6301 (bug 1583956)
Backed out changeset 78dfbab51db6 (bug 1583956)
Backed out changeset 7d0e2d6cfaeb (bug 1583956)
This commit is contained in:
Dorel Luca 2020-02-27 14:13:09 +02:00
Родитель 2e1e470d9e
Коммит 3b4b507cac
4 изменённых файлов: 17 добавлений и 47 удалений

Просмотреть файл

@ -99,19 +99,13 @@
static mozilla::LazyLogModule sApzCtlLog("apz.controller");
#define APZC_LOG(...) MOZ_LOG(sApzCtlLog, LogLevel::Debug, (__VA_ARGS__))
#define APZC_LOGV(...) MOZ_LOG(sApzCtlLog, LogLevel::Verbose, (__VA_ARGS__))
#define APZC_LOG_FM_COMMON(fm, prefix, level, ...) \
if (MOZ_LOG_TEST(sApzCtlLog, level)) { \
std::stringstream ss; \
ss << nsPrintfCString(prefix, __VA_ARGS__).get(); \
AppendToString(ss, fm, ":", "", true); \
MOZ_LOG(sApzCtlLog, level, ("%s\n", ss.str().c_str())); \
#define APZC_LOG_FM(fm, prefix, ...) \
if (MOZ_LOG_TEST(sApzCtlLog, LogLevel::Debug)) { \
std::stringstream ss; \
ss << nsPrintfCString(prefix, __VA_ARGS__).get(); \
AppendToString(ss, fm, ":", "", true); \
APZC_LOG("%s\n", ss.str().c_str()); \
}
#define APZC_LOG_FM(fm, prefix, ...) \
APZC_LOG_FM_COMMON(fm, prefix, LogLevel::Debug, __VA_ARGS__)
#define APZC_LOGV_FM(fm, prefix, ...) \
APZC_LOG_FM_COMMON(fm, prefix, LogLevel::Verbose, __VA_ARGS__)
namespace mozilla {
namespace layers {
@ -2786,7 +2780,6 @@ nsEventStatus AsyncPanZoomController::GenerateSingleTap(
// the corresponding touch-up. To avoid that we schedule the singletap
// message to run on the next spin of the event loop. See bug 965381 for
// the issue this was causing.
APZC_LOG("posting runnable for HandleTap from GenerateSingleTap");
RefPtr<Runnable> runnable =
NewRunnableMethod<TapType, LayoutDevicePoint, mozilla::Modifiers,
ScrollableLayerGuid, uint64_t>(
@ -3832,7 +3825,7 @@ const ScreenMargin AsyncPanZoomController::CalculatePendingDisplayPort(
float paintFactor = kDefaultEstimatedPaintDurationMs;
displayPort.MoveBy(velocity * paintFactor * StaticPrefs::apz_velocity_bias());
APZC_LOGV_FM(
APZC_LOG_FM(
aFrameMetrics,
"Calculated displayport as %s from velocity %s paint time %f metrics",
Stringify(displayPort).c_str(), ToString(aVelocity).c_str(), paintFactor);
@ -3987,7 +3980,7 @@ void AsyncPanZoomController::RequestContentRepaint(
return;
}
APZC_LOGV_FM(aFrameMetrics, "%p requesting content repaint", this);
APZC_LOG_FM(aFrameMetrics, "%p requesting content repaint", this);
{ // scope lock
MutexAutoLock lock(mCheckerboardEventLock);
if (mCheckerboardEvent && mCheckerboardEvent->IsRecordingTrace()) {
@ -4427,7 +4420,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(
if ((aScrollMetadata == mLastContentPaintMetadata) && !isDefault) {
// No new information here, skip it.
APZC_LOGV("%p NotifyLayersUpdated short-circuit\n", this);
APZC_LOG("%p NotifyLayersUpdated short-circuit\n", this);
return;
}
@ -4451,10 +4444,10 @@ void AsyncPanZoomController::NotifyLayersUpdated(
}
mScrollMetadata.SetScrollParentId(aScrollMetadata.GetScrollParentId());
APZC_LOGV_FM(aLayerMetrics,
"%p got a NotifyLayersUpdated with aIsFirstPaint=%d, "
"aThisLayerTreeUpdated=%d",
this, aIsFirstPaint, aThisLayerTreeUpdated);
APZC_LOG_FM(aLayerMetrics,
"%p got a NotifyLayersUpdated with aIsFirstPaint=%d, "
"aThisLayerTreeUpdated=%d",
this, aIsFirstPaint, aThisLayerTreeUpdated);
{ // scope lock
MutexAutoLock lock(mCheckerboardEventLock);

Просмотреть файл

@ -26,7 +26,7 @@
[test_group_mouseevents.html]
skip-if = (toolkit == 'android') # mouse events not supported on mobile
[test_group_pointerevents.html]
skip-if = (os == 'win' && os_version == '10.0') # Bug 1404836
skip-if = (os == 'win' && os_version == '10.0') || (toolkit == 'android' && !is_fennec) # Bug 1404836, 1525959
[test_group_touchevents.html]
skip-if = (verify && debug && (os == 'win'))
[test_group_touchevents-2.html]

Просмотреть файл

@ -21,8 +21,6 @@
#include "nsLayoutUtils.h"
#include "nsView.h"
static mozilla::LazyLogModule sApzChromeLog("apz.cc.chrome");
using namespace mozilla;
using namespace mozilla::layers;
using namespace mozilla::widget;
@ -166,10 +164,7 @@ void ChromeProcessController::HandleTap(
TapType aType, const mozilla::LayoutDevicePoint& aPoint,
Modifiers aModifiers, const ScrollableLayerGuid& aGuid,
uint64_t aInputBlockId) {
MOZ_LOG(sApzChromeLog, LogLevel::Debug,
("HandleTap called with %d\n", aType));
if (MessageLoop::current() != mUILoop) {
MOZ_LOG(sApzChromeLog, LogLevel::Debug, ("HandleTap redispatching\n"));
mUILoop->PostTask(
NewRunnableMethod<TapType, mozilla::LayoutDevicePoint, Modifiers,
ScrollableLayerGuid, uint64_t>(

Просмотреть файл

@ -17,11 +17,6 @@
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/Unused.h"
#include "Units.h"
#ifdef MOZ_WIDGET_ANDROID
#include "mozilla/jni/Utils.h"
#endif
static mozilla::LazyLogModule sApzRemoteLog("apz.cc.remote");
namespace mozilla {
namespace layers {
@ -62,8 +57,6 @@ void RemoteContentController::HandleTapOnMainThread(TapType aTapType,
Modifiers aModifiers,
ScrollableLayerGuid aGuid,
uint64_t aInputBlockId) {
MOZ_LOG(sApzRemoteLog, LogLevel::Debug,
("HandleTapOnMainThread(%d)", aTapType));
MOZ_ASSERT(NS_IsMainThread());
dom::BrowserParent* tab =
@ -94,7 +87,6 @@ void RemoteContentController::HandleTap(TapType aTapType,
Modifiers aModifiers,
const ScrollableLayerGuid& aGuid,
uint64_t aInputBlockId) {
MOZ_LOG(sApzRemoteLog, LogLevel::Debug, ("HandleTap(%d)", aTapType));
APZThreadUtils::AssertOnControllerThread();
if (XRE_GetProcessType() == GeckoProcessType_GPU) {
@ -118,25 +110,15 @@ void RemoteContentController::HandleTap(TapType aTapType,
if (NS_IsMainThread()) {
HandleTapOnMainThread(aTapType, aPoint, aModifiers, aGuid, aInputBlockId);
} else {
// We must be on Android, running on the Java UI thread
#ifndef MOZ_WIDGET_ANDROID
MOZ_ASSERT(false);
#else
// We don't want to get the BrowserParent or call
// BrowserParent::SendHandleTap() from a non-main thread, so we need to
// redispatch to the main thread. However, we should use the same mechanism
// that the Android widget uses when dispatching input events to Gecko,
// which is nsAppShell::PostEvent. Note in particular that using
// NS_DispatchToMainThread would post to a different message loop, and
// introduces the possibility of this tap event getting processed out of
// order with respect to the touch events that synthesized it.
mozilla::jni::DispatchToGeckoPriorityQueue(
// BrowserParent::SendHandleTap() from a non-main thread (this might happen
// on Android, where this is called from the Java UI thread)
NS_DispatchToMainThread(
NewRunnableMethod<TapType, LayoutDevicePoint, Modifiers,
ScrollableLayerGuid, uint64_t>(
"layers::RemoteContentController::HandleTapOnMainThread", this,
&RemoteContentController::HandleTapOnMainThread, aTapType, aPoint,
aModifiers, aGuid, aInputBlockId));
#endif
}
}