Closed Bug 1902571 Opened 3 months ago Closed 3 months ago

Cleanups/refactoring in APZHandledResult computation codepaths

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(6 files)

While reviewing bug 1895742, I noticed some opportunities for cleanups / refactoring in the APZHandledResult computation codepaths.

In particular, I realized that we can share more code between the "eager" and "delayed" computation codepaths, and in the process address this FIXME (which the patch in bug 1895742 partially does already).

The function only has one call site, and it passes an argument for this parameter.

Depends on D213713

This just makes the order of the definitions in the source file
consistent with the order of the declarations in the header file.

Depends on D213714

The second one takes the place of APZEventResult::UpdateHandledResult.

Depends on D213715

The delayed result computation now calls ArePointerEventsConsumable()
again to compute a more accurate result, so it doesn't need the
eager result.

Depends on D213717

Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/71bda9b87cd5 Make the aOutTouchBehaviors parameter of GetTouchInputBlockAPZC() required. r=hiro https://hg.mozilla.org/integration/autoland/rev/e80ef04c421a Const-correctness improvements. r=hiro https://hg.mozilla.org/integration/autoland/rev/eda7b7d4d3a1 Move the definition of the APZHandledResult constructor to the top of APZInputBridge.cpp. r=hiro https://hg.mozilla.org/integration/autoland/rev/f5acf5b3e363 Factor out two static helper methods of APZHandledResult: Initialize and UpdateForTouchEvent. r=hiro https://hg.mozilla.org/integration/autoland/rev/d7c28fe9f43e Reuse APZHandledResult helpers during the delayed result codepath. r=hiro https://hg.mozilla.org/integration/autoland/rev/07ae591a549b Stop retaining the eager nsEventStatus for the delayed result computation. r=hiro

Backed out for causing build bustages in TestEventResult.cpp

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/gfx/layers/apz/test/gtest/TestEventResult.cpp:68:9: error: no matching constructor for initialization of 'InputBlockCallback &&' (aka 'function<void (unsigned long, const mozilla::layers::APZHandledResult &)> &&')
Flags: needinfo?(botond)

Huh. I wonder how this built locally.

Flags: needinfo?(botond)

(In reply to Botond Ballo [:botond] from comment #9)

Huh. I wonder how this built locally.

Ok, I see now: gtest source files are not built when you run mach build, only when you run mach gtest. (Which is a bit unintuitive because in CI they are built by the build job rather than the gtest job.)

Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/77a3ea498c1d Make the aOutTouchBehaviors parameter of GetTouchInputBlockAPZC() required. r=hiro https://hg.mozilla.org/integration/autoland/rev/2215ccc81f14 Const-correctness improvements. r=hiro https://hg.mozilla.org/integration/autoland/rev/d9abbb164fc2 Move the definition of the APZHandledResult constructor to the top of APZInputBridge.cpp. r=hiro https://hg.mozilla.org/integration/autoland/rev/d4278aa127c3 Factor out two static helper methods of APZHandledResult: Initialize and UpdateForTouchEvent. r=hiro https://hg.mozilla.org/integration/autoland/rev/401c09d143d7 Reuse APZHandledResult helpers during the delayed result codepath. r=hiro https://hg.mozilla.org/integration/autoland/rev/08cba3d1a49d Stop retaining the eager nsEventStatus for the delayed result computation. r=hiro
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: