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

Side by Side Diff: content/test/data/gpu/pixel_canvas_display_linear-rgb.html

Issue 2708403003: Implement canvas color space IDL format for 2D canvas (Closed)
Patch Set: Addressing GPU pixel test failures Created 3 years, 9 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 | third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-linear-rgb.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 // This browser pixel test checks if the 2D canvas is properly displayed 5 // This browser pixel test checks if the 2D canvas is properly displayed
6 // when the color space is set to linear-rgb. 6 // when the color space is set to linear-rgb.
7 7
8 var g_swapsBeforeAck = 15; 8 var g_swapsBeforeAck = 15;
9 9
10 function main() 10 function main()
11 { 11 {
12 draw(); 12 draw();
13 waitForFinish(); 13 waitForFinish();
14 } 14 }
15 15
16 function draw() 16 function draw()
17 { 17 {
18 var ctx = document.getElementById("c").getContext("2d", {colorSpace:'linear-rg b'}); 18 var ctx = document.getElementById("c").getContext("2d", {colorSpace:"srgb", pi xelFormat: "float16"});
19 ctx.fillStyle = 'red'; 19 ctx.fillStyle = 'red';
20 ctx.fillRect(20,20,50,50); 20 ctx.fillRect(20,20,50,50);
21 ctx.fillStyle = 'green'; 21 ctx.fillStyle = 'green';
22 ctx.fillRect(70,20,50,50); 22 ctx.fillRect(70,20,50,50);
23 ctx.fillStyle = 'blue'; 23 ctx.fillStyle = 'blue';
24 ctx.fillRect(20,70,50,50); 24 ctx.fillRect(20,70,50,50);
25 ctx.fillStyle = 'black'; 25 ctx.fillStyle = 'black';
26 ctx.fillRect(70,70,50,50); 26 ctx.fillRect(70,70,50,50);
27 } 27 }
28 28
29 function waitForFinish() 29 function waitForFinish()
30 { 30 {
31 if (g_swapsBeforeAck == 0) { 31 if (g_swapsBeforeAck == 0) {
32 domAutomationController.setAutomationId(1); 32 domAutomationController.setAutomationId(1);
33 domAutomationController.send("SUCCESS"); 33 domAutomationController.send("SUCCESS");
34 } else { 34 } else {
35 g_swapsBeforeAck--; 35 g_swapsBeforeAck--;
36 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; 36 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1;
37 window.webkitRequestAnimationFrame(waitForFinish); 37 window.webkitRequestAnimationFrame(waitForFinish);
38 } 38 }
39 } 39 }
40 </script> 40 </script>
41 </head> 41 </head>
42 <body onload="main()"> 42 <body onload="main()">
43 <div id="container" style="position:absolute; top:0px; left:0px"> 43 <div id="container" style="position:absolute; top:0px; left:0px">
44 <canvas id="c" width="140" height="140"></canvas> 44 <canvas id="c" width="140" height="140"></canvas>
45 </div> 45 </div>
46 </body> 46 </body>
47 </html> 47 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-getImageData-linear-rgb.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698