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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap.html

Issue 1598923002: Add ImageBitmapRenderingContext (experimental) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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 <canvas id = 'dstCanvas' width='100' height='100'></canvas>
3 <script>
4 if (window.testRunner) {
5 testRunner.waitUntilDone();
Stephen White 2016/02/10 15:34:55 Nit: weird indentation here.
Justin Novosad 2016/02/10 15:50:21 Hah, looks like the presubmit check don't check fo
6 }
7 var srcCanvas = document.createElement('canvas');
8 srcCanvas.width = srcCanvas.height = 100;
9 var ctx = srcCanvas.getContext('2d');
10 ctx.fillStyle = 'green';
11 ctx.fillRect(0, 0, 100, 100);
12 createImageBitmap(srcCanvas).then(consumeImageBitmap)
13
14 function consumeImageBitmap(image) {
15 var dstCanvas = document.getElementById('dstCanvas');
Stephen White 2016/02/10 15:34:55 Nit: weird indentation here.
16 var dstCtx = dstCanvas.getContext('imagebitmap');
17 dstCtx.transferImageBitmap(image);
18 if (window.testRunner) {
19 testRunner.notifyDone();
20 }
21 }
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698