Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/resources/canvas-ImageBitmap-transferable.js

Issue 1409243005: Make ImageBitmap Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better transfer function Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 self.onmessage = function(e) {
2 // Worker does two things:
3 // 1. call createImageBitmap() from the ImageBitmap that is transfered
4 // from the main thread, which verifies that createImageBitmap(ImageBitmap)
5 // works on the worker thread.
6 // 2. send the created ImageBitmap back to the main thread, the
7 // main thread exam the property of this ImageBitmap to make sure
8 // the transfer between main and worker thread didn't lose data
9 createImageBitmap(e.data.data).then(imageBitmap => {
10 postMessage({data: imageBitmap}, [imageBitmap]);
11 });
12 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698