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

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

Issue 2360413002: Implement OffscreenCanvas Unaccelerated 2d commit() on main thread (Closed)
Patch Set: fix 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/data/gpu/pixel_acceleratedOffscreen2d_commit_worker.html » ('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 2d commit flow on main thread: blue square on white backg round.</title>
12 <style type="text/css">
13 .nomargin {
14 margin: 0px auto;
15 }
16 </style>
17 <script>
18 var g_swapsBeforeAck = 15;
19
20 function main()
21 {
22 draw();
23 waitForFinish();
24 }
25
26 function draw()
27 {
28 var canvas = document.getElementById("c");
29 var offscreenCanvas = canvas.transferControlToOffscreen();
30 var ctx2d = offscreenCanvas.getContext("2d");
31 ctx2d.fillStyle = "blue";
32 ctx2d.fillRect(0, 0, offscreenCanvas.width, offscreenCanvas.height);
33 ctx2d.commit();
34 }
35
36 function waitForFinish()
37 {
38 if (g_swapsBeforeAck == 0) {
39 domAutomationController.setAutomationId(1);
40 domAutomationController.send("SUCCESS");
41 } else {
42 g_swapsBeforeAck--;
43 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
44 window.webkitRequestAnimationFrame(waitForFinish);
45 }
46 }
47 </script>
48 </head>
49 <body onload="main()">
50 <div style="position:relative; width:350px; height:350px; background-color:white ">
51 </div>
52 <div id="container" style="position:absolute; top:0px; left:0px">
53 <canvas id="c" width="320" height="320" class="nomargin"></canvas>
54 </div>
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « no previous file | content/test/data/gpu/pixel_acceleratedOffscreen2d_commit_worker.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698