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

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

Issue 675983004: Allow performance tests to test full rendering performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: layoutOrFullyRender -> forceLayoutOrFullFrame Created 6 years, 1 month 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 | « PerformanceTests/SVG/SvgCubics.html ('k') | PerformanceTests/ShadowDOM/ChangingClassName.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 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 }; 68 };
68 69
69 function animate() { 70 function animate() {
70 newFrame(); 71 newFrame();
71 requestAnimationFrame(animate); 72 requestAnimationFrame(animate);
72 } 73 }
73 74
74 if (window.testRunner) { 75 if (window.testRunner) {
75 PerfTestRunner.measureRunsPerSecond({ run: newFrame, done: function( ) { 76 PerfTestRunner.measureRunsPerSecond({ run: newFrame, done: function( ) {
76 document.getElementById('wrapper').style.display = 'none'; 77 document.getElementById('wrapper').style.display = 'none';
77 }}); 78 }});
78 } else 79 } else
79 requestAnimationFrame(animate); 80 requestAnimationFrame(animate);
80 </script> 81 </script>
81 </body> 82 </body>
82 </html> 83 </html>
OLDNEW
« no previous file with comments | « PerformanceTests/SVG/SvgCubics.html ('k') | PerformanceTests/ShadowDOM/ChangingClassName.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698