• Majid Valipour's avatar
    [animation-worklet] Take pixel snapping into account in ScrollTimeline · c0f77ef6
    Majid Valipour authored
    Update ScrollTimeline to use post-snapped scroll offsets instead of pre-snapped
    one. This fixes jitter when scroll-linked worklet animation is trying to
    position items against the scroll offset.
    
    Background:
    Scrolling layers are pixel snapped which means they are shifted so that
    they get aligned to pixel boundaries. This means that the raw scroll offset
    of a scrolling layer is not exactly what is display on the screen.
    
    The snapping is done by adjusting the effective transform of the associated
    TransformNode for this scrolling element.
    
    Previously ScrollTimeline would use raw scroll offset to compute its time.
    This patch introduces a new method on the ScrollTree that will use the info
    from TransformNode to calculate an effective scroll offset that represents the
    post-snapped position of the scrolling node.
    
    Bug: 585458
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: I30bb052d8cfef8a32ec1a613921d7594bef3c982
    Reviewed-on: https://chromium-review.googlesource.com/1153583
    Commit-Queue: Majid Valipour <majidvp@chromium.org>
    Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
    Reviewed-by: default avatarAli Juma <ajuma@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#583819}
    c0f77ef6
DEPS 439 Bytes