docs: update HANDOFF + MyMistakes.md — take-24 PasteKey fix landed
This commit is contained in:
+6
-13
@@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
## Branch / Commit State
|
## Branch / Commit State
|
||||||
|
|
||||||
**`main` HEAD = `f6802c7`** — take-23: stride-correct CropBounds Fill rendering.
|
**`main` HEAD = `081e4c1`** — take-24: PasteKey includes CropBounds — stale raster cache fixed.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
081e4c1 fix(web): add CropBounds to PasteKey — stale raster cache was corrupting transparency
|
||||||
f6802c7 fix(web): stride-correct CropBounds Fill rendering in compositor (take-23)
|
f6802c7 fix(web): stride-correct CropBounds Fill rendering in compositor (take-23)
|
||||||
84aa70f docs: MyMistakes.md — take-22 full fix for widget scale/position + transparency
|
84aa70f docs: MyMistakes.md — take-22 full fix for widget scale/position + transparency
|
||||||
ed9d7c1 fix(web): CropBounds metadata + Fill-style scaling in compositor — transparent margins preserved, widget fills element rect (BROKEN — reverted)
|
ed9d7c1 fix(web): CropBounds metadata + Fill-style scaling in compositor — transparent margins preserved, widget fills element rect (BROKEN — reverted)
|
||||||
@@ -14,21 +15,13 @@ e002847 fix(web): feed full canvas to compositor — transparent margins reveal
|
|||||||
87509bc (origin/main) docs: restructure TASKS.md into a catalog
|
87509bc (origin/main) docs: restructure TASKS.md into a catalog
|
||||||
```
|
```
|
||||||
|
|
||||||
**Pushed to origin: `87509bc`.** 7 unpushed commits after it.
|
**Pushed to origin: `87509bc`.** 8 unpushed commits after it.
|
||||||
|
|
||||||
## Web Overlay — Current State
|
## Web Overlay — Current State
|
||||||
|
|
||||||
take-22 (`ed9d7c1`) BROKE the widget — the CropBounds stride was wrong (pixel index used `w = cbW` crop width instead of `src.Width` canvas stride, reading garbage from the full-canvas buffer). REVERTED by the take-23 revert of `ed9d7c1`.
|
take-22 (`ed9d7c1`) BROKE: stride bug (crop width used for canvas buffer indexing) — REVERTED.
|
||||||
|
take-23 (`f6802c7`): stride fixed, but PasteKey missing CropBounds → stale raster cached → transparent pixels corrupted to opaque.
|
||||||
take-23 (`f6802c7`) is the correct fix:
|
take-24 (`081e4c1`): FIX. `PasteKey` now includes `frame.CropBounds`. Different crop bounds = cache miss = fresh raster with correct alpha.
|
||||||
- `VideoFrame.CropBounds?: (X,Y,W,H)` — metadata on the frame
|
|
||||||
- `WebView2Manager` sets `CropBounds = (cropX, cropY, cropW, cropH)` on the LatestFrame
|
|
||||||
- `BlitContentRaw` detects CropBounds and uses Fill-style scaling (stretch to cover, no aspect preservation) using `src.Width` (canvas stride = 1920) for ALL pixel buffer indexing — not the crop width
|
|
||||||
|
|
||||||
## Resolved this session
|
|
||||||
|
|
||||||
- **Audio regression (TASK 26):** Non-event — external headset volume control was at minimum.
|
|
||||||
- **Web overlay scale/position + transparency:** take-23 at `f6802c7`. The stride fix was critical — take-22 used crop width (e.g., 800) instead of canvas stride (1920) in pixel indexing, reading garbage from the full-canvas buffer and destroying content.
|
|
||||||
|
|
||||||
## Still open (needs your run + log)
|
## Still open (needs your run + log)
|
||||||
|
|
||||||
|
|||||||
+11
-4
@@ -32,10 +32,17 @@ widget appeared shrunk and offset. `UniformToFill` used `src=1920×1080` for a 7
|
|||||||
by crop width instead of canvas stride computed completely wrong memory offsets — garbage pixels,
|
by crop width instead of canvas stride computed completely wrong memory offsets — garbage pixels,
|
||||||
"original content destroyed." Reverted.
|
"original content destroyed." Reverted.
|
||||||
|
|
||||||
**Take-23 (`f6802c7`): CORRECT FIX.** `BlitContentRaw` CropBounds path now uses `src.Width`
|
**Take-23 (`f6802c7`): stride fix.** `BlitContentRaw` CropBounds path uses `src.Width`
|
||||||
(canvas stride = 1920) for ALL pixel indexing. The Fill-style scale centers the crop content
|
(canvas stride = 1920) for ALL pixel indexing. `srcStride` explicitly named to prevent recurrence.
|
||||||
in the element rect. Transparent margins of the full canvas are preserved and reveal layers
|
|
||||||
beneath. `srcStride` is explicitly named `srcStride = src.Width` to prevent this mistake recurring.
|
**Take-24 (`081e4c1`): transparency still broken after scale fix — PasteKey missing CropBounds.**
|
||||||
|
Scale was correct but transparent pixels showed black (backdrop) instead of revealing webcam.
|
||||||
|
Root cause: `PasteKey` (compositor paste cache) was keyed on `(Pixels, Epoch, Width, Height,
|
||||||
|
DstW, DstH, Round, Mirror)` — NOT `CropBounds`. Since the frame Width/Height are always
|
||||||
|
1920×1080 (the canvas) regardless of crop bounds, the same key was used for all element
|
||||||
|
sizes. A stale raster (wrong crop) was served from the cache after resize or first add,
|
||||||
|
baking in opaque content over transparent regions. Fix: add `CropBounds` to `PasteKey`.
|
||||||
|
`frame.CropBounds` is included in the cache key so different crop bounds = cache miss.
|
||||||
|
|
||||||
### Shrink / re-encode an image for the README (screenshots → small hero image)
|
### Shrink / re-encode an image for the README (screenshots → small hero image)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user