ozone/wayland: Persist tablet tool axis state across frames [chromium/src : main]

0 views
Skip to first unread message

The Techromancer (Gerrit)

unread,
Aug 1, 2026, 2:38:07 PM (12 days ago) Aug 1
to Thomas Anderson, Kramer Ge, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and Thomas Anderson

The Techromancer added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
The Techromancer . resolved

Hi all,

This is my first Chromium contribution, and hopefully the first of several fixes to bugs I discovered while building darkly.art, an open source painting app.

This is a relatively small fix. I used Claude Opus 5 to assist in diagnosing and implementing it, but took the time to understand it, and fully compiled and tested it manually.

Here is a screenshot of the pen strokes, before and after:
https://issues.chromium.org/action/issues/497284918/attachments/80083491?download=false

Thanks for your help

Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • Thomas Anderson
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
Gerrit-Change-Number: 8184994
Gerrit-PatchSet: 1
Gerrit-Owner: The Techromancer <techro...@darkly.art>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Sat, 01 Aug 2026 18:37:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Aug 3, 2026, 10:49:45 AM (10 days ago) Aug 3
to The Techromancer, Kramer Ge, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from Kramer Ge and The Techromancer

Thomas Anderson voted

Code-Review+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Kramer Ge
  • The Techromancer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
Gerrit-Change-Number: 8184994
Gerrit-PatchSet: 1
Gerrit-Owner: The Techromancer <techro...@darkly.art>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: The Techromancer <techro...@darkly.art>
Gerrit-Attention: Kramer Ge <fang...@chromium.org>
Gerrit-Comment-Date: Mon, 03 Aug 2026 14:49:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Kramer Ge (Gerrit)

unread,
Aug 4, 2026, 2:28:30 PM (9 days ago) Aug 4
to The Techromancer, Chromium LUCI CQ, Thomas Anderson, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
Attention needed from The Techromancer

Kramer Ge voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • The Techromancer
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
    Gerrit-Change-Number: 8184994
    Gerrit-PatchSet: 1
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Attention: The Techromancer <techro...@darkly.art>
    Gerrit-Comment-Date: Tue, 04 Aug 2026 18:28:20 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Kramer Ge (Gerrit)

    unread,
    Aug 4, 2026, 2:28:53 PM (9 days ago) Aug 4
    to The Techromancer, Chromium LUCI CQ, Thomas Anderson, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
    Attention needed from The Techromancer

    Kramer Ge voted and added 1 comment

    Votes added by Kramer Ge

    Commit-Queue+2

    1 comment

    Patchset-level comments
    Kramer Ge . resolved

    Thank you very much

    Open in Gerrit

    Related details

    Attention is currently required from:
    • The Techromancer
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
    Gerrit-Change-Number: 8184994
    Gerrit-PatchSet: 1
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Attention: The Techromancer <techro...@darkly.art>
    Gerrit-Comment-Date: Tue, 04 Aug 2026 18:28:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Kramer Ge (Gerrit)

    unread,
    Aug 5, 2026, 3:45:24 PM (8 days ago) Aug 5
    to The Techromancer, Chromium LUCI CQ, Thomas Anderson, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org
    Attention needed from The Techromancer

    Kramer Ge voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • The Techromancer
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
    Gerrit-Change-Number: 8184994
    Gerrit-PatchSet: 1
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    Gerrit-Attention: The Techromancer <techro...@darkly.art>
    Gerrit-Comment-Date: Wed, 05 Aug 2026 19:45:14 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Aug 5, 2026, 5:55:48 PM (7 days ago) Aug 5
    to The Techromancer, Kramer Ge, Thomas Anderson, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, max+watc...@igalia.com, nickdiego+wa...@igalia.com, ozone-...@chromium.org

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    ozone/wayland: Persist tablet tool axis state across frames

    zwp_tablet_tool_v2 sends an axis event (pressure, distance, tilt,
    rotation, slider) only when the value changes. WaylandTabletTool
    buffers axis values into frame_data_.pointer_details and dispatches on
    frame, but ResetFrameData() rebuilt a fresh FrameData afterwards,
    zeroing force, tilt, twist and tangential pressure. Any frame in which
    the compositor did not re-send pressure therefore dispatched
    force=0.0, producing intermittent pressure:0 samples on a pen held in
    continuous contact with the surface.

    pointer_type is already persisted across frames for exactly this
    reason (crrev.com/c/6907510). This CL completes that pattern for the
    analog axes by carrying the whole PointerDetails across the frame
    reset instead of rebuilding it. The fields this class never writes
    (radius_x, radius_y, id, offset) keep their defaults regardless, so
    this is equivalent to persisting the axes individually, without
    needing a cache member per axis that a future axis could forget to
    update.

    Persisting state across frames requires bounding its lifetime, so it
    is cleared in two places:

    - On proximity-in, since a tool entering proximity begins a new
    interaction that must not inherit the previous one's axis values.
    proximity_in is the first event in its frame, so a pressure event
    arriving in that same frame still takes effect.

    - On up, since the tip is no longer in contact and force is zero by
    definition. Without this, a persisted force would survive into the
    release event on compositors that omit a pressure event from the
    frame carrying up.

    continuous strokes on a canvas logging PointerEvent.pressure.
    Mid-stroke zero-pressure samples: ~38 per stroke before, 0 after.
    Bug: 497284918
    Test: Manual, ELAN9008:00 04F3:4359 stylus under Sway, drawing
    Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
    Commit-Queue: Kramer Ge <fang...@chromium.org>
    Reviewed-by: Kramer Ge <fang...@chromium.org>
    Reviewed-by: Thomas Anderson <thomasa...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1674519}
    Files:
    • M AUTHORS
    • M ui/ozone/platform/wayland/host/wayland_tablet_tool.cc
    Change size: S
    Delta: 2 files changed, 16 insertions(+), 1 deletion(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Thomas Anderson, +1 by Kramer Ge
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ie7e5c58bccdddded997f1a45d9cc94e6f367d348
    Gerrit-Change-Number: 8184994
    Gerrit-PatchSet: 2
    Gerrit-Owner: The Techromancer <techro...@darkly.art>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages