[skwasm] Make sure to include the transfer list when using postMessage. (flutter/engine#56431)

This change doesn't have unit tests, because it doesn't actually change the functional behavior of the renderer, it only changes its performance characteristics. If the transfer list is not included, the browser copies the image bitmaps instead of transfers them, which is slow, but does actually work. I am going to be adding some additional benchmarking in the framework to ensure that we detect if we regress something like this again.
This commit is contained in:
Jackson Gardner 2024-11-07 10:34:08 -08:00 committed by GitHub
parent c3d5dc1148
commit d387d0fe3b

View File

@ -43,7 +43,7 @@ mergeInto(LibraryManager.library, {
if (threadId) {
PThread.pthreads[threadId].postMessage(message, transfers);
} else {
postMessage(message);
postMessage(message, transfers);
}
};
},