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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main.html

Issue 2420203002: Implement convertToBlob() in OffscreenCanvas (Closed)
Patch Set: rebase and fix global-interface-listing-service-worker-expected.txt 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main.html
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main.html
new file mode 100644
index 0000000000000000000000000000000000000000..aeddaf4a5aad639e1373d69110250c8f8cb05520
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/idleToBlob/OffscreenCanvas-convertToBlob-webgl-main.html
@@ -0,0 +1,28 @@
+<img id="png"/>
+<script type="text/javascript">
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+}
+
+// TODO: Add more image types to this test once the toImageData() for webgl
+// is completed. See crbug.com/657531.
+var pngImage = document.getElementById('png');
+function imageLoaded() {
+ if (window.testRunner) {
+ window.testRunner.notifyDone();
+ }
+}
+pngImage.addEventListener('load', imageLoaded);
+
+var offCanvas = new OffscreenCanvas(50, 50);
+var gl = offCanvas.getContext('webgl');
+gl.clearColor(0, 1, 0, 1);
+gl.clear(gl.COLOR_BUFFER_BIT);
+
+offCanvas.convertToBlob()
+ .then(function(blob) {
+ pngImage.src = URL.createObjectURL(blob);
+ });
+
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698