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

Side by Side Diff: chrome/test/data/gpu/feature_compositing.html

Issue 9509001: Add basic threaded compositor test to gpu_feature_browsertest.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disabling because of assertion Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/gpu/gpu_feature_browsertest.cc » ('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 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title>GPU Feature Testing: Accelerated Compositing</title> 5 <title>GPU Feature Testing: Accelerated Compositing</title>
6 <style> 6 <style>
7 body { 7 body {
8 -webkit-transform: translateZ(0); 8 -webkit-transform: translateZ(0);
9 } 9 }
10 </style> 10 </style>
11 <script> 11 <script>
12 var frameCount = 0; 12 var frameCount = 0;
13 // 3 is not enough for threaded compositing, using 6 to avoid racing.
14 var totalRafs = 6;
13 15
14 function runTest() { 16 function runTest() {
15 window.webkitRequestAnimationFrame(draw); 17 window.webkitRequestAnimationFrame(draw);
16 } 18 }
17 function draw() { 19 function draw() {
18 frameCount++; 20 frameCount++;
19 var table = document.getElementById("table"); 21 var table = document.getElementById("table");
20 table.style.backgroundColor = (frameCount & 1) ? 'red' : 'black'; 22 table.style.backgroundColor = (frameCount & 1) ? 'red' : 'black';
21 if (frameCount == 3) { 23 if (frameCount == totalRafs) {
22 domAutomationController.setAutomationId(1); 24 domAutomationController.setAutomationId(1);
23 domAutomationController.send("FINISHED"); 25 domAutomationController.send("FINISHED");
24 } else { 26 } else {
25 window.webkitRequestAnimationFrame(draw); 27 window.webkitRequestAnimationFrame(draw);
26 } 28 }
27 } 29 }
28 </script> 30 </script>
29 </head> 31 </head>
30 <body onload="runTest()"> 32 <body onload="runTest()">
31 This page should trigger accelerated-compositing, i.e., gpu process should 33 This page should trigger accelerated-compositing, i.e., gpu process should
32 launch, if accelerated-compositing is allowed. 34 launch, if accelerated-compositing is allowed.
33 <table id="table" width="10" height="10"><tr/></table> 35 <table id="table" width="10" height="10"><tr/></table>
34 </body> 36 </body>
35 </html> 37 </html>
OLDNEW
« no previous file with comments | « no previous file | chrome/test/gpu/gpu_feature_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698