Skip to content

Commit a2ada9a

Browse files
[skwasm] Make sure to include the transfer list when using postMessage. (flutter#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.
1 parent bcb281c commit a2ada9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web_ui/skwasm/library_skwasm_multi_threaded.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mergeInto(LibraryManager.library, {
4343
if (threadId) {
4444
PThread.pthreads[threadId].postMessage(message, transfers);
4545
} else {
46-
postMessage(message);
46+
postMessage(message, transfers);
4747
}
4848
};
4949
},

0 commit comments

Comments
 (0)