gesso-core 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # gesso-core
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - **Scroll layers: a scrolled container is shifted, not redrawn.** On Canvas2D,
8
+ when a frame's only change is a scroll container's offset by a whole number of
9
+ device pixels, the renderer copies the pixels it already drew inside it over by
10
+ the scroll distance and redraws only the strip that came into view —
11
+ pixel-for-pixel identical to a full redraw, and several times cheaper in
12
+ software rendering. A layer is built only after the container has scrolled on a
13
+ few quiet frames running (`scrollLayerSettleFrames`, default 3), so a
14
+ virtualised list that mounts rows as it scrolls never builds one. Anything else
15
+ — a fractional smooth-wheel offset, a zoom, content that changes as it scrolls,
16
+ a caret or video inside — is drawn directly as before.
17
+ `Canvas2DRendererOptions.scrollLayers` turns it off. WebGPU is unchanged.
18
+
19
+ **Pictures that change every frame are no longer rasterised every frame.** On
20
+ Canvas2D, a painter's recording whose drawing changed this frame is replayed
21
+ straight onto the frame and rasterised only once it has held still for four
22
+ frames, so a live layer is never turned into a bitmap it throws away. A picture
23
+ seen for the first time, resized or re-themed is still rasterised at once.
24
+ `PaintStats` counts the replays as `direct`.
25
+
26
+ **A held mouse click is still a click.** A mouse press held past the long-press
27
+ delay lost its Click, so a deliberate, slow press on a button did nothing. A
28
+ mouse long press is now claimed only when a listener takes it (`preventDefault`
29
+ on `LongPress`) or it moves into a Drag. A finger's hold is claimed as before.
30
+
31
+ **`overscrollBehavior="contain"` keeps the wheel in a mounted app.** It was read
32
+ from the tree's topmost node, which in a mounted app is the runtime's wrapper,
33
+ not the app's root, and mid-chain it was honoured only on scroll containers. It
34
+ is now honoured on any ancestor of the target, so a pan-and-zoom canvas can keep
35
+ a ctrl-wheel or trackpad pinch from zooming the page.
36
+
3
37
  ## 0.4.0
4
38
 
5
39
  ### Minor Changes