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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-2.js

Issue 2300633004: Allow canvases to be GPU-accelerated in Workers (Closed)
Patch Set: test expectation Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-2.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-2.js b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-2.js
new file mode 100644
index 0000000000000000000000000000000000000000..2d549018b1dbc9ea0d366562ecdb20bf2a250fad
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-2.js
@@ -0,0 +1,7 @@
+self.onmessage = function(msg) {
+ var canvas = new OffscreenCanvas(10, 10);
+ var ctx = canvas.getContext('2d');
+ ctx.drawImage(msg.data, 0, 0);
+ var image = canvas.transferToImageBitmap();
+ self.postMessage(image, [image]);
+};

Powered by Google App Engine
This is Rietveld 408576698