Bug 1630781 - Eliminate the frame_delay pref, assume it true everywhere. r=botond,mstange

Having to think about multiple codepaths adds complexity and it doesn't seem
like we're going to turn this pref back off anytime soon.

Differential Revision: https://phabricator.services.mozilla.com/D72040
This commit is contained in:
Kartikaya Gupta 2020-04-25 00:47:54 +00:00
Родитель 105e5e23f6
Коммит 5adfc0b92b
5 изменённых файлов: 6 добавлений и 32 удалений

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

@ -891,7 +891,7 @@ void APZCTreeManager::SampleForWebRender(
// Advance animations. It's important that this happens after
// sampling all async transforms, because AdvanceAnimations() updates
// the effective scroll offset to the value it should have for the *next*
// composite after this one (if the APZ frame delay is enabled).
// composite after this one.
bool activeAnimations =
AdvanceAnimationsInternal(lock, Some(aRenderRoot), aSampleTime);
if (activeAnimations) {

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

@ -321,13 +321,6 @@ typedef PlatformSpecificStateBase
* NOTE: Should not be set to anything
* other than 0.0 for Android except for tests to disable flings.
*
* \li\b apz.frame_delay.enabled
* If this is set to true, changes to the async scroll offset and async zoom
* will not be immediately reflected in GetCurrentAsyncTransform() when called
* with |AsyncTransformConsumer::eForCompositing|. Rather, the transform will
* reflect the value of the async scroll offset and async zoom at the last time
* SampleCompositedAsyncTransform() was called.
*
* \li\b apz.keyboard.enabled
* Determines whether scrolling with the keyboard will be allowed to be handled
* by APZ.
@ -3156,12 +3149,7 @@ void AsyncPanZoomController::UpdateWithTouchAtDevicePoint(
}
Maybe<CompositionPayload> AsyncPanZoomController::NotifyScrollSampling() {
if (StaticPrefs::apz_frame_delay_enabled()) {
return std::move(mCompositedScrollPayload);
}
// If frame.delay disabled, the triggering events are those
// from the most recent frame
return std::move(mScrollPayload);
return std::move(mCompositedScrollPayload);
}
bool AsyncPanZoomController::AttemptScroll(
@ -4187,7 +4175,7 @@ CSSRect AsyncPanZoomController::GetEffectiveLayoutViewport(
if (aMode == eForCompositing && mScrollMetadata.IsApzForceDisabled()) {
return mLastContentPaintMetrics.GetLayoutViewport();
}
if (aMode == eForCompositing && StaticPrefs::apz_frame_delay_enabled()) {
if (aMode == eForCompositing) {
return mCompositedLayoutViewport;
}
return Metrics().GetLayoutViewport();
@ -4198,7 +4186,7 @@ CSSPoint AsyncPanZoomController::GetEffectiveScrollOffset(
if (aMode == eForCompositing && mScrollMetadata.IsApzForceDisabled()) {
return mLastContentPaintMetrics.GetVisualViewportOffset();
}
if (aMode == eForCompositing && StaticPrefs::apz_frame_delay_enabled()) {
if (aMode == eForCompositing) {
return mCompositedScrollOffset;
}
return Metrics().GetScrollOffset();
@ -4209,7 +4197,7 @@ CSSToParentLayerScale2D AsyncPanZoomController::GetEffectiveZoom(
if (aMode == eForCompositing && mScrollMetadata.IsApzForceDisabled()) {
return mLastContentPaintMetrics.GetZoom();
}
if (aMode == eForCompositing && StaticPrefs::apz_frame_delay_enabled()) {
if (aMode == eForCompositing) {
return mCompositedZoom;
}
return Metrics().GetZoom();
@ -4223,9 +4211,6 @@ bool AsyncPanZoomController::SampleCompositedAsyncTransform(
mCompositedLayoutViewport = Metrics().GetLayoutViewport();
mCompositedScrollOffset = Metrics().GetScrollOffset();
mCompositedZoom = Metrics().GetZoom();
// If frame.delay enabled, we pass along the scroll events from
// frame before since they were what moved the items on the layer
mCompositedScrollPayload = std::move(mScrollPayload);
return true;
}

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

@ -1165,10 +1165,6 @@ class AsyncPanZoomController {
*
* Returns true if the newly sampled value is different from the previously
* sampled value.
*
* (This is only relevant when StaticPrefs::apz_frame_delay_enabled() is
* true. Otherwise, GetCurrentAsyncTransform() always reflects what's stored
* in |Metrics()| immediately, without any delay.)
*/
bool SampleCompositedAsyncTransform(
const RecursiveMutexAutoLock& aProofOfLock);

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

@ -58,9 +58,7 @@ function* test(testDriver) {
// (for unrelated reasons), and the repaint will clear the checkerboard
// state. We do, however, want to wait for a "steady state" here that
// includes all pending paints from the main thread and a composite that
// samples the APZ state. (The latter is not required if the APZ frame delay
// is disabled, but it's enabled by default so it's desirable to handle that
// situation as well.) In order to accomplish this we wait for all the main
// samples the APZ state. In order to accomplish this we wait for all the main
// thread paints, and then force a composite via advanceTimeAndRefresh. The
// advanceTimeAndRefresh has the additional advantage of freezing the refresh
// driver which avoids any additional externally-triggered repaints from

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

@ -407,11 +407,6 @@
value: 0.01f
mirror: always
- name: apz.frame_delay.enabled
type: RelaxedAtomicBool
value: true
mirror: always
- name: apz.touch_acceleration_factor_x
type: float
value: 1.0f