Crafter.Graphics/implementations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 364d2101c9
feat(wayland): add Window::lastInputTime, the compositor's time of a pointer or touch event
The pointer and touch handlers received wl_pointer's and wl_touch's
`time` and dropped it, so a consumer could date an event only by its own
clock at dispatch. Events queued while the consumer's loop is busy are
dispatched together when it comes back, so by that clock a swipe's
backlog is a burst, and a press and its release that both waited out
a stall happen at one time.

Window::lastInputTime is the compositor's time of the pointer, touch or
scroll event a listener is being invoked for — milliseconds from an
undefined base, wrapping at 2^32 — set before the event fires: the
button events, a motion's onMouseMove, onMouseScroll, onTouchDown,
onTouchMove and onTouchUp, and the pointer events the first finger
stands in for. An event the compositor sends without a time keeps the
last one's: an enter's onMouseEnter and the move that follows it,
onMouseLeave, and a touch_cancel's release and onTouchCancel.

A listener that dispatches Wayland events itself (it makes a Window, or
calls Clipboard::GetText) runs the handlers of what is queued behind
its event, and they set the time too: for that listener from there on,
and for the listeners of its event that come after it. The click, move
and release the first finger stands in for fire after the touch
event's listeners, so the touch handlers set the time again before
them.

The member is the Wayland backend's alone: the Win32 and DOM handlers
set no such time, and design rule 1 keeps the library from "inventing a
shared signature that is a no-op on one side". Those builds have no
such member, and the consumer notes say so.

Tests: InputTime drives the wl_pointer and wl_touch handlers directly,
as MouseScroll and PointerEnterLeave do, and reads lastInputTime in
every listener: 0 before the first event; each event's own time for a
motion, the four button events, a scroll and a touch's down, motion and
up; the touch's time for the first finger's click, move and release,
also when a listener of the touch event has run another handler in
between, as a dispatch from inside it would; the last event's time for
an enter and its move, a leave, and a cancel's release and
onTouchCancel; a time past 2^31 and the one after the wrap as they came.
2026-11-17 06:57:46 +01:00
..
Crafter.Graphics-Clipboard.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-ComputeShader.cpp feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
Crafter.Graphics-Device-Features.cpp feat(device): applications ask for the device features their shaders use 2026-10-31 06:40:02 +01:00
Crafter.Graphics-Device.cpp feat(wayland): add Window::lastInputTime, the compositor's time of a pointer or touch event 2026-11-17 06:57:46 +01:00
Crafter.Graphics-Dom.cpp wasm improvements 2026-08-05 04:08:13 +02:00
Crafter.Graphics-Font.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-FontAtlas.cpp fix(font-atlas): give glyphs that find no room a cell when the next frame begins, evicting the least recently drawn 2026-10-31 19:43:58 +01:00
Crafter.Graphics-Gamepad.cpp feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
Crafter.Graphics-GamepadWin32.c feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
Crafter.Graphics-GamepadWin32.h feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
Crafter.Graphics-Input.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-InputField.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-Mesh-WebGPU.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-Mesh.cpp feat: windows on their own clock, deferred deletion for every handle owner, staged re-uploads, and RTPass push data 2026-10-20 20:20:29 +02:00
Crafter.Graphics-PipelineRTWebGPU.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-RenderingElement3D-WebGPU.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-RenderingElement3D.cpp fix(rt): rebuild TLASes in place, after earlier traces, and queue their handles like a Mesh's 2026-10-31 02:32:48 +01:00
Crafter.Graphics-Router.cpp wasm improvements 2026-08-05 04:08:13 +02:00
Crafter.Graphics-ShaderBindingTableWebGPU.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-UI-Shared.cpp fix(font-atlas): give glyphs that find no room a cell when the next frame begins, evicting the least recently drawn 2026-10-31 19:43:58 +01:00
Crafter.Graphics-UI-WebGPU.cpp fix(font-atlas): give glyphs that find no room a cell when the next frame begins, evicting the least recently drawn 2026-10-31 19:43:58 +01:00
Crafter.Graphics-UI.cpp fix(font-atlas): give glyphs that find no room a cell when the next frame begins, evicting the least recently drawn 2026-10-31 19:43:58 +01:00
Crafter.Graphics-UIComponents.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-WebGPUComputeShader.cpp SPDX license update 2026-07-22 18:09:06 +02:00
Crafter.Graphics-Window.cpp fix(font-atlas): give glyphs that find no room a cell when the next frame begins, evicting the least recently drawn 2026-10-31 19:43:58 +01:00