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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html

Issue 2365653005: Fix failing transferToImageBitmap layout tests and commit pixel test on Mac (Closed)
Patch Set: rebase Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <canvas id='output1' width = '100' height = '100'></canvas>
5 <canvas id='output2' width = '100' height = '100'></canvas>
6 <script>
7 if (window.testRunner) {
8 testRunner.waitUntilDone();
9 }
10
11 var width = 100;
12 var height = 100;
13 var aCanvas = new OffscreenCanvas(width, height);
14 var gl = aCanvas.getContext('webgl');
15 gl.clearColor(1.0, 0.0, 0.0, 1.0);
16 gl.clear(gl.COLOR_BUFFER_BIT);
17 var image1 = aCanvas.transferToImageBitmap();
18 gl.clearColor(0.0, 0.0, 1.0, 1.0);
19 gl.clear(gl.COLOR_BUFFER_BIT);
20 var image2 = aCanvas.transferToImageBitmap();
21
22 var canvas1 = document.getElementById("output1");
23 var ctx1 = canvas1.getContext('bitmaprenderer');
24 ctx1.transferFromImageBitmap(image1);
25
26 var canvas2 = document.getElementById('output2');
27 var ctx2 = canvas2.getContext('bitmaprenderer');
28 ctx2.transferFromImageBitmap(image2);
29
30 if (window.testRunner) {
31 testRunner.notifyDone();
32 }
33 </script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698