docs: update HANDOFF + MyMistakes.md — take-24 PasteKey fix landed
This commit is contained in:
+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,
|
||||
"original content destroyed." Reverted.
|
||||
|
||||
**Take-23 (`f6802c7`): CORRECT FIX.** `BlitContentRaw` CropBounds path now uses `src.Width`
|
||||
(canvas stride = 1920) for ALL pixel indexing. The Fill-style scale centers the crop content
|
||||
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-23 (`f6802c7`): stride fix.** `BlitContentRaw` CropBounds path uses `src.Width`
|
||||
(canvas stride = 1920) for ALL pixel indexing. `srcStride` explicitly named to prevent recurrence.
|
||||
|
||||
**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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user