| Summary: | WK2 support for gamepads | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brady Eidson <beidson> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | dino, syoichi |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 160599, 160605, 160673, 160699, 160700, 160760 | ||
| Bug Blocks: | 134076 | ||
|
Description
Brady Eidson
2014-07-06 22:06:56 PDT
Additional design details, just for the record: - WebCore already has "GamepadProvider", and allows for a platform-specific subclass. e.g. the HIDGamepadProvider on Mac. - That platform specific provider works great in WK1, but doesn't work in WK2 for all the reasons mentioned above. - In WK2, the UIProcess will have a GamepadProviderClient called "WebGamepadProvider" which hooks directly in to the platform provider. e.g., on Mac, WebGamepadProvider will be a client of the HIDGamepadProvider. - That WebGamepadProvider will track the individual PlatformGamepads (e.g. HIDGamepads) by mapping them to UIProcess-side "WebGamepad" objects. - Then the WebProcess will have a generic "WebGamepadProviderProxy" - the same on all platforms - which messages back and forth to the WebGamepadProvider for most of its needs. - The WebGamepadProviderProxy has to vend PlatformGamepads to WebCore, and its PlatformGamepads will be "WebGamepadProxy" objects. - The relationship between WebGamepad in the UIProcess and WebGamepadProxy in the WebProcess is that the WebGamepad dumps its gamepad state into a block of shared memory, and the WebGamepadProxy reads state out of that block of shared memory. |