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

Side by Side 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, 1 month 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 <img id="png"/>
2 <script type="text/javascript">
3 if (window.testRunner) {
4 testRunner.waitUntilDone();
5 }
6
7 // TODO: Add more image types to this test once the toImageData() for webgl
8 // is completed. See crbug.com/657531.
9 var pngImage = document.getElementById('png');
10 function imageLoaded() {
11 if (window.testRunner) {
12 window.testRunner.notifyDone();
13 }
14 }
15 pngImage.addEventListener('load', imageLoaded);
16
17 var offCanvas = new OffscreenCanvas(50, 50);
18 var gl = offCanvas.getContext('webgl');
19 gl.clearColor(0, 1, 0, 1);
20 gl.clear(gl.COLOR_BUFFER_BIT);
21
22 offCanvas.convertToBlob()
23 .then(function(blob) {
24 pngImage.src = URL.createObjectURL(blob);
25 });
26
27 </script>
28
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698