Commit 7cc5d7e
authored
anyrender_skia: size render_to_vec buffers before wrapping pixels (#49)
SkiaImageRenderer::render_to_vec currently assumes the caller has already
resized the Vec to the exact pixel buffer size. When callers pass an empty
Vec with only capacity reserved, wrap_pixels receives an empty slice and the
renderer panics.
Resize the Vec to image_info.compute_min_byte_size() before wrapping it so
offscreen rendering works with a plain empty Vec.1 parent 0691c2d commit 7cc5d7e
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
0 commit comments