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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-1.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-1.js
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-1.js b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-1.js
new file mode 100644
index 0000000000000000000000000000000000000000..f2d8ed1214badd06d6c6e11b90b18e516b5ecbfc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmap-worker-to-worker-1.js
@@ -0,0 +1,8 @@
+self.onmessage = function(msg) {
+ var canvas = new OffscreenCanvas(10, 10);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ var image = canvas.transferToImageBitmap();
+ self.postMessage(image, [image]);
+};

Powered by Google App Engine
This is Rietveld 408576698