Delete chrome.mediaGalleriesPrivate because the functionality unique to it has since...
[chromium-blink-merge.git] / tools / perf / page_sets / tough_canvas_cases / many_images / bench.js
blob4a7fee65b99d0eefb599fe7ccb460bb0e9075f13
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 var bench = (function() {
6 var rafFunc;
7 var drawFunc;
9 function tick() {
10 drawFunc();
11 rafFunc(tick);
14 function startAnimation() {
15 rafFunc = window.requestAnimationFrame ||
16 window.webkitRequestAnimationFrame ||
17 window.mozRequestAnimationFrame ||
18 window.oRequestAnimationFrame ||
19 window.msRequestAnimationFrame;
20 rafFunc(tick);
23 var bench = {};
24 bench.run = function(df) {
25 drawFunc = df;
26 startAnimation();
28 return bench;
29 })();