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

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

Issue 2359123002: Revert of Update pixel test expectation and add new worker tests (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/pixel_expectations.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2
3 <!-- READ BEFORE UPDATING:
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
6 that the baseline images are regenerated on the next run.
7 -->
8
9 <html>
10 <head>
11 <title>OffscreenCanvas commit flow on worker thread: red square on white backgro und.</title>
12 <style type="text/css">
13 .nomargin {
14 margin: 0px auto;
15 }
16 </style>
17 <script id="myWorker" type="text/worker">
18 self.onmessage = function(e) {
19 var transferredOffscreenCanvas = e.data;
20 var gl = transferredOffscreenCanvas.getContext("webgl");
21 gl.clearColor(1.0, 0.0, 0.0, 1.0);
22 gl.clear(gl.COLOR_BUFFER_BIT);
23 gl.commit();
24 };
25 </script>
26 <script>
27 var g_swapsBeforeAck = 15;
28
29 function makeWorker(script) {
30 var blob = new Blob([script]);
31 return new Worker(URL.createObjectURL(blob));
32 }
33
34 function main()
35 {
36 draw();
37 waitForFinish();
38 }
39
40 function draw()
41 {
42 var canvas = document.getElementById("c");
43 var offscreenCanvas = canvas.transferControlToOffscreen();
44 var worker = makeWorker(document.getElementById("myWorker").textContent);
45 worker.postMessage(offscreenCanvas, [offscreenCanvas]);
46 }
47
48 function waitForFinish()
49 {
50 if (g_swapsBeforeAck == 0) {
51 domAutomationController.setAutomationId(1);
52 domAutomationController.send("SUCCESS");
53 } else {
54 g_swapsBeforeAck--;
55 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
56 window.webkitRequestAnimationFrame(waitForFinish);
57 }
58 }
59 </script>
60 </head>
61 <body onload="main()">
62 <div style="position:relative; width:200px; height:200px; background-color:white ">
63 </div>
64 <div id="container" style="position:absolute; top:0px; left:0px">
65 <canvas id="c" width="200" height="200" class="nomargin"></canvas>
66 </div>
67 </body>
68 </html>
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/pixel_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698