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

Side by Side Diff: third_party/WebKit/PerformanceTests/SVG/SvgNestedUse.html

Issue 1557953002: Revert unfinished work of "full-frame-measurement" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PerfPaint
Patch Set: Created 4 years, 11 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/runner.js"></script> 4 <script src="../resources/runner.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <div id="wrapper"> 7 <div id="wrapper">
8 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/199 9/xlink"> 8 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/199 9/xlink">
9 <defs> 9 <defs>
10 <g id="unit"> 10 <g id="unit">
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 57 };
58 58
59 function newFrame() { 59 function newFrame() {
60 times.push(PerfTestRunner.now()); 60 times.push(PerfTestRunner.now());
61 var avg = (times[times.length - 1] - times[0]) / (times.length - 1); 61 var avg = (times[times.length - 1] - times[0]) / (times.length - 1);
62 while (times.length > 10) 62 while (times.length > 10)
63 times.shift(); 63 times.shift();
64 64
65 document.getElementById("FPS").textContent = (1000 / avg).toFixed(2) ; 65 document.getElementById("FPS").textContent = (1000 / avg).toFixed(2) ;
66 unit.setAttribute('transform', 'scale(' + (Math.abs(frame++ % 20 - 1 0) / 10) + ')'); 66 unit.setAttribute('transform', 'scale(' + (Math.abs(frame++ % 20 - 1 0) / 10) + ')');
67 PerfTestRunner.forceLayoutOrFullFrame(); 67 PerfTestRunner.forceLayout();
68 }; 68 };
69 69
70 function animate() { 70 function animate() {
71 newFrame(); 71 newFrame();
72 requestAnimationFrame(animate); 72 requestAnimationFrame(animate);
73 } 73 }
74 74
75 if (window.testRunner) { 75 if (window.testRunner) {
76 PerfTestRunner.measureRunsPerSecond({ run: newFrame, done: function( ) { 76 PerfTestRunner.measureRunsPerSecond({ run: newFrame, done: function( ) {
77 document.getElementById('wrapper').style.display = 'none'; 77 document.getElementById('wrapper').style.display = 'none';
78 }}); 78 }});
79 } else 79 } else
80 requestAnimationFrame(animate); 80 requestAnimationFrame(animate);
81 </script> 81 </script>
82 </body> 82 </body>
83 </html> 83 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698