1 function TemplateSvgStage(element, options)
3 Stage.call(this, element, options);
6 TemplateSvgStage.prototype = Object.create(Stage.prototype);
7 TemplateSvgStage.prototype.constructor = TemplateSvgStage;
9 TemplateSvgStage.prototype.tune = function(count)
11 // If count is -ve, -count elements need to be removed form the
12 // stage. If count is +ve, +count elements need to be added to
15 // TODO: Change objects in the stage.
17 // Return the number of all the elements in the stage.
18 // This number is recorded in the sampled data.
20 // TODO: Return the count of the objects in the stage.
24 TemplateSvgStage.prototype.animate = function(timeDelta)
26 // Animate the elements such that all of them are redrawn. You
27 // may need to define your object so it keeps its animation data.
28 // This object should encapsulate a corrosponding SVGElement.
29 // You may also define a method called animate() in this object
30 // and just call this function here for all the elements.
32 // TODO: Loop through all your objects and ask them to animate.
35 function TemplateSvgBenchmark(suite, test, options, recordTable, progressBar)
37 StageBenchmark.call(this, suite, test, options, recordTable, progressBar);
40 TemplateSvgBenchmark.prototype = Object.create(StageBenchmark.prototype);
41 TemplateSvgBenchmark.prototype.constructor = TemplateSvgBenchmark;
43 TemplateSvgBenchmark.prototype.createStage = function(element)
45 // You need to override this method such that your stage is hooked
46 // up to the benchmark.
47 return new TemplateSvgStage(element, this._options);
50 window.benchmarkClient.create = function(suite, test, options, recordTable, progressBar)
52 // This function is called from the test harness which starts the
53 // test by creating your benchmark object.
54 return new TemplateSvgBenchmark(suite, test, options, recordTable, progressBar);