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

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

Issue 2522693002: Color correct ImageBitmap(HTMLImageElement*) constructor (Closed)
Patch Set: Removing ImageDecoder::globalTargetColorSpace() calls for now Created 4 years 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
1 self.onmessage = function(e) { 1 self.onmessage = function(e) {
2 // Worker does two things: 2 // Worker does two things:
3 // 1. call createImageBitmap() from the ImageBitmap that is transferred 3 // 1. call createImageBitmap() from the ImageBitmap that is transferred
4 // from the main thread, which verifies that createImageBitmap(ImageBitmap) 4 // from the main thread, which verifies that createImageBitmap(ImageBitmap)
5 // works on the worker thread. 5 // works on the worker thread.
6 // 2. send the created ImageBitmap back to the main thread, the 6 // 2. send the created ImageBitmap back to the main thread, the
7 // main thread exam the property of this ImageBitmap to make sure 7 // main thread exam the property of this ImageBitmap to make sure
8 // the transfer between main and worker thread didn't lose data 8 // the transfer between main and worker thread didn't lose data
9 createImageBitmap(e.data.data).then(imageBitmap => { 9 createImageBitmap(e.data.data, {colorSpaceConversion: "none"}).then(imageBitma p => {
10 postMessage({data: imageBitmap}, [imageBitmap]); 10 postMessage({data: imageBitmap}, [imageBitmap]);
11 }); 11 });
12 }; 12 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698