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

Side by Side Diff: content/test/data/gpu/pixel_offscreenCanvas_2d_commit_worker.html

Issue 2594393003: Improve gpu pixel test for OffscreenCanvas (Closed)
Patch Set: Created 4 years 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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 2
3 <!-- READ BEFORE UPDATING: 3 <!-- READ BEFORE UPDATING:
4 If this test is updated make sure to increment the "revision" value of the 4 If this test is updated make sure to increment the "revision" value of the
5 associated test in content/test/gpu/page_sets/pixel_tests.py. This will ensure 5 associated test in content/test/gpu/gpu_tests/pixel_test_pages.py. This will ens ure
6 that the baseline images are regenerated on the next run. 6 that the baseline images are regenerated on the next run.
7 --> 7 -->
8 8
9 <html> 9 <html>
10 <head> 10 <head>
11 <title>OffscreenCanvas 2d commit flow on worker thread: Four-color square on whi te background.</title> 11 <title>OffscreenCanvas 2d commit flow on worker thread: Four-color square on whi te background.</title>
12 <style type="text/css"> 12 <style type="text/css">
13 .nomargin { 13 .nomargin {
14 margin: 0px auto; 14 margin: 0px auto;
15 } 15 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; 49 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
50 window.webkitRequestAnimationFrame(waitForFinish); 50 window.webkitRequestAnimationFrame(waitForFinish);
51 } 51 }
52 } 52 }
53 53
54 function main() 54 function main()
55 { 55 {
56 var canvas2D = document.getElementById("c"); 56 var canvas2D = document.getElementById("c");
57 var offscreenCanvas = canvas2D.transferControlToOffscreen(); 57 var offscreenCanvas = canvas2D.transferControlToOffscreen();
58 var worker = makeWorker(document.getElementById("myWorker").textContent); 58 var worker = makeWorker(document.getElementById("myWorker").textContent);
59 worker.postMessage(offscreenCanvas, [offscreenCanvas]);
60 worker.onmessage = function (e) { 59 worker.onmessage = function (e) {
61 waitForFinish(); 60 waitForFinish();
62 }; 61 };
62 worker.postMessage(offscreenCanvas, [offscreenCanvas]);
63 } 63 }
64 </script> 64 </script>
65 </head> 65 </head>
66 <body onload="main()"> 66 <body onload="main()">
67 <div style="position:relative; width:300px; height:300px; background-color:white "> 67 <div style="position:relative; width:300px; height:300px; background-color:white ">
68 </div> 68 </div>
69 <div id="container" style="position:absolute; top:0px; left:0px"> 69 <div id="container" style="position:absolute; top:0px; left:0px">
70 <canvas id="c" width="200" height="200" class="nomargin"></canvas> 70 <canvas id="c" width="200" height="200" class="nomargin"></canvas>
71 </div> 71 </div>
72 </body> 72 </body>
73 </html> 73 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698