mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
When recreating this `unique_ptr`, we need to ensure it matches the type in `Surface::renderPictures` which is released. See here:
```
std::unique_ptr<sk_sp<SkPicture>[]> picturePointers =
std::make_unique<sk_sp<SkPicture>[]>(count);
for (int i = 0; i < count; i++) {
picturePointers[i] = sk_ref_sp(pictures[i]);
}
// Releasing picturePointers here and will recreate the unique_ptr on the
// other thread See surface_renderPicturesOnWorker
skwasm_dispatchRenderPictures(_thread, this, picturePointers.release(), count,
callbackId);
```