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

Side by Side Diff: PerformanceTests/Blending/resources/framerate.js

Issue 478333002: hasDescendantWithBlendMode should not be propagated outside the current stacking context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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
OLDNEW
1 (function(){ 1 (function(){
2 2
3 var framesPerTimerReading = 10; 3 var framesPerTimerReading = 10;
4 var frameCount = 0; 4 var frameCount = 0;
5 var startTime; 5 var startTime;
6 var trackingFrameRate = false; 6 var trackingFrameRate = false;
7 var currentTest;
7 8
8 function trackFrameRate(currTime) 9 function trackFrameRate(currTime)
9 { 10 {
10 if (++frameCount == framesPerTimerReading) { 11 if (++frameCount == framesPerTimerReading) {
11 frameCount = 0; 12 frameCount = 0;
12 PerfTestRunner.measureValueAsync(1000 * framesPerTimerReading / (currTim e - startTime)); 13 PerfTestRunner.measureValueAsync(1000 * framesPerTimerReading / (currTim e - startTime));
13 startTime = currTime; 14 startTime = currTime;
14 } 15 }
15 16
17 if (currentTest && currentTest.run)
18 currentTest.run();
19
16 if (trackingFrameRate) 20 if (trackingFrameRate)
17 requestAnimationFrame(trackFrameRate); 21 requestAnimationFrame(trackFrameRate);
18 } 22 }
19 23
20 window.startTrackingFrameRate = function() { 24 window.startTrackingFrameRate = function(test) {
21 if (trackingFrameRate) 25 if (trackingFrameRate)
22 return; 26 return;
23 trackingFrameRate = true; 27 trackingFrameRate = true;
28 currentTest = test;
24 startTime = performance.now(); 29 startTime = performance.now();
25 trackFrameRate(); 30 trackFrameRate();
26 }; 31 };
27 32
28 window.stopTrackingFrameRate = function() { 33 window.stopTrackingFrameRate = function() {
29 trackingFrameRate = false; 34 trackingFrameRate = false;
35 currentTest = undefined;
30 }; 36 };
31 37
32 })(); 38 })();
OLDNEW
« no previous file with comments | « PerformanceTests/Blending/mix-blend-mode-propagating-isolation.html ('k') | Source/core/paint/LayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698