Skip to content

Conversation

@snehagarwal1
Copy link
Contributor

Update gamepad raw input event explainer based on prototype implementation

This CL updates the explainer to reflect insights gained from the
prototype implementation, ensuring documentation accurately describes
the current architecture and sets appropriate expectations.

Key updates based on implementation experience:

  1. Document actual event delivery mechanism:

    • Events fire at browser's internal polling rate via DoPoll()
    • Mojo delivers notifications to renderer, but timing is poll-based
    • Multiple HID reports between polls are coalesced at browser level
    • This is the foundation for future interrupt-driven approach
  2. Refine value proposition:

    • Emphasize efficiency gains: eliminate redundant state comparison
      across renderer processes
    • Highlight event-driven programming model as ergonomic alternative
      to application-level rAF polling.
    • Note that true latency reduction requires future architectural work
      on browser-side interrupt-driven HID callbacks.
  3. Clarify event dispatch model:

    • Events dispatch on Window object instead of Gamepad (matching implemented IDL)
    • Update examples to reflect actual event target.
  4. Align examples with actual IDL:

    • Added touchesChanged property in the event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant