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

Unified 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: another missing adoptRef 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-alpha.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap.html b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap.html
new file mode 100644
index 0000000000000000000000000000000000000000..3c527ed38b121c2954839eec27575497771cf688
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<canvas id = 'dstCanvas' width='100' height='100'></canvas>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+}
+var srcCanvas = document.createElement('canvas');
+srcCanvas.width = srcCanvas.height = 100;
+var ctx = srcCanvas.getContext('2d');
+ctx.fillStyle = 'green';
+ctx.fillRect(0, 0, 100, 100);
+createImageBitmap(srcCanvas).then(consumeImageBitmap)
+
+function consumeImageBitmap(image) {
+ var dstCanvas = document.getElementById('dstCanvas');
+ var dstCtx = dstCanvas.getContext('imagebitmap');
+ dstCtx.transferImageBitmap(image);
+ if (window.testRunner) {
+ testRunner.notifyDone();
+ }
+}
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-alpha.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698