<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[194520] trunk/PerformanceTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/194520">194520</a></dd>
<dt>Author</dt> <dd>jonlee@apple.com</dd>
<dt>Date</dt> <dd>2016-01-03 15:02:56 -0800 (Sun, 03 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Simplify the test harness
https://bugs.webkit.org/show_bug.cgi?id=152562

Reviewed by Simon Fraser.

All of the benchmarks use the default Animator(). Don't require new tests
to pass a new instance, and instead just make one in the Benchmark constructor.

* Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
* Animometer/tests/master/resources/canvas-tests.js:
* Animometer/tests/misc/resources/canvas-electrons.js:
* Animometer/tests/misc/resources/canvas-stars.js:
* Animometer/tests/misc/resources/compositing-transforms.js:
* Animometer/tests/resources/main.js:
* Animometer/tests/simple/resources/simple-canvas-paths.js:
* Animometer/tests/template/resources/template-canvas.js:
* Animometer/tests/template/resources/template-css.js:
* Animometer/tests/template/resources/template-svg.js:
* Animometer/tests/text/resources/layering-text.js:
* Animometer/tests/text/resources/text-boxes.js:

Refactor the template.

* Animometer/tests/template/resources/template-canvas.js:
* Animometer/tests/template/resources/template-css.js:
* Animometer/tests/template/resources/template-svg.js:
* Animometer/tests/template/template-canvas.html:
* Animometer/tests/template/template-css.html:
* Animometer/tests/template/template-svg.html:

Refactor the SVG suite.

* Animometer/tests/bouncing-particles/bouncing-svg-images.html: Move scripts to the end.
* Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.

* Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Remove extraneous includes
to stage.js.
* Animometer/tests/text/text-boxes.html: Ditto.

BouncingCanvasParticlesBenchmark is not necessary. Use Benchmark directly when subclassing.
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Remove
BouncingCanvasParticlesBenchmark.
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Use Benchmark.
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Ditto.

* Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js: Require the shape
in the constructor instead of having subclasses set the private variable.

* Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js: Refactor.
* Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:

Refactor the HTML suite.

Move scripts to the end.
* Animometer/tests/bouncing-particles/bouncing-css-images.html:
* Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
* Animometer/tests/text/layering-text.html:
* Animometer/tests/text/text-boxes.html:

Refactor to use the new variables.
* Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
* Animometer/tests/text/resources/layering-text.js:
* Animometer/tests/text/resources/text-boxes.js:

Refactor the bouncing canvas tests.

* Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Move scripts to the end.
* Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Move scripts to the end.

* Animometer/tests/bouncing-particles/resources/bouncing-particles.js: Promote a few
properties to &quot;public&quot; since they are used by subclasses.
(BouncingParticlesStage): Fix the constructor, which was missing &quot;this&quot;. Make particles
&quot;public&quot; for subclasses.
(BouncingParticlesStage.initialize): Fix the max velocity, which was accidentally changed.
* Animometer/tests/misc/resources/compositing-transforms.js: Refactor.

* Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
BouncingCanvasParticlesAnimator is no longer needed.
(BouncingCanvasParticle): Change constructor to take a shape as a parameter instead of
having subclasses set the variable.

* Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Refactor.
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Refactor.

Move example/ files into misc/.

* Animometer/tests/misc/canvas-electrons.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-electrons.html.
* Animometer/tests/misc/canvas-stars.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-stars.html.
* Animometer/tests/misc/resources/canvas-electrons.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-electrons.js.
* Animometer/tests/misc/resources/canvas-stars.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-stars.js.

* Animometer/resources/debug-runner/tests.js: Update test URLs.

Refactor miscellaneous suite.

* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
Remove BouncingParticlesAnimator and BouncingParticleBenchmark, which are
not needed.
(tune): Remove console assert.
* Animometer/tests/resources/main.js: Add Rotater back in from stage.js.

* Animometer/tests/examples/resources/canvas-electrons.js: Remove CanvasElectronsAnimator.
* Animometer/tests/examples/resources/canvas-stars.js: Remove CanvasStarsAnimator.
* Animometer/tests/misc/resources/compositing-transforms.js:
* Animometer/tests/examples/canvas-electrons.html: Move scripts to the end.
* Animometer/tests/examples/canvas-stars.html: Ditto.
* Animometer/tests/misc/compositing-transforms.html: Ditto.

Refactor the simple suite.

* Animometer/tests/master/resources/canvas-stage.js:
(tune): Remove coordinateMaximum since it is not needed in any
of the master tests.
* Animometer/tests/simple/resources/simple-canvas.js:
SimpleCanvasAnimator and SimpleCanvasBenchmark are no longer
needed.
(tune): Manage the objects differently, but instead of duplicating
all of SimpleCanvasStage here, just replace tune(). Include
coordinateMaximum, and remove items from the end of the list
instead of the beginning.
(StageBenchmark.call.createAnimator): Deleted.
(StageBenchmark.call): Deleted.
* Animometer/tests/simple/resources/simple-canvas-paths.js:
* Animometer/tests/simple/simple-canvas-paths.html: Move
scripts to the end.

Get rid of stage.js, StageAnimator, and StageBenchmark. Don't have the progress bar update during the test.

* Animometer/resources/debug-runner/animometer.js:
(initialize): Move the setting of testsCount to the debug runner.
(didRunTest): Nicer name.
* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Don't pass in the progress bar to benchmarks.
* Animometer/resources/extensions.js:
(ProgressBar): Refactor. Make variables &quot;private&quot;. Resetting the progress when instantiating.
(ProgressBar.prototype.incrementRange): This is called every time a benchmark completes.
* Animometer/resources/runner/animometer.js:
(window.benchmarkRunnerClient.initialize): Remove unneeded setting of testsCount.
* Animometer/resources/strings.js: These are no longer needed.
* Animometer/tests/master/canvas-stage.html: Remove script inclusion. Other tests will follow.
* Animometer/tests/master/resources/canvas-tests.js: Use Benchmark instead of StageBenchmark.
* Animometer/tests/resources/main.js: Messages are no longer needed
(Animator.prototype._shouldRequestAnotherFrame): Rename from animate(), since this method returns a boolean
indicating whether another frame should be requested. Collapse the logic from StageAnimator into animateLoop.
(BenchmarkState.prototype.currentStage): Deleted.
(BenchmarkState.prototype.currentMessage): Deleted.
(BenchmarkState.prototype.currentProgress): Deleted.
(Animator.prototype.animate): Deleted.
(Animator.prototype.animateLoop): The stage is animated only when we have another frame to draw.
(Benchmark.prototype.record): No need to update the progress bar.
* Animometer/tests/resources/stage.js: Removed. Rotater will appear in a later patch, in main.js.

* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Each test is run as a benchmark.
Remove the call to runBenchmark by merging the options here, and calling benchmark.run()
directly.

Make the class relationships more easily understandable. The benchmark owns the stage,
animator, and options. Make the stage and animator no longer have their own references to
the options. Make Stage a first-class citizen by promoting it to main.js. Later patches
will try to get rid of stage.js altogether.
* Animometer/tests/resources/main.js:
(Stage): Moved from stage.js.
(Animator): Don't pass in benchmark and options in its constructor. It will get initialized
by benchmark-related parameters in initialize().
(Animator.prototype.initialize): Add a back-reference to benchmark and cache an option.
(Animator.prototype.get benchmark):
(Animator.prototype.animate): Refactor to use the cached option, to remove its dependency on
the options dictionary.
(Benchmark): Require all benchmarks to have a stage and animator. The instance will initialize
them.
(Benchmark.prototype.get options):
(Benchmark.prototype.get stage): BenchmarkStates.stages will need to be renamed to avoid confusion.
(Benchmark.prototype.get animator):
(Benchmark.prototype.start):
(Benchmark.prototype.update): Ask the stage directly to tune or clear instead of adding another
level of indirection.
(window.runBenchmark): Deleted. Remove the need for a benchmarkClient. Also remove the standalone
path, since tests can be individually selected, and remove the need for runBenchmark since that is
handled in BenchmarkRunner._runBenchmarkAndRecordResults.
* Animometer/tests/resources/stage.js:
(Stage): Deleted. Moved to main.js.
(StageBenchmark): What's left is updating the progress bar; to be removed.
(StageAnimator): What's left can be folded in Animator.

Refactor master suite.
* Animometer/tests/master/resources/canvas-stage.js: This now only has SimpleCanvasStage.
(animate): Push the clearRect() into each stage.
(complexity):
(StageBenchmark.call.createAnimator): Deleted.
(StageBenchmark.call): Deleted.
* Animometer/tests/master/resources/canvas-tests.js: SimpleCanvasPathStrokeStage is no longer needed.
(CanvasLineSegment.prototype.draw):
(CanvasArc):
(CanvasLinePoint): Remove the draw call because depending on its index it either needs to be moveTo
or lineTo, and it is otherwise a very small draw operation that doesn't need the overhead of the
function call. Do all of the drawing through the stage.

Refactor the subclass pattern. Introduce Utilities.createSubclass().

* Animometer/resources/debug-runner/benchmark-runner.js:
* Animometer/resources/extensions.js:
(window.Utilities.createSubclass): Takes the super class, a function representing
the class's constructor, and additional methods to attach to the new class's
prototype object.
* Animometer/tests/text/text-boxes.html: Remove unneeded reference to utilities.js.

Refactor tests.
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
* Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
* Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
* Animometer/tests/examples/resources/canvas-electrons.js:
* Animometer/tests/examples/resources/canvas-stars.js:
* Animometer/tests/master/resources/canvas-stage.js:
* Animometer/tests/master/resources/canvas-tests.js:
* Animometer/tests/misc/resources/compositing-transforms.js:
* Animometer/tests/resources/stage.js:
* Animometer/tests/simple/resources/simple-canvas-paths.js:
* Animometer/tests/simple/resources/simple-canvas.js:
* Animometer/tests/template/resources/template-canvas.js:
* Animometer/tests/template/resources/template-css.js:
* Animometer/tests/template/resources/template-svg.js:
* Animometer/tests/text/resources/layering-text.js: Reorder some of the methods
and properties since they rely on each other.
* Animometer/tests/text/resources/text-boxes.js:

* Animometer/resources/debug-runner/animometer.js: Arrange calls
in the order they are evoked.
* Animometer/resources/debug-runner/benchmark-runner.js:
(BenchmarkRunnerState.prototype.next): Get rid of return value since
no caller to next() uses it.
(BenchmarkRunnerState.prototype.prepareCurrentTest): Refactor the
promise to resolve simply when onload() is called instead of
looking for #stage.
(BenchmarkRunner.prototype._runTestAndRecordResults): Suite.run
simply calls runBenchmark(). Call it directly rather than through
the Suite.
(BenchmarkRunner.prototype.step): Remove unused parameter in
resolve callback.
(BenchmarkRunner.prototype.runMultipleIterations): Use this instead
of self since it is outside of the closure which needed the self
variable.
(resolveIfReady): Deleted.
(BenchmarkRunner.prototype.waitForElement): Deleted.
* Animometer/resources/runner/tests.js: prepare() and run() are
no longer needed.
(Suite.prototype.prepare): Deleted.
(Suite.prototype.run): Deleted.
* Animometer/tests/master/canvas-stage.html: Move all scripts to
the end of the page.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunneranimometerjs">trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunnerbenchmarkrunnerjs">trunk/PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunnertestsjs">trunk/PerformanceTests/Animometer/resources/debug-runner/tests.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesextensionsjs">trunk/PerformanceTests/Animometer/resources/extensions.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesrunneranimometerjs">trunk/PerformanceTests/Animometer/resources/runner/animometer.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesrunnertestsjs">trunk/PerformanceTests/Animometer/resources/runner/tests.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesstringsjs">trunk/PerformanceTests/Animometer/resources/strings.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcanvasimageshtml">trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-images.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcanvasshapeshtml">trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcssimageshtml">trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-images.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcssshapeshtml">trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-shapes.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingsvgimageshtml">trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-images.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingsvgshapeshtml">trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-shapes.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcanvasimagesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcanvasparticlesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcanvasshapesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcssimagesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-images.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcssshapesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingparticlesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingsvgimagesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingsvgparticlesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingsvgshapesjs">trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmastercanvasstagehtml">trunk/PerformanceTests/Animometer/tests/master/canvas-stage.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmasterresourcescanvasstagejs">trunk/PerformanceTests/Animometer/tests/master/resources/canvas-stage.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmasterresourcescanvastestsjs">trunk/PerformanceTests/Animometer/tests/master/resources/canvas-tests.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmisccompositingtransformshtml">trunk/PerformanceTests/Animometer/tests/misc/compositing-transforms.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmiscresourcescompositingtransformsjs">trunk/PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsresourcesmainjs">trunk/PerformanceTests/Animometer/tests/resources/main.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestssimpleresourcessimplecanvaspathsjs">trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestssimpleresourcessimplecanvasjs">trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestssimplesimplecanvaspathshtml">trunk/PerformanceTests/Animometer/tests/simple/simple-canvas-paths.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststemplateresourcestemplatecanvasjs">trunk/PerformanceTests/Animometer/tests/template/resources/template-canvas.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststemplateresourcestemplatecssjs">trunk/PerformanceTests/Animometer/tests/template/resources/template-css.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststemplateresourcestemplatesvgjs">trunk/PerformanceTests/Animometer/tests/template/resources/template-svg.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststemplatetemplatecanvashtml">trunk/PerformanceTests/Animometer/tests/template/template-canvas.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststemplatetemplatecsshtml">trunk/PerformanceTests/Animometer/tests/template/template-css.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststemplatetemplatesvghtml">trunk/PerformanceTests/Animometer/tests/template/template-svg.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststextlayeringtexthtml">trunk/PerformanceTests/Animometer/tests/text/layering-text.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststextresourceslayeringtextjs">trunk/PerformanceTests/Animometer/tests/text/resources/layering-text.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststextresourcestextboxesjs">trunk/PerformanceTests/Animometer/tests/text/resources/text-boxes.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerteststexttextboxeshtml">trunk/PerformanceTests/Animometer/tests/text/text-boxes.html</a></li>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsAnimometertestsmisccanvaselectronshtml">trunk/PerformanceTests/Animometer/tests/misc/canvas-electrons.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmisccanvasstarshtml">trunk/PerformanceTests/Animometer/tests/misc/canvas-stars.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmiscresourcescanvaselectronsjs">trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-electrons.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometertestsmiscresourcescanvasstarsjs">trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-stars.js</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/PerformanceTests/Animometer/tests/examples/</li>
<li><a href="#trunkPerformanceTestsAnimometertestsresourcesstagejs">trunk/PerformanceTests/Animometer/tests/resources/stage.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunneranimometerjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,15 +2,21 @@
</span><span class="cx">     testsCount: null,
</span><span class="cx">     progressBar: null,
</span><span class="cx"> 
</span><del>-    didRunTest: function ()
</del><ins>+    initialize: function(suites, options)
</ins><span class="cx">     {
</span><del>-        this.progressBar.incRange();
</del><ins>+        this.testsCount = this.iterationCount * suites.reduce(function (count, suite) { return count + suite.tests.length; }, 0);
+        this.options = options;
</ins><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     willStartFirstIteration: function ()
</span><span class="cx">     {
</span><span class="cx">         this.results = new ResultsDashboard();
</span><span class="cx">         this.progressBar = new ProgressBar(document.getElementById(&quot;progress-completed&quot;), this.testsCount);
</span><ins>+    },
+
+    didRunTest: function()
+    {
+        this.progressBar.incrementRange();
</ins><span class="cx">     }
</span><span class="cx"> });
</span><span class="cx"> 
</span><span class="lines">@@ -30,7 +36,7 @@
</span><span class="cx">             return formElement.checked;
</span><span class="cx">         return formElement.value;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     updateUIFromLocalStorage: function()
</span><span class="cx">     {
</span><span class="cx">         var formElements = document.forms[&quot;benchmark-options&quot;].elements;
</span><span class="lines">@@ -56,7 +62,7 @@
</span><span class="cx">     updateLocalStorageFromUI: function()
</span><span class="cx">     {
</span><span class="cx">         var formElements = document.forms[&quot;benchmark-options&quot;].elements;
</span><del>-        var options = {};        
</del><ins>+        var options = {};
</ins><span class="cx"> 
</span><span class="cx">         for (var i = 0; i &lt; formElements.length; ++i) {
</span><span class="cx">             var formElement = formElements[i];
</span><span class="lines">@@ -69,10 +75,10 @@
</span><span class="cx">                 options[name] = formElement.checked;
</span><span class="cx">             else if (type == &quot;radio&quot;)
</span><span class="cx">                 options[name] = formElements[name].value;
</span><del>-    
</del><ins>+
</ins><span class="cx">             localStorage.setItem(name, options[name]);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         return options;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -83,12 +89,12 @@
</span><span class="cx">     {
</span><span class="cx">         return document.querySelector(&quot;#suites &gt; .tree&quot;);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     _suitesElements: function()
</span><span class="cx">     {
</span><span class="cx">         return document.querySelectorAll(&quot;#suites &gt; ul &gt; li&quot;);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     _checkboxElement: function(element)
</span><span class="cx">     {
</span><span class="cx">         return element.querySelector(&quot;input[type='checkbox']:not(.expand-button)&quot;);
</span><span class="lines">@@ -103,7 +109,7 @@
</span><span class="cx">     {
</span><span class="cx">         return document.querySelectorAll(&quot;#suites input[type='number']&quot;);
</span><span class="cx">     },
</span><del>-        
</del><ins>+
</ins><span class="cx">     _localStorageNameForTest: function(suiteName, testName)
</span><span class="cx">     {
</span><span class="cx">         return suiteName + &quot;/&quot; + testName;
</span><span class="lines">@@ -125,17 +131,17 @@
</span><span class="cx">     {
</span><span class="cx">         var suitesElements = this._suitesElements();
</span><span class="cx">         var startButton = document.querySelector(&quot;#intro button&quot;);
</span><del>-        
</del><ins>+
</ins><span class="cx">         for (var i = 0; i &lt; suitesElements.length; ++i) {
</span><span class="cx">             var suiteElement = suitesElements[i];
</span><span class="cx">             var suiteCheckbox = this._checkboxElement(suiteElement);
</span><del>-            
</del><ins>+
</ins><span class="cx">             if (suiteCheckbox.checked) {
</span><span class="cx">                 startButton.disabled = false;
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-    
</del><ins>+
</ins><span class="cx">         startButton.disabled = true;
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -144,7 +150,7 @@
</span><span class="cx">         var selected = event.target.checked;
</span><span class="cx">         event.target.testsElements.forEach(function(testElement) {
</span><span class="cx">             var testCheckbox = this._checkboxElement(testElement);
</span><del>-            testCheckbox.checked = selected;        
</del><ins>+            testCheckbox.checked = selected;
</ins><span class="cx">         }, this);
</span><span class="cx">         this._updateStartButtonState();
</span><span class="cx">     },
</span><span class="lines">@@ -201,7 +207,7 @@
</span><span class="cx">             }, this);
</span><span class="cx">         }, this);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     updateEditsElementsState: function()
</span><span class="cx">     {
</span><span class="cx">         var editsElements = this._editsElements();
</span><span class="lines">@@ -224,17 +230,17 @@
</span><span class="cx">     updateUIFromLocalStorage: function()
</span><span class="cx">     {
</span><span class="cx">         var suitesElements = this._suitesElements();
</span><del>-        
</del><ins>+
</ins><span class="cx">         for (var i = 0; i &lt; suitesElements.length; ++i) {
</span><span class="cx">             var suiteElement = suitesElements[i];
</span><span class="cx">             var suiteCheckbox = this._checkboxElement(suiteElement);
</span><span class="cx">             var suite = suiteCheckbox.suite;
</span><del>-            
</del><ins>+
</ins><span class="cx">             suiteCheckbox.testsElements.forEach(function(testElement) {
</span><span class="cx">                 var testCheckbox = this._checkboxElement(testElement);
</span><span class="cx">                 var testEdit = this._editElement(testElement);
</span><span class="cx">                 var test = testCheckbox.test;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 var str = localStorage.getItem(this._localStorageNameForTest(suite.name, test.name));
</span><span class="cx">                 if (str === null)
</span><span class="cx">                     return;
</span><span class="lines">@@ -246,7 +252,7 @@
</span><span class="cx"> 
</span><span class="cx">             this._updateSuiteCheckboxState(suiteCheckbox);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         this._updateStartButtonState();
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -254,7 +260,7 @@
</span><span class="cx">     {
</span><span class="cx">         var suitesElements = this._suitesElements();
</span><span class="cx">         var suites = [];
</span><del>-        
</del><ins>+
</ins><span class="cx">         for (var i = 0; i &lt; suitesElements.length; ++i) {
</span><span class="cx">             var suiteElement = suitesElements[i];
</span><span class="cx">             var suiteCheckbox = this._checkboxElement(suiteElement);
</span><span class="lines">@@ -265,13 +271,13 @@
</span><span class="cx">                 var testCheckbox = this._checkboxElement(testElement);
</span><span class="cx">                 var testEdit = this._editElement(testElement);
</span><span class="cx">                 var test = testCheckbox.test;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 if (testCheckbox.checked) {
</span><span class="cx">                     test.complexity = testEdit.value;
</span><span class="cx">                     tests.push(test);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                var value = { checked: testCheckbox.checked, complexity: testEdit.value }; 
</del><ins>+                var value = { checked: testCheckbox.checked, complexity: testEdit.value };
</ins><span class="cx">                 localStorage.setItem(this._localStorageNameForTest(suite.name, test.name), JSON.stringify(value));
</span><span class="cx">             }, this);
</span><span class="cx"> 
</span><span class="lines">@@ -281,7 +287,7 @@
</span><span class="cx"> 
</span><span class="cx">         return suites;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     updateLocalStorageFromJSON: function(iterationResults)
</span><span class="cx">     {
</span><span class="cx">         for (var suiteName in iterationResults[Strings.json.results.suites]) {
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunnerbenchmarkrunnerjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -6,48 +6,49 @@
</span><span class="cx">     this.next();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BenchmarkRunnerState.prototype.currentSuite = function()
-{
-    return this._suites[this._suiteIndex];
-};
</del><ins>+BenchmarkRunnerState.prototype = {
+    currentSuite: function()
+    {
+        return this._suites[this._suiteIndex];
+    },
</ins><span class="cx"> 
</span><del>-BenchmarkRunnerState.prototype.currentTest = function()
-{
-    var suite = this.currentSuite();
-    return suite ? suite.tests[this._testIndex] : null;
-};
</del><ins>+    currentTest: function()
+    {
+        var suite = this.currentSuite();
+        return suite ? suite.tests[this._testIndex] : null;
+    },
</ins><span class="cx"> 
</span><del>-BenchmarkRunnerState.prototype.isFirstTest = function()
-{
-    return !this._testIndex;
-};
</del><ins>+    isFirstTest: function()
+    {
+        return !this._testIndex;
+    },
</ins><span class="cx"> 
</span><del>-BenchmarkRunnerState.prototype.next = function()
-{
-    this._testIndex++;
</del><ins>+    next: function()
+    {
+        this._testIndex++;
</ins><span class="cx"> 
</span><del>-    var suite = this._suites[this._suiteIndex];
-    if (suite &amp;&amp; this._testIndex &lt; suite.tests.length)
-        return this;
</del><ins>+        var suite = this._suites[this._suiteIndex];
+        if (suite &amp;&amp; this._testIndex &lt; suite.tests.length)
+            return;
</ins><span class="cx"> 
</span><del>-    this._testIndex = 0;
-    do {
-        this._suiteIndex++;
-    } while (this._suiteIndex &lt; this._suites.length &amp;&amp; this._suites[this._suiteIndex].disabled);
</del><ins>+        this._testIndex = 0;
+        do {
+            this._suiteIndex++;
+        } while (this._suiteIndex &lt; this._suites.length &amp;&amp; this._suites[this._suiteIndex].disabled);
+    },
</ins><span class="cx"> 
</span><del>-    return this;
-};
</del><ins>+    prepareCurrentTest: function(runner, frame)
+    {
+        var test = this.currentTest();
+        var promise = new SimplePromise;
</ins><span class="cx"> 
</span><del>-BenchmarkRunnerState.prototype.prepareCurrentTest = function(runner, frame)
-{
-    var suite = this.currentSuite();
-    var test = this.currentTest();
-    var promise = new SimplePromise;
-    frame.onload = function() {
-        suite.prepare(runner, frame.contentWindow, frame.contentDocument).then(function(result) { promise.resolve(result); });
</del><ins>+        frame.onload = function() {
+            promise.resolve();
+        };
+
+        frame.src = &quot;tests/&quot; + test.url;
+        return promise;
</ins><span class="cx">     }
</span><del>-    frame.src = &quot;tests/&quot; + test.url;
-    return promise;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> function BenchmarkRunner(suites, frameContainer, client)
</span><span class="lines">@@ -57,128 +58,119 @@
</span><span class="cx">     this._frameContainer = frameContainer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BenchmarkRunner.prototype.waitForElement = function(selector)
-{
-    var promise = new SimplePromise;
-    var contentDocument = this._frame.contentDocument;
</del><ins>+BenchmarkRunner.prototype = {
+    _appendFrame: function()
+    {
+        var frame = document.createElement(&quot;iframe&quot;);
+        frame.setAttribute(&quot;scrolling&quot;, &quot;no&quot;);
</ins><span class="cx"> 
</span><del>-    function resolveIfReady() {
-        var element = contentDocument.querySelector(selector);
-        if (element)
-            return promise.resolve(element);
-        setTimeout(resolveIfReady, 50);
-    }
</del><ins>+        this._frameContainer.insertBefore(frame, this._frameContainer.firstChild);
+        this._frame = frame;
+        return frame;
+    },
</ins><span class="cx"> 
</span><del>-    resolveIfReady();
-    return promise;
-};
</del><ins>+    _removeFrame: function()
+    {
+        if (this._frame) {
+            this._frame.parentNode.removeChild(this._frame);
+            this._frame = null;
+        }
+    },
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype._appendFrame = function()
-{
-    var frame = document.createElement(&quot;iframe&quot;);
-    frame.setAttribute(&quot;scrolling&quot;, &quot;no&quot;);
</del><ins>+    _runBenchmarkAndRecordResults: function(state)
+    {
+        var promise = new SimplePromise;
+        var suite = state.currentSuite();
+        var test = state.currentTest();
</ins><span class="cx"> 
</span><del>-    this._frameContainer.insertBefore(frame, this._frameContainer.firstChild);
-    this._frame = frame;
-    return frame;
-};
</del><ins>+        if (this._client &amp;&amp; this._client.willRunTest)
+            this._client.willRunTest(suite, test);
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype._removeFrame = function()
-{
-    if (this._frame) {
-        this._frame.parentNode.removeChild(this._frame);
-        this._frame = null;
-    }
-};
</del><ins>+        var contentWindow = this._frame.contentWindow;
+        var self = this;
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype._runTestAndRecordResults = function(state)
-{
-    var promise = new SimplePromise;
-    var suite = state.currentSuite();
-    var test = state.currentTest();
-    
-    if (this._client &amp;&amp; this._client.willRunTest)
-        this._client.willRunTest(suite, test);
</del><ins>+        var options = { complexity: test.complexity };
+        Utilities.extendObject(options, this._client.options);
+        Utilities.extendObject(options, contentWindow.Utilities.parseParameters());
</ins><span class="cx"> 
</span><del>-    var contentWindow = this._frame.contentWindow;
-    var self = this;
</del><ins>+        var benchmark = new contentWindow.benchmarkClass(options);
+        benchmark.run().then(function(sampler) {
+            var samplers = self._suitesSamplers[suite.name] || {};
+            samplers[test.name] = sampler.toJSON(true, true);
+            self._suitesSamplers[suite.name] = samplers;
</ins><span class="cx"> 
</span><del>-    suite.run(contentWindow, test, this._client.options, this._client.progressBar).then(function(sampler) {
-        var samplers = self._suitesSamplers[suite.name] || {};
-        samplers[test.name] = sampler.toJSON(true, true);
-        self._suitesSamplers[suite.name] = samplers;
</del><ins>+            if (self._client &amp;&amp; self._client.didRunTest)
+                self._client.didRunTest(suite, test);
</ins><span class="cx"> 
</span><del>-        if (self._client &amp;&amp; self._client.didRunTest)
-            self._client.didRunTest(suite, test);
-        
-        state.next();
-        if (state.currentSuite() != suite)
-            self._removeFrame();
-        promise.resolve(state);
-    });
-    
-    return promise;
-};
</del><ins>+            state.next();
+            if (state.currentSuite() != suite)
+                self._removeFrame();
+            promise.resolve(state);
+        });
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype.step = function(state)
-{
-    if (!state) {
-        state = new BenchmarkRunnerState(this._suites);
-        this._suitesSamplers = {};
-    }
-
-    var suite = state.currentSuite();
-    if (!suite) {
-        this._finalize();
-        var promise = new SimplePromise;
-        promise.resolve();
</del><span class="cx">         return promise;
</span><del>-    }
</del><ins>+    },
</ins><span class="cx"> 
</span><del>-    if (state.isFirstTest()) {
-        this._appendFrame();
-    }
</del><ins>+    step: function(state)
+    {
+        if (!state) {
+            state = new BenchmarkRunnerState(this._suites);
+            this._suitesSamplers = {};
+        }
</ins><span class="cx"> 
</span><del>-    return state.prepareCurrentTest(this, this._frame).then(function(prepareReturnValue) {
-        return this._runTestAndRecordResults(state);
-    }.bind(this));
-};
</del><ins>+        var suite = state.currentSuite();
+        if (!suite) {
+            this._finalize();
+            var promise = new SimplePromise;
+            promise.resolve();
+            return promise;
+        }
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype.runAllSteps = function(startingState)
-{
-    var nextCallee = this.runAllSteps.bind(this);
-    this.step(startingState).then(function(nextState) {
-        if (nextState)
-            nextCallee(nextState);
-    });
-};
</del><ins>+        if (state.isFirstTest()) {
+            this._appendFrame();
+        }
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype.runMultipleIterations = function()
-{
-    var self = this;
-    var currentIteration = 0;
</del><ins>+        return state.prepareCurrentTest(this, this._frame).then(function(prepareReturnValue) {
+            return this._runBenchmarkAndRecordResults(state);
+        }.bind(this));
+    },
</ins><span class="cx"> 
</span><del>-    this._runNextIteration = function() {
-        currentIteration++;
-        if (currentIteration &lt; self._client.iterationCount)
-            self.runAllSteps();
-        else if (this._client &amp;&amp; this._client.didFinishLastIteration)
-            self._client.didFinishLastIteration();
-    }
</del><ins>+    runAllSteps: function(startingState)
+    {
+        var nextCallee = this.runAllSteps.bind(this);
+        this.step(startingState).then(function(nextState) {
+            if (nextState)
+                nextCallee(nextState);
+        });
+    },
</ins><span class="cx"> 
</span><del>-    if (self._client &amp;&amp; self._client.willStartFirstIteration)
-        self._client.willStartFirstIteration();
</del><ins>+    runMultipleIterations: function()
+    {
+        var self = this;
+        var currentIteration = 0;
</ins><span class="cx"> 
</span><del>-    self.runAllSteps();
-};
</del><ins>+        this._runNextIteration = function() {
+            currentIteration++;
+            if (currentIteration &lt; self._client.iterationCount)
+                self.runAllSteps();
+            else if (this._client &amp;&amp; this._client.didFinishLastIteration)
+                self._client.didFinishLastIteration();
+        }
</ins><span class="cx"> 
</span><del>-BenchmarkRunner.prototype._finalize = function()
-{
-    this._removeFrame();
-        
-    if (this._client &amp;&amp; this._client.didRunSuites)
-        this._client.didRunSuites(this._suitesSamplers);
</del><ins>+        if (this._client &amp;&amp; this._client.willStartFirstIteration)
+            this._client.willStartFirstIteration();
</ins><span class="cx"> 
</span><del>-    if (this._runNextIteration)
-        this._runNextIteration();
</del><ins>+        this.runAllSteps();
+    },
+
+    _finalize: function()
+    {
+        this._removeFrame();
+
+        if (this._client &amp;&amp; this._client.didRunSuites)
+            this._client.didRunSuites(this._suitesSamplers);
+
+        if (this._runNextIteration)
+            this._runNextIteration();
+    }
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunnertestsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/tests.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/tests.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/tests.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -73,15 +73,15 @@
</span><span class="cx"> 
</span><span class="cx"> Suites.push(new Suite(&quot;HTML suite&quot;,
</span><span class="cx">     [
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-css-shapes.html?particleWidth=12&amp;particleHeight=12&amp;shape=circle&quot;,
</span><span class="cx">             name: &quot;CSS bouncing circles&quot;
</span><span class="cx">         },
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-css-shapes.html?particleWidth=40&amp;particleHeight=40&amp;shape=rect&amp;clip=star&quot;,
</span><span class="cx">             name: &quot;CSS bouncing clipped rects&quot;
</span><span class="cx">         },
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-css-shapes.html?particleWidth=50&amp;particleHeight=50&amp;shape=circle&amp;fill=gradient&quot;,
</span><span class="cx">             name: &quot;CSS bouncing gradient circles&quot;
</span><span class="cx">         },
</span><span class="lines">@@ -106,19 +106,19 @@
</span><span class="cx"> 
</span><span class="cx"> Suites.push(new Suite(&quot;Canvas suite&quot;,
</span><span class="cx">     [
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-canvas-shapes.html?particleWidth=12&amp;particleHeight=12&amp;shape=circle&quot;,
</span><span class="cx">             name: &quot;canvas bouncing circles&quot;
</span><span class="cx">         },
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-canvas-shapes.html?particleWidth=40&amp;particleHeight=40&amp;shape=rect&amp;clip=star&quot;,
</span><span class="cx">             name: &quot;canvas bouncing clipped rects&quot;
</span><span class="cx">         },
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-canvas-shapes.html?particleWidth=50&amp;particleHeight=50&amp;shape=circle&amp;fill=gradient&quot;,
</span><span class="cx">             name: &quot;canvas bouncing gradient circles&quot;
</span><span class="cx">         },
</span><del>-        { 
</del><ins>+        {
</ins><span class="cx">             url: &quot;bouncing-particles/bouncing-canvas-images.html?particleWidth=80&amp;particleHeight=80&amp;imageSrc=../resources/yin-yang.svg&quot;,
</span><span class="cx">             name: &quot;canvas bouncing SVG images&quot;
</span><span class="cx">         },
</span><span class="lines">@@ -246,12 +246,12 @@
</span><span class="cx">             name: &quot;Composited Transforms&quot;
</span><span class="cx">         },
</span><span class="cx">         {
</span><del>-            url: &quot;examples/canvas-electrons.html&quot;,
-            name: &quot;canvas electrons&quot;
</del><ins>+            url: &quot;misc/canvas-electrons.html&quot;,
+            name: &quot;Canvas electrons&quot;
</ins><span class="cx">         },
</span><span class="cx">         {
</span><del>-            url: &quot;examples/canvas-stars.html&quot;,
-            name: &quot;canvas stars&quot;
</del><ins>+            url: &quot;misc/canvas-stars.html&quot;,
+            name: &quot;Canvas stars&quot;
</ins><span class="cx">         },
</span><span class="cx">     ]
</span><span class="cx"> ));
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesextensionsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/extensions.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/extensions.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/extensions.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -76,34 +76,34 @@
</span><span class="cx">     {
</span><span class="cx">         return this.x;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     // Used when the point object is used as a size object.
</span><span class="cx">     get height()
</span><span class="cx">     {
</span><span class="cx">         return this.y;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     // Used when the point object is used as a size object.
</span><span class="cx">     get center()
</span><span class="cx">     {
</span><span class="cx">         return new Point(this.x / 2, this.y / 2);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     add: function(other)
</span><span class="cx">     {
</span><span class="cx">         return new Point(this.x + other.x, this.y + other.y);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     subtract: function(other)
</span><span class="cx">     {
</span><span class="cx">         return new Point(this.x - other.x, this.y - other.y);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     multiply: function(other)
</span><span class="cx">     {
</span><span class="cx">         return new Point(this.x * other.x, this.y * other.y);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     move: function(angle, velocity, timeDelta)
</span><span class="cx">     {
</span><span class="cx">         return this.add(Point.pointOnCircle(angle, velocity * (timeDelta / 1000)));
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">     {
</span><span class="cx">         return this.top + this.bottom;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     get size()
</span><span class="cx">     {
</span><span class="cx">         return new Point(this.width, this.height);
</span><span class="lines">@@ -156,10 +156,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (this._callback)
</span><span class="cx">         throw &quot;SimplePromise doesn't support multiple calls to then&quot;;
</span><del>-        
</del><ins>+
</ins><span class="cx">     this._callback = callback;
</span><span class="cx">     this._chainedPromise = new SimplePromise;
</span><del>-    
</del><ins>+
</ins><span class="cx">     if (this._resolved)
</span><span class="cx">         this.resolve(this._resolvedValue);
</span><span class="cx"> 
</span><span class="lines">@@ -201,13 +201,13 @@
</span><span class="cx">         const xlinkNamespace = &quot;http://www.w3.org/1999/xlink&quot;;
</span><span class="cx"> 
</span><span class="cx">         var element = document.createElementNS(svgNamespace, name);
</span><del>-        
</del><ins>+
</ins><span class="cx">         for (var key in attrs)
</span><span class="cx">             element.setAttribute(key, attrs[key]);
</span><del>-            
</del><ins>+
</ins><span class="cx">         for (var key in xlinkAttrs)
</span><span class="cx">             element.setAttributeNS(xlinkNamespace, key, xlinkAttrs[key]);
</span><del>-            
</del><ins>+
</ins><span class="cx">         parentElement.appendChild(element);
</span><span class="cx">         return element;
</span><span class="cx">     }
</span><span class="lines">@@ -215,26 +215,23 @@
</span><span class="cx"> 
</span><span class="cx"> function ProgressBar(element, ranges)
</span><span class="cx"> {
</span><del>-    this.element = element;
-    this.ranges = ranges;
-    this.currentRange = 0;
</del><ins>+    this._element = element;
+    this._ranges = ranges;
+    this._currentRange = 0;
+    this._updateElement();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ProgressBar.prototype =
</span><span class="cx"> {
</span><del>-    _progressToPercent: function(progress)
</del><ins>+    _updateElement: function()
</ins><span class="cx">     {
</span><del>-        return progress * (100 / this.ranges);
</del><ins>+        this._element.style.width = (this._currentRange * (100 / this._ranges)) + &quot;%&quot;;
</ins><span class="cx">     },
</span><del>-    
-    incRange: function()
</del><ins>+
+    incrementRange: function()
</ins><span class="cx">     {
</span><del>-        ++this.currentRange;
-    },
-    
-    setPos: function(progress)
-    {
-        this.element.style.width = this._progressToPercent(this.currentRange + progress) + &quot;%&quot;;
</del><ins>+        ++this._currentRange;
+        this._updateElement();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -248,25 +245,25 @@
</span><span class="cx"> {
</span><span class="cx">     push: function(suitesSamplers)
</span><span class="cx">     {
</span><del>-        this._iterationsSamplers.push(suitesSamplers);        
</del><ins>+        this._iterationsSamplers.push(suitesSamplers);
</ins><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     _processData: function(statistics, graph)
</span><span class="cx">     {
</span><span class="cx">         var iterationsResults = [];
</span><span class="cx">         var iterationsScores = [];
</span><del>-        
</del><ins>+
</ins><span class="cx">         this._iterationsSamplers.forEach(function(iterationSamplers, index) {
</span><span class="cx">             var suitesResults = {};
</span><span class="cx">             var suitesScores = [];
</span><del>-        
</del><ins>+
</ins><span class="cx">             for (var suiteName in iterationSamplers) {
</span><span class="cx">                 var suite = suiteFromName(suiteName);
</span><span class="cx">                 var suiteSamplerData = iterationSamplers[suiteName];
</span><span class="cx"> 
</span><span class="cx">                 var testsResults = {};
</span><span class="cx">                 var testsScores = [];
</span><del>-                
</del><ins>+
</ins><span class="cx">                 for (var testName in suiteSamplerData) {
</span><span class="cx">                     testsResults[testName] = suiteSamplerData[testName];
</span><span class="cx">                     testsScores.push(testsResults[testName][Strings.json.score]);
</span><span class="lines">@@ -277,7 +274,7 @@
</span><span class="cx">                 suitesResults[suiteName][Strings.json.results.tests] = testsResults;
</span><span class="cx">                 suitesScores.push(suitesResults[suiteName][Strings.json.score]);
</span><span class="cx">             }
</span><del>-            
</del><ins>+
</ins><span class="cx">             iterationsResults[index] = {};
</span><span class="cx">             iterationsResults[index][Strings.json.score] = Statistics.geometricMean(suitesScores);
</span><span class="cx">             iterationsResults[index][Strings.json.results.suites] = suitesResults;
</span><span class="lines">@@ -345,7 +342,7 @@
</span><span class="cx">         var data = testResults[Strings.json.samples];
</span><span class="cx">         if (!data)
</span><span class="cx">             return;
</span><del>-        
</del><ins>+
</ins><span class="cx">         var button = DocumentExtension.createElement(&quot;button&quot;, { class: &quot;small-button&quot; }, td);
</span><span class="cx"> 
</span><span class="cx">         button.addEventListener(&quot;click&quot;, function() {
</span><span class="lines">@@ -365,7 +362,7 @@
</span><span class="cx">                 complexity[Strings.json.measurements.concern].toFixed(2)].join(&quot;&quot;);
</span><span class="cx">             benchmarkController.showTestGraph(testName, score, mean, axes, samples, samplingTimeOffset);
</span><span class="cx">         });
</span><del>-            
</del><ins>+
</ins><span class="cx">         button.textContent = Strings.text.results.graph + &quot;...&quot;;
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -373,10 +370,10 @@
</span><span class="cx">     {
</span><span class="cx">         const percentThreshold = 10;
</span><span class="cx">         const averageThreshold = 2;
</span><del>-         
</del><ins>+
</ins><span class="cx">         if (measurement == Strings.json.measurements.percent)
</span><span class="cx">             return data[Strings.json.measurements.percent] &gt;= percentThreshold;
</span><del>-            
</del><ins>+
</ins><span class="cx">         if (jsonExperiment == Strings.json.experiments.frameRate &amp;&amp; measurement == Strings.json.measurements.average)
</span><span class="cx">             return Math.abs(data[Strings.json.measurements.average] - options[&quot;frame-rate&quot;]) &gt;= averageThreshold;
</span><span class="cx"> 
</span><span class="lines">@@ -445,7 +442,7 @@
</span><span class="cx">             this._addTest(testName, testResults, options);
</span><span class="cx">         }
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     _addIteration: function(iterationResult, options)
</span><span class="cx">     {
</span><span class="cx">         for (var suiteName in iterationResult[Strings.json.results.suites]) {
</span><span class="lines">@@ -458,7 +455,7 @@
</span><span class="cx">     {
</span><span class="cx">         this.clear();
</span><span class="cx">         this._addHeader();
</span><del>-        
</del><ins>+
</ins><span class="cx">         iterationsResults.forEach(function(iterationResult) {
</span><span class="cx">             this._addIteration(iterationResult, options);
</span><span class="cx">         }, this);
</span><span class="lines">@@ -506,5 +503,14 @@
</span><span class="cx">     mergeObjects: function(obj1, obj2)
</span><span class="cx">     {
</span><span class="cx">         return this.extendObject(this.copyObject(obj1), obj2);
</span><ins>+    },
+
+    createSubclass: function(superclass, classConstructor, extend)
+    {
+        classConstructor.prototype = Object.create(superclass.prototype);
+        classConstructor.prototype.constructor = classConstructor;
+        if (extend)
+            Utilities.extendObject(classConstructor.prototype, extend);
+        return classConstructor;
</ins><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesrunneranimometerjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/runner/animometer.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/runner/animometer.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/runner/animometer.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -5,7 +5,6 @@
</span><span class="cx"> 
</span><span class="cx">     initialize: function(suites, options)
</span><span class="cx">     {
</span><del>-        this.testsCount = this.iterationCount * suites.reduce(function (count, suite) { return count + suite.tests.length; }, 0);
</del><span class="cx">         this.options = options;
</span><span class="cx">     },
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesrunnertestsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/runner/tests.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/runner/tests.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/runner/tests.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -7,16 +7,6 @@
</span><span class="cx">     this.name = name;
</span><span class="cx">     this.tests = tests;
</span><span class="cx"> };
</span><del>-Suite.prototype.prepare = function(runner, contentWindow, contentDocument)
-{
-    return runner.waitForElement(&quot;#stage&quot;).then(function (element) {
-        return element;
-    });
-};
-Suite.prototype.run = function(contentWindow, test, options, progressBar)
-{
-    return contentWindow.runBenchmark(this, test, options, progressBar);
-};
</del><span class="cx"> 
</span><span class="cx"> var Suites = [];
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesstringsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/strings.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/strings.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/resources/strings.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -4,24 +4,18 @@
</span><span class="cx">         score: &quot;Score&quot;,
</span><span class="cx">         samples: &quot;Samples&quot;,
</span><span class="cx"> 
</span><del>-        runningState: {
-            warming: &quot;Warming&quot;,
-            sampling: &quot;Sampling&quot;,
-            finished: &quot;Finished&quot;
-        },
-
</del><span class="cx">         experiments: {
</span><span class="cx">             complexity: &quot;Complexity&quot;,
</span><span class="cx">             frameRate: &quot;FPS&quot;
</span><span class="cx">         },
</span><del>-        
</del><ins>+
</ins><span class="cx">         measurements: {
</span><span class="cx">             average: &quot;Avg.&quot;,
</span><span class="cx">             concern: &quot;W.5%&quot;,
</span><span class="cx">             stdev: &quot;Std.&quot;,
</span><span class="cx">             percent:  &quot;%&quot;
</span><span class="cx">         },
</span><del>-        
</del><ins>+
</ins><span class="cx">         results: {
</span><span class="cx">             results: &quot;Results&quot;,
</span><span class="cx">             graph: &quot;Graph&quot;,
</span><span class="lines">@@ -31,25 +25,25 @@
</span><span class="cx">     json: {
</span><span class="cx">         score: &quot;score&quot;,
</span><span class="cx">         samples: &quot;samples&quot;,
</span><del>-        
</del><ins>+
</ins><span class="cx">         experiments: {
</span><span class="cx">             complexity: &quot;complexity&quot;,
</span><span class="cx">             frameRate: &quot;frameRate&quot;
</span><span class="cx">         },
</span><del>-        
</del><ins>+
</ins><span class="cx">         measurements: {
</span><span class="cx">             average: &quot;average&quot;,
</span><span class="cx">             concern: &quot;concern&quot;,
</span><span class="cx">             stdev: &quot;stdev&quot;,
</span><span class="cx">             percent: &quot;percent&quot;
</span><span class="cx">         },
</span><del>-        
</del><ins>+
</ins><span class="cx">         results: {
</span><span class="cx">             iterations: &quot;iterationsResults&quot;,
</span><span class="cx">             suites: &quot;suitesResults&quot;,
</span><span class="cx">             tests: &quot;testsResults&quot;
</span><span class="cx">         },
</span><del>-        
</del><ins>+
</ins><span class="cx">         graph: {
</span><span class="cx">             points: &quot;points&quot;,
</span><span class="cx">             samplingTimeOffset: &quot;samplingTimeOffset&quot;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcanvasimageshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-images.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-images.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-images.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,27 +1,26 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</ins><span class="cx">     &lt;style&gt;
</span><span class="cx">         img.hidden {
</span><span class="cx">             position: absolute;
</span><span class="cx">             visibility: hidden;
</span><span class="cx">         }
</span><span class="cx">     &lt;/style&gt;
</span><del>-    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</del><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;img class=&quot;hidden&quot; src=&quot;../resources/yin-yang.svg&quot;&gt;
+    &lt;img class=&quot;hidden&quot; src=&quot;../resources/yin-yang.png&quot;&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-canvas-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-canvas-images.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;img class=&quot;hidden&quot; src=&quot;../resources/yin-yang.svg&quot;&gt;
-    &lt;img class=&quot;hidden&quot; src=&quot;../resources/yin-yang.png&quot;&gt;
-    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcanvasshapeshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,18 +2,17 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-canvas-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-canvas-shapes.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcssimageshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-images.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-images.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-images.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,23 +1,22 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</ins><span class="cx">     &lt;style&gt;
</span><span class="cx">         img {
</span><span class="cx">             position: absolute;
</span><span class="cx">         }
</span><span class="cx">     &lt;/style&gt;
</span><del>-    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</del><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-css-images.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingcssshapeshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-shapes.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-shapes.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-css-shapes.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</ins><span class="cx">     &lt;style&gt;
</span><span class="cx">         .circle {
</span><span class="cx">             position: absolute;
</span><span class="lines">@@ -13,22 +14,20 @@
</span><span class="cx">         }
</span><span class="cx">         .star {
</span><span class="cx">             -webkit-clip-path: polygon(50% 0%, 38% 38%, 0% 38%, 30% 60%, 18% 100%, 50% 75%, 82% 100%, 70% 60%, 100% 38%, 62% 38%);
</span><del>-            -ms-clip-path: polygon(50% 0%, 38% 38%, 0% 38%, 30% 60%, 18% 100%, 50% 75%, 82% 100%, 70% 60%, 100% 38%, 62% 38%);  
</del><ins>+            -ms-clip-path: polygon(50% 0%, 38% 38%, 0% 38%, 30% 60%, 18% 100%, 50% 75%, 82% 100%, 70% 60%, 100% 38%, 62% 38%);
</ins><span class="cx">             clip-path: polygon(50% 0%, 38% 38%, 0% 38%, 30% 60%, 18% 100%, 50% 75%, 82% 100%, 70% 60%, 100% 38%, 62% 38%);
</span><span class="cx">         }
</span><span class="cx">     &lt;/style&gt;
</span><del>-    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</del><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-css-shapes.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingsvgimageshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-images.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-images.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-images.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,18 +2,17 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;svg id=&quot;stage&quot;&gt;&lt;/svg&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-svg-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-svg-images.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;svg id=&quot;stage&quot;&gt;&lt;/svg&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesbouncingsvgshapeshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-shapes.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-shapes.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/bouncing-svg-shapes.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,18 +2,17 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;svg id=&quot;stage&quot;&gt;&lt;/svg&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-svg-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/bouncing-svg-shapes.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;svg id=&quot;stage&quot;&gt;&lt;/svg&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcanvasimagesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,51 +1,47 @@
</span><del>-function BouncingCanvasImage(stage)
-{
-    BouncingCanvasParticle.call(this, stage);
-    this._imageElement = stage.imageElement;
-    this._shape = &quot;image&quot;;
-}
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-BouncingCanvasImage.prototype = Object.create(BouncingCanvasParticle.prototype);
-BouncingCanvasImage.prototype.constructor = BouncingCanvasImage;
</del><ins>+BouncingCanvasImage = Utilities.createSubclass(BouncingCanvasParticle,
+    function(stage)
+    {
+        BouncingCanvasParticle.call(this, stage, &quot;image&quot;);
+        this._imageElement = stage.imageElement;
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingCanvasImage.prototype._draw = function()
-{
-    this._context.save();
-        this._applyRotation();
-        this._context.drawImage(this._imageElement, 0, 0, this._size.x, this._size.y);
-    this._context.restore();
-}
</del><ins>+    _draw: function()
+    {
+        this.context.save();
+            this.applyRotation();
+            this.context.drawImage(this._imageElement, 0, 0, this.size.x, this.size.y);
+        this.context.restore();
+    }
+});
</ins><span class="cx"> 
</span><del>-function BouncingCanvasImagesStage(element, options)
-{
-    BouncingCanvasParticlesStage.call(this, element, options);
</del><ins>+BouncingCanvasImagesStage = Utilities.createSubclass(BouncingCanvasParticlesStage,
+    function()
+    {
+        BouncingCanvasParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-    var imageSrc = options[&quot;imageSrc&quot;] || &quot;resources/yin-yang.svg&quot;;
-    this.imageElement = document.querySelector(&quot;.hidden[src=\&quot;&quot; + imageSrc + &quot;\&quot;]&quot;);
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingCanvasParticlesStage.prototype.initialize.call(this, benchmark);
+        var imageSrc = benchmark.options[&quot;imageSrc&quot;] || &quot;resources/yin-yang.svg&quot;;
+        this.imageElement = document.querySelector(&quot;.hidden[src=\&quot;&quot; + imageSrc + &quot;\&quot;]&quot;);
+    },
</ins><span class="cx"> 
</span><del>-BouncingCanvasImagesStage.prototype = Object.create(BouncingCanvasParticlesStage.prototype);
-BouncingCanvasImagesStage.prototype.constructor = BouncingCanvasImagesStage;
</del><ins>+    createParticle: function()
+    {
+        return new BouncingCanvasImage(this);
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingCanvasImagesStage.prototype.createParticle = function()
-{
-    return new BouncingCanvasImage(this);
-}
</del><ins>+BouncingCanvasImagesBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingCanvasImagesStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-function BouncingCanvasImagesBenchmark(suite, test, options, progressBar)
-{
-    BouncingCanvasParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+window.benchmarkClass = BouncingCanvasImagesBenchmark;
</ins><span class="cx"> 
</span><del>-BouncingCanvasImagesBenchmark.prototype = Object.create(BouncingCanvasParticlesBenchmark.prototype);
-BouncingCanvasImagesBenchmark.prototype.constructor = BouncingCanvasImagesBenchmark;
-
-BouncingCanvasImagesBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingCanvasImagesStage(element, this._options);
-}
-
-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new BouncingCanvasImagesBenchmark(suite, test, options, progressBar);
-}
</del><ins>+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcanvasparticlesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,11 +1,56 @@
</span><del>-function BouncingCanvasParticle(stage)
-{
-    BouncingParticle.call(this, stage);
-    this._context = stage.context;
-    this._shape = &quot;&quot;;
-    this._clip = stage.clip;
-}
</del><ins>+BouncingCanvasParticle = Utilities.createSubclass(BouncingParticle,
+    function(stage, shape)
+    {
+        BouncingParticle.call(this, stage);
+        this.context = stage.context;
+        this._shape = shape;
+        this._clip = stage.clip;
+    }, {
</ins><span class="cx"> 
</span><ins>+    applyRotation: function()
+    {
+        if (this._shape == &quot;circle&quot;)
+            return;
+
+        this.context.translate(this.size.x / 2, this.size.y / 2);
+        this.context.rotate(this.rotater.degree() * Math.PI / 180);
+        this.context.translate(-this.size.x / 2, -this.size.y / 2);
+    },
+
+    applyClipping: function()
+    {
+        var clipPoints = BouncingCanvasParticle.clips[this._clip];
+        if (!clipPoints)
+            return;
+
+        this.context.beginPath();
+        clipPoints.forEach(function(point, index) {
+            var point = this.size.multiply(point);
+            if (!index)
+                this.context.moveTo(point.x, point.y);
+            else
+                this.context.lineTo(point.x, point.y);
+        }, this);
+
+        this.context.closePath();
+        this.context.clip();
+    },
+
+    _draw: function()
+    {
+        throw &quot;Not implemented&quot;;
+    },
+
+    animate: function(timeDelta)
+    {
+        BouncingParticle.prototype.animate.call(this, timeDelta);
+        this.context.save();
+            this.context.translate(this.position.x, this.position.y);
+            this._draw();
+        this.context.restore();
+    }
+});
+
</ins><span class="cx"> BouncingCanvasParticle.clips = {
</span><span class="cx">     star: [
</span><span class="cx">         new Point(0.50, 0.00),
</span><span class="lines">@@ -18,88 +63,26 @@
</span><span class="cx">         new Point(0.70, 0.60),
</span><span class="cx">         new Point(1.00, 0.38),
</span><span class="cx">         new Point(0.62, 0.38)
</span><del>-    ],
</del><ins>+    ]
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-BouncingCanvasParticle.prototype = Object.create(BouncingParticle.prototype);
-BouncingCanvasParticle.prototype.constructor = BouncingCanvasParticle;
</del><ins>+BouncingCanvasParticlesStage = Utilities.createSubclass(BouncingParticlesStage,
+    function()
+    {
+        BouncingParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingCanvasParticle.prototype._applyRotation = function()
-{
-    if (this._shape == &quot;circle&quot;)
-        return;
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingParticlesStage.prototype.initialize.call(this, benchmark);
+        this.context = this.element.getContext(&quot;2d&quot;);
+    },
</ins><span class="cx"> 
</span><del>-    this._context.translate(this._size.x / 2, this._size.y / 2);
-    this._context.rotate(this._rotater.degree() * Math.PI / 180);
-    this._context.translate(-this._size.x / 2, -this._size.y / 2);
-}
-
-BouncingCanvasParticle.prototype._applyClipping = function()
-{
-    var clipPoints = BouncingCanvasParticle.clips[this._clip];
-    if (!clipPoints)
-        return;
-        
-    this._context.beginPath();
-    clipPoints.forEach(function(point, index) {
-        var point = this._size.multiply(point);
-        if (!index)
-            this._context.moveTo(point.x, point.y);
-        else
-            this._context.lineTo(point.x, point.y);
-    }, this);
-
-    this._context.closePath();
-    this._context.clip();
-}
-
-BouncingCanvasParticle.prototype._draw = function()
-{
-    throw &quot;Not implemented&quot;;
-}
-
-BouncingCanvasParticle.prototype.animate = function(timeDelta)
-{
-    BouncingParticle.prototype.animate.call(this, timeDelta);
-    this._context.save();
-        this._context.translate(this._position.x, this._position.y);
-        this._draw();
-    this._context.restore();
-}
-
-function BouncingCanvasParticlesStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-    this.context = this.element.getContext(&quot;2d&quot;);
-}
-
-BouncingCanvasParticlesStage.prototype = Object.create(BouncingParticlesStage.prototype);
-BouncingCanvasParticlesStage.prototype.constructor = BouncingCanvasParticlesStage;
-
-function BouncingCanvasParticlesAnimator(benchmark, options)
-{
-    BouncingParticlesAnimator.call(this, benchmark, options);
-    this._context = benchmark._stage.context;
-}
-
-BouncingCanvasParticlesAnimator.prototype = Object.create(BouncingParticlesAnimator.prototype);
-BouncingCanvasParticlesAnimator.prototype.constructor = BouncingCanvasParticlesAnimator;
-
-BouncingCanvasParticlesAnimator.prototype.animate = function()
-{
-    this._context.clearRect(0, 0, this._benchmark._stage.size.x, this._benchmark._stage.size.y);
-    return BouncingParticlesAnimator.prototype.animate.call(this);
-}
-
-function BouncingCanvasParticlesBenchmark(suite, test, options, progressBar)
-{
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
-
-BouncingCanvasParticlesBenchmark.prototype = Object.create(StageBenchmark.prototype);
-BouncingCanvasParticlesBenchmark.prototype.constructor = BouncingCanvasParticlesBenchmark;
-
-BouncingCanvasParticlesBenchmark.prototype.createAnimator = function()
-{
-    return new BouncingCanvasParticlesAnimator(this, this._options);
-}
</del><span class="cx">\ No newline at end of file
</span><ins>+    animate: function(timeDelta)
+    {
+        this.context.clearRect(0, 0, this.size.x, this.size.y);
+        this.particles.forEach(function(particle) {
+            particle.animate(timeDelta);
+        });
+    }
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcanvasshapesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,90 +1,87 @@
</span><del>-function BouncingCanvasShape(stage)
-{
-    BouncingCanvasParticle.call(this, stage);
-    this._fill = stage.fill;
-    this._shape = stage.shape;
-    this._color0 = stage.randomColor();
-    this._color1 = stage.randomColor();    
-}
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-BouncingCanvasShape.prototype = Object.create(BouncingCanvasParticle.prototype);
-BouncingCanvasShape.prototype.constructor = BouncingCanvasShape;
</del><ins>+BouncingCanvasShape = Utilities.createSubclass(BouncingCanvasParticle,
+    function(stage)
+    {
+        BouncingCanvasParticle.call(this, stage, stage.shape);
+        this._fill = stage.fill;
+        this._color0 = stage.randomColor();
+        this._color1 = stage.randomColor();
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingCanvasShape.prototype._applyFill = function()
-{
-    switch (this._fill) {
-    case &quot;gradient&quot;:
-        var gradient = this._context.createLinearGradient(0, 0, this._size.width, 0);
-        gradient.addColorStop(0, this._color0);
-        gradient.addColorStop(1, this._color1); 
-        this._context.fillStyle = gradient;
-        break;
-    
-    case &quot;solid&quot;:
-    default:
-        this._context.fillStyle = this._color0;
-        break;
-    }
-}
</del><ins>+    _applyFill: function()
+    {
+        switch (this._fill) {
+        case &quot;gradient&quot;:
+            var gradient = this.context.createLinearGradient(0, 0, this.size.width, 0);
+            gradient.addColorStop(0, this._color0);
+            gradient.addColorStop(1, this._color1);
+            this.context.fillStyle = gradient;
+            break;
</ins><span class="cx"> 
</span><del>-BouncingCanvasShape.prototype._drawShape = function()
-{
-    this._context.beginPath();
</del><ins>+        case &quot;solid&quot;:
+        default:
+            this.context.fillStyle = this._color0;
+            break;
+        }
+    },
</ins><span class="cx"> 
</span><del>-    switch (this._shape) {
-    case &quot;rect&quot;:
-        this._context.rect(0, 0, this._size.width, this._size.height);
-        break;
-    
-    case &quot;circle&quot;:
-    default:
-        var center = this._size.center;
-        var radius = Math.min(this._size.x, this._size.y) / 2;
-        this._context.arc(center.x, center.y, radius, 0, Math.PI * 2, true);
-        break;
-    }
</del><ins>+    _drawShape: function()
+    {
+        this.context.beginPath();
</ins><span class="cx"> 
</span><del>-    this._context.fill();
-}
</del><ins>+        switch (this._shape) {
+        case &quot;rect&quot;:
+            this.context.rect(0, 0, this.size.width, this.size.height);
+            break;
</ins><span class="cx"> 
</span><del>-BouncingCanvasShape.prototype._draw = function()
-{
-    this._context.save();
-        this._applyFill();
-        this._applyRotation();
-        this._applyClipping();
-        this._drawShape();
-    this._context.restore();
-}
</del><ins>+        case &quot;circle&quot;:
+        default:
+            var center = this.size.center;
+            var radius = Math.min(this.size.x, this.size.y) / 2;
+            this.context.arc(center.x, center.y, radius, 0, Math.PI * 2, true);
+            break;
+        }
</ins><span class="cx"> 
</span><del>-function BouncingCanvasShapesStage(element, options)
-{
-    BouncingCanvasParticlesStage.call(this, element, options);
-    this.parseShapeParamters(options);
-}
</del><ins>+        this.context.fill();
+    },
</ins><span class="cx"> 
</span><del>-BouncingCanvasShapesStage.prototype = Object.create(BouncingCanvasParticlesStage.prototype);
-BouncingCanvasShapesStage.prototype.constructor = BouncingCanvasShapesStage;
</del><ins>+    _draw: function()
+    {
+        this.context.save();
+            this._applyFill();
+            this.applyRotation();
+            this.applyClipping();
+            this._drawShape();
+        this.context.restore();
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingCanvasShapesStage.prototype.createParticle = function()
-{
-    return new BouncingCanvasShape(this);
-}
</del><ins>+BouncingCanvasShapesStage = Utilities.createSubclass(BouncingCanvasParticlesStage,
+    function ()
+    {
+        BouncingCanvasParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-function BouncingCanvasShapesBenchmark(suite, test, options, progressBar)
-{
-    BouncingCanvasParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingCanvasParticlesStage.prototype.initialize.call(this, benchmark);
+        this.parseShapeParameters(benchmark.options);
+    },
</ins><span class="cx"> 
</span><del>-BouncingCanvasShapesBenchmark.prototype = Object.create(BouncingCanvasParticlesBenchmark.prototype);
-BouncingCanvasShapesBenchmark.prototype.constructor = BouncingCanvasShapesBenchmark;
</del><ins>+    createParticle: function()
+    {
+        return new BouncingCanvasShape(this);
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingCanvasShapesBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingCanvasShapesStage(element, this._options);
-}
</del><ins>+BouncingCanvasShapesBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingCanvasShapesStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new BouncingCanvasShapesBenchmark(suite, test, options, progressBar);
-}
</del><ins>+window.benchmarkClass = BouncingCanvasShapesBenchmark;
+
+})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcssimagesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-images.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-images.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-images.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,63 +1,61 @@
</span><del>-function BouncingCssImage(stage)
-{
-    BouncingParticle.call(this, stage);
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-    this.element = document.createElement(&quot;img&quot;);
-    this.element.style.width = this._size.x + &quot;px&quot;;
-    this.element.style.height = this._size.y + &quot;px&quot;;
-    this.element.setAttribute(&quot;src&quot;, stage.imageSrc);
-    
-    stage.element.appendChild(this.element);
-    this._move();
-}
</del><ins>+BouncingCssImage = Utilities.createSubclass(BouncingParticle,
+    function(stage)
+    {
+        BouncingParticle.call(this, stage);
</ins><span class="cx"> 
</span><del>-BouncingCssImage.prototype = Object.create(BouncingParticle.prototype);
-BouncingCssImage.prototype.constructor = BouncingCssImage;
</del><ins>+        this.element = document.createElement(&quot;img&quot;);
+        this.element.style.width = this.size.x + &quot;px&quot;;
+        this.element.style.height = this.size.y + &quot;px&quot;;
+        this.element.setAttribute(&quot;src&quot;, stage.imageSrc);
</ins><span class="cx"> 
</span><del>-BouncingCssImage.prototype._move = function()
-{
-    this.element.style.transform = &quot;translate(&quot; + this._position.x + &quot;px,&quot; + this._position.y + &quot;px) &quot; + this._rotater.rotateZ();
-}
-    
-BouncingCssImage.prototype.animate = function(timeDelta)
-{
-    BouncingParticle.prototype.animate.call(this, timeDelta);
-    this._move();
-}
</del><ins>+        stage.element.appendChild(this.element);
+        this._move();
+    }, {
</ins><span class="cx"> 
</span><del>-function BouncingCssImagesStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-    this.imageSrc = options[&quot;imageSrc&quot;] || &quot;../resources/yin-yang.svg&quot;;
-}
</del><ins>+    _move: function()
+    {
+        this.element.style.transform = &quot;translate(&quot; + this.position.x + &quot;px,&quot; + this.position.y + &quot;px) &quot; + this.rotater.rotateZ();
+    },
</ins><span class="cx"> 
</span><del>-BouncingCssImagesStage.prototype = Object.create(BouncingParticlesStage.prototype);
-BouncingCssImagesStage.prototype.constructor = BouncingCssImagesStage;
</del><ins>+    animate: function(timeDelta)
+    {
+        BouncingParticle.prototype.animate.call(this, timeDelta);
+        this._move();
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingCssImagesStage.prototype.createParticle = function()
-{
-    return new BouncingCssImage(this);
-}
</del><ins>+BouncingCssImagesStage = Utilities.createSubclass(BouncingParticlesStage,
+    function()
+    {
+        BouncingParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingCssImagesStage.prototype.particleWillBeRemoved = function(particle)
-{
-    particle.element.remove();
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingParticlesStage.prototype.initialize.call(this, benchmark);
+        this.imageSrc = benchmark.options[&quot;imageSrc&quot;] || &quot;../resources/yin-yang.svg&quot;;
+    },
</ins><span class="cx"> 
</span><del>-function BouncingCssImagesBenchmark(suite, test, options, progressBar)
-{
-    BouncingParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    createParticle: function()
+    {
+        return new BouncingCssImage(this);
+    },
</ins><span class="cx"> 
</span><del>-BouncingCssImagesBenchmark.prototype = Object.create(BouncingParticlesBenchmark.prototype);
-BouncingCssImagesBenchmark.prototype.constructor = BouncingCssImagesBenchmark;
</del><ins>+    particleWillBeRemoved: function(particle)
+    {
+        particle.element.remove();
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingCssImagesBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingCssImagesStage(element, this._options);
-}
</del><ins>+BouncingCssImagesBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingCssImagesStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new BouncingCssImagesBenchmark(suite, test, options, progressBar);
-}
</del><ins>+window.benchmarkClass = BouncingCssImagesBenchmark;
+
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingcssshapesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,81 +1,79 @@
</span><del>-function BouncingCssShape(stage)
-{
-    BouncingParticle.call(this, stage);
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-    this.element = this._createSpan(stage);
-        
-    switch (stage.fill) {
-    case &quot;solid&quot;:
-    default:
-        this.element.style.backgroundColor = stage.randomColor();
-        break;
-        
-    case &quot;gradient&quot;:
-        this.element.style.background = &quot;linear-gradient(&quot; + stage.randomColor() + &quot;, &quot; + stage.randomColor() + &quot;)&quot;;
-        break;
-    }
</del><ins>+BouncingCssShape = Utilities.createSubclass(BouncingParticle,
+    function(stage)
+    {
+        BouncingParticle.call(this, stage);
</ins><span class="cx"> 
</span><del>-    this._move();
-}
</del><ins>+        this.element = this._createSpan(stage);
</ins><span class="cx"> 
</span><del>-BouncingCssShape.prototype = Object.create(BouncingParticle.prototype);
-BouncingCssShape.prototype.constructor = BouncingCssShape;
</del><ins>+        switch (stage.fill) {
+        case &quot;solid&quot;:
+        default:
+            this.element.style.backgroundColor = stage.randomColor();
+            break;
</ins><span class="cx"> 
</span><del>-BouncingCssShape.prototype._createSpan = function(stage)
-{
-    var span = document.createElement(&quot;span&quot;);
-    span.className = stage.shape + &quot; &quot; + stage.clip;
-    span.style.width = this._size.x + &quot;px&quot;;
-    span.style.height = this._size.y + &quot;px&quot;;
-    stage.element.appendChild(span);
-    return span;
-}
</del><ins>+        case &quot;gradient&quot;:
+            this.element.style.background = &quot;linear-gradient(&quot; + stage.randomColor() + &quot;, &quot; + stage.randomColor() + &quot;)&quot;;
+            break;
+        }
</ins><span class="cx"> 
</span><del>-BouncingCssShape.prototype._move = function()
-{
-    this.element.style.transform = &quot;translate(&quot; + this._position.x + &quot;px,&quot; + this._position.y + &quot;px)&quot; + this._rotater.rotateZ();
-}
-    
-BouncingCssShape.prototype.animate = function(timeDelta)
-{
-    BouncingParticle.prototype.animate.call(this, timeDelta);
-    this._rotater.next(timeDelta);
-    this._move();
-}
</del><ins>+        this._move();
+    }, {
</ins><span class="cx"> 
</span><del>-function BouncingCssShapesStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-    this.parseShapeParamters(options);
-}
</del><ins>+    _createSpan: function(stage)
+    {
+        var span = document.createElement(&quot;span&quot;);
+        span.className = stage.shape + &quot; &quot; + stage.clip;
+        span.style.width = this.size.x + &quot;px&quot;;
+        span.style.height = this.size.y + &quot;px&quot;;
+        stage.element.appendChild(span);
+        return span;
+    },
</ins><span class="cx"> 
</span><del>-BouncingCssShapesStage.prototype = Object.create(BouncingParticlesStage.prototype);
-BouncingCssShapesStage.prototype.constructor = BouncingCssShapesStage;
</del><ins>+    _move: function()
+    {
+        this.element.style.transform = &quot;translate(&quot; + this.position.x + &quot;px,&quot; + this.position.y + &quot;px)&quot; + this.rotater.rotateZ();
+    },
</ins><span class="cx"> 
</span><del>-BouncingCssShapesStage.prototype.createParticle = function()
-{
-    return new BouncingCssShape(this);
-}
</del><ins>+    animate: function(timeDelta)
+    {
+        BouncingParticle.prototype.animate.call(this, timeDelta);
+        this.rotater.next(timeDelta);
+        this._move();
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingCssShapesStage.prototype.particleWillBeRemoved = function(particle)
-{
-    particle.element.remove();
-}
</del><ins>+BouncingCssShapesStage = Utilities.createSubclass(BouncingParticlesStage,
+    function()
+    {
+        BouncingParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-function BouncingCssShapesBenchmark(suite, test, options, progressBar)
-{
-    BouncingParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingParticlesStage.prototype.initialize.call(this, benchmark);
+        this.parseShapeParameters(benchmark.options);
+    },
</ins><span class="cx"> 
</span><del>-BouncingCssShapesBenchmark.prototype = Object.create(BouncingParticlesBenchmark.prototype);
-BouncingCssShapesBenchmark.prototype.constructor = BouncingCssShapesBenchmark;
</del><ins>+    createParticle: function()
+    {
+        return new BouncingCssShape(this);
+    },
</ins><span class="cx"> 
</span><del>-BouncingCssShapesBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingCssShapesStage(element, this._options);
-}
</del><ins>+    particleWillBeRemoved: function(particle)
+    {
+        particle.element.remove();
+    }
+});
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new BouncingCssShapesBenchmark(suite, test, options, progressBar);
-}
</del><ins>+BouncingCssShapesBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingCssShapesStage(), options);
+    }
+);
+
+window.benchmarkClass = BouncingCssShapesBenchmark;
+
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingparticlesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,28 +1,28 @@
</span><span class="cx"> function BouncingParticle(stage)
</span><span class="cx"> {
</span><span class="cx">     this._stageSize = stage.size;
</span><del>-    this._size = stage.particleSize;
-    
-    this._position = stage.randomPosition(stage.size.subtract(stage.particleSize));
</del><ins>+    this.size = stage.particleSize;
+
+    this.position = stage.randomPosition(stage.size.subtract(stage.particleSize));
</ins><span class="cx">     this._angle = stage.randomAngle();
</span><span class="cx">     this._velocity = stage.randomVelocity(stage.maxVelocity);
</span><del>-    this._rotater = stage.randomRotater();
</del><ins>+    this.rotater = stage.randomRotater();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> BouncingParticle.prototype =
</span><span class="cx"> {
</span><span class="cx">     get center()
</span><span class="cx">     {
</span><del>-        return this._position.add(this._size.center);
</del><ins>+        return this.position.add(this.size.center);
</ins><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     animate: function(timeDelta)
</span><span class="cx">     {
</span><del>-        this._position = this._position.move(this._angle, this._velocity, timeDelta);
-        this._rotater.next(timeDelta);
</del><ins>+        this.position = this.position.move(this._angle, this._velocity, timeDelta);
+        this.rotater.next(timeDelta);
</ins><span class="cx"> 
</span><span class="cx">         // If particle is going to move off right side
</span><del>-        if (this._position.x + this._size.x &gt; this._stageSize.x) {
</del><ins>+        if (this.position.x + this.size.x &gt; this._stageSize.x) {
</ins><span class="cx">             // If direction is East-South, go West-South.
</span><span class="cx">             if (this._angle &gt;= 0 &amp;&amp; this._angle &lt; Math.PI / 2)
</span><span class="cx">                 this._angle = Math.PI - this._angle;
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx">             else if (this._angle &gt; Math.PI / 2 * 3)
</span><span class="cx">                 this._angle = this._angle - (this._angle - Math.PI / 2 * 3) * 2;
</span><span class="cx">             // Make sure the particle does not go outside the stage boundaries.
</span><del>-            this._position.x = this._stageSize.x - this._size.x;
</del><ins>+            this.position.x = this._stageSize.x - this.size.x;
</ins><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         // If particle is going to move off left side
</span><del>-        if (this._position.x &lt; 0) {
</del><ins>+        if (this.position.x &lt; 0) {
</ins><span class="cx">             // If angle is West-South, go East-South.
</span><span class="cx">             if (this._angle &gt; Math.PI / 2 &amp;&amp; this._angle &lt; Math.PI)
</span><span class="cx">                 this._angle = Math.PI - this._angle;
</span><span class="lines">@@ -42,97 +42,76 @@
</span><span class="cx">             else if (this._angle &gt; Math.PI &amp;&amp; this._angle &lt; Math.PI / 2 * 3)
</span><span class="cx">                 this._angle = this._angle + (Math.PI / 2 * 3 - this._angle) * 2;
</span><span class="cx">             // Make sure the particle does not go outside the stage boundaries.
</span><del>-            this._position.x = 0;
</del><ins>+            this.position.x = 0;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // If particle is going to move off bottom side
</span><del>-        if (this._position.y + this._size.y &gt; this._stageSize.y) {
</del><ins>+        if (this.position.y + this.size.y &gt; this._stageSize.y) {
</ins><span class="cx">             // If direction is South, go North.
</span><span class="cx">             if (this._angle &gt; 0 &amp;&amp; this._angle &lt; Math.PI)
</span><span class="cx">                 this._angle = Math.PI * 2 - this._angle;
</span><span class="cx">             // Make sure the particle does not go outside the stage boundaries.
</span><del>-            this._position.y = this._stageSize.y - this._size.y;
</del><ins>+            this.position.y = this._stageSize.y - this.size.y;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // If particle is going to move off top side
</span><del>-        if (this._position.y &lt; 0) {
</del><ins>+        if (this.position.y &lt; 0) {
</ins><span class="cx">             // If direction is North, go South.
</span><span class="cx">             if (this._angle &gt; Math.PI &amp;&amp; this._angle &lt; Math.PI * 2)
</span><span class="cx">                 this._angle = this._angle - (this._angle - Math.PI) * 2;
</span><span class="cx">             // Make sure the particle does not go outside the stage boundaries.
</span><del>-            this._position.y = 0;
</del><ins>+            this.position.y = 0;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function BouncingParticlesAnimator(benchmark, options)
-{
-    StageAnimator.call(this, benchmark, options);
-};
</del><ins>+BouncingParticlesStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+        this.particles = [];
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingParticlesAnimator.prototype = Object.create(StageAnimator.prototype);
-BouncingParticlesAnimator.prototype.constructor = BouncingParticlesAnimator;
</del><ins>+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
+        this.particleSize = new Point(parseInt(benchmark.options[&quot;particleWidth&quot;]) || 10, parseInt(benchmark.options[&quot;particleHeight&quot;]) || 10);
+        this.maxVelocity = Math.max(parseInt(benchmark.options[&quot;maxVelocity&quot;]) || 500, 100);
+    },
</ins><span class="cx"> 
</span><del>-function BouncingParticlesStage(element, options)
-{
-    Stage.call(this, element, options);
-    
-    this.particleSize = new Point(parseInt(options[&quot;particleWidth&quot;]) || 10, parseInt(options[&quot;particleHeight&quot;]) || 10);
-    this._particles = [];
</del><ins>+    parseShapeParameters: function(options)
+    {
+        this.shape = options[&quot;shape&quot;] || &quot;circle&quot;;
+        this.fill = options[&quot;fill&quot;] || &quot;solid&quot;;
+        this.clip = options[&quot;clip&quot;] || &quot;&quot;;
+    },
</ins><span class="cx"> 
</span><del>-    this.maxVelocity = parseInt(options[&quot;maxVelocity&quot;]) || 500;
-    this.maxVelocity = Math.max(this.maxVelocity, 100);
-}
</del><ins>+    animate: function(timeDelta)
+    {
+        this.particles.forEach(function(particle) {
+            particle.animate(timeDelta);
+        });
+    },
</ins><span class="cx"> 
</span><del>-BouncingParticlesStage.prototype = Object.create(Stage.prototype);
-BouncingParticlesStage.prototype.constructor = BouncingParticlesStage;
</del><ins>+    tune: function(count)
+    {
+        if (count == 0)
+            return this.particles.length;
</ins><span class="cx"> 
</span><del>-BouncingParticlesStage.prototype.parseShapeParamters = function(options)
-{
-    this.shape = options[&quot;shape&quot;] || &quot;circle&quot;;
-    this.fill = options[&quot;fill&quot;] || &quot;solid&quot;;
-    this.clip = options[&quot;clip&quot;] || &quot;&quot;;
-}
</del><ins>+        if (count &gt; 0) {
+            for (var i = 0; i &lt; count; ++i)
+                this.particles.push(this.createParticle());
+            return this.particles.length;
+        }
</ins><span class="cx"> 
</span><del>-BouncingParticlesStage.prototype.animate = function(timeDelta)
-{
-    this._particles.forEach(function(particle) {
-        particle.animate(timeDelta);
-    });
-}
-    
-BouncingParticlesStage.prototype.tune = function(count)
-{
-    if (count == 0)
-        return this._particles.length;
</del><ins>+        count = Math.min(-count, this.particles.length);
</ins><span class="cx"> 
</span><del>-    if (count &gt; 0) {
-        console.assert(typeof(this.createParticle) == &quot;function&quot;);
-        for (var i = 0; i &lt; count; ++i)
-            this._particles.push(this.createParticle());
-        return this._particles.length;
-    }
</del><ins>+        if (typeof(this.particleWillBeRemoved) == &quot;function&quot;) {
+            for (var i = 0; i &lt; count; ++i)
+                this.particleWillBeRemoved(this.particles[this.particles.length - 1 - i]);
+        }
</ins><span class="cx"> 
</span><del>-    count = Math.min(-count, this._particles.length);
-        
-    if (typeof(this.particleWillBeRemoved) == &quot;function&quot;) {
-        for (var i = 0; i &lt; count; ++i)
-            this.particleWillBeRemoved(this._particles[this._particles.length - 1 - i]);
</del><ins>+        this.particles.splice(-count, count);
+        return this.particles.length;
</ins><span class="cx">     }
</span><del>-
-    this._particles.splice(-count, count);
-    return this._particles.length;
-}
-
-function BouncingParticlesBenchmark(suite, test, options, progressBar)
-{
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
-
-BouncingParticlesBenchmark.prototype = Object.create(StageBenchmark.prototype);
-BouncingParticlesBenchmark.prototype.constructor = BouncingParticlesBenchmark;
-
-BouncingParticlesBenchmark.prototype.createAnimator = function()
-{
-    return new BouncingParticlesAnimator(this, this._options);
-}
</del><span class="cx">\ No newline at end of file
</span><ins>+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingsvgimagesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,45 +1,43 @@
</span><del>-function BouncingSvgImage(stage)
-{
-    BouncingSvgParticle.call(this, stage);
-    this._shape = &quot;image&quot;;
-    
-    var attrs = { x: 0, y: 0, width: this._size.x, height: this._size.y };
-    var xlinkAttrs = { href: stage.imageSrc };
-    this.element = DocumentExtension.createSvgElement(&quot;image&quot;, attrs, xlinkAttrs, stage.element);
-    this._move();
-}
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-BouncingSvgImage.prototype = Object.create(BouncingSvgParticle.prototype);
-BouncingSvgImage.prototype.constructor = BouncingSvgImage;
</del><ins>+BouncingSvgImage = Utilities.createSubclass(BouncingSvgParticle,
+    function(stage)
+    {
+        BouncingSvgParticle.call(this, stage, &quot;image&quot;);
</ins><span class="cx"> 
</span><del>-function BouncingSvgImagesStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-    this.imageSrc = options[&quot;imageSrc&quot;] || &quot;resources/yin-yang.svg&quot;;
-}
</del><ins>+        var attrs = { x: 0, y: 0, width: this.size.x, height: this.size.y };
+        var xlinkAttrs = { href: stage.imageSrc };
+        this.element = DocumentExtension.createSvgElement(&quot;image&quot;, attrs, xlinkAttrs, stage.element);
+        this._move();
+    }
+);
</ins><span class="cx"> 
</span><del>-BouncingSvgImagesStage.prototype = Object.create(BouncingSvgParticlesStage.prototype);
-BouncingSvgImagesStage.prototype.constructor = BouncingSvgImagesStage;
</del><ins>+BouncingSvgImagesStage = Utilities.createSubclass(BouncingSvgParticlesStage,
+    function()
+    {
+        BouncingSvgParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingSvgImagesStage.prototype.createParticle = function()
-{
-    return new BouncingSvgImage(this);
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingSvgParticlesStage.prototype.initialize.call(this, benchmark);
+        this.imageSrc = benchmark.options[&quot;imageSrc&quot;] || &quot;resources/yin-yang.svg&quot;;
+    },
</ins><span class="cx"> 
</span><del>-function BouncingSvgImagesBenchmark(suite, test, options, progressBar)
-{
-    BouncingParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    createParticle: function()
+    {
+        return new BouncingSvgImage(this);
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingSvgImagesBenchmark.prototype = Object.create(BouncingParticlesBenchmark.prototype);
-BouncingSvgImagesBenchmark.prototype.constructor = BouncingSvgImagesBenchmark;
</del><ins>+BouncingSvgImagesBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingSvgImagesStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-BouncingSvgImagesBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingSvgImagesStage(element, this._options);
-}
</del><ins>+window.benchmarkClass = BouncingSvgImagesBenchmark;
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new BouncingSvgImagesBenchmark(suite, test, options, progressBar);
-}
</del><ins>+})();
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingsvgparticlesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,68 +1,67 @@
</span><del>-function BouncingSvgParticle(stage)
-{
-    BouncingParticle.call(this, stage);
-}
</del><ins>+BouncingSvgParticle = Utilities.createSubclass(BouncingParticle,
+    function(stage, shape)
+    {
+        BouncingParticle.call(this, stage);
+        this._shape = shape;
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingSvgParticle.prototype = Object.create(BouncingParticle.prototype);
-BouncingSvgParticle.prototype.constructor = BouncingParticle;
</del><ins>+    _applyClipping: function(stage)
+    {
+        if (stage.clip != &quot;star&quot;)
+            return;
</ins><span class="cx"> 
</span><del>-BouncingSvgParticle.prototype._applyClipping = function(stage)
-{
-    if (stage.clip != &quot;star&quot;)
-        return;
-        
-    stage.ensureClipStarIsCreated();
-    this.element.setAttribute(&quot;clip-path&quot;, &quot;url(#star-clip)&quot;);
-}
</del><ins>+        stage.ensureClipStarIsCreated();
+        this.element.setAttribute(&quot;clip-path&quot;, &quot;url(#star-clip)&quot;);
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgParticle.prototype._move = function()
-{
-    var transform = &quot;translate(&quot; + this._position.x + &quot;, &quot; + this._position.y + &quot;)&quot;;
-    if (this._shape != &quot;circle&quot;)
-        transform += this._rotater.rotate(this._size.center);
-    this.element.setAttribute(&quot;transform&quot;, transform);
-}
</del><ins>+    _move: function()
+    {
+        var transform = &quot;translate(&quot; + this.position.x + &quot;, &quot; + this.position.y + &quot;)&quot;;
+        if (this._shape != &quot;circle&quot;)
+            transform += this.rotater.rotate(this.size.center);
+        this.element.setAttribute(&quot;transform&quot;, transform);
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgParticle.prototype.animate = function(timeDelta)
-{
-    BouncingParticle.prototype.animate.call(this, timeDelta);
-    this._move();
-}
</del><ins>+    animate: function(timeDelta)
+    {
+        BouncingParticle.prototype.animate.call(this, timeDelta);
+        this._move();
+    }
+});
</ins><span class="cx"> 
</span><del>-function BouncingSvgParticlesStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-}
</del><ins>+BouncingSvgParticlesStage = Utilities.createSubclass(BouncingParticlesStage,
+    function()
+    {
+        BouncingParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingSvgParticlesStage.prototype = Object.create(BouncingParticlesStage.prototype);
-BouncingSvgParticlesStage.prototype.constructor = BouncingSvgParticlesStage;
</del><ins>+    _createDefs: function()
+    {
+        return DocumentExtension.createSvgElement(&quot;defs&quot;, {}, {}, this.element);
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgParticlesStage.prototype._createDefs = function()
-{
-    return DocumentExtension.createSvgElement(&quot;defs&quot;, {}, {}, this.element);
-}
-                                                               
-BouncingSvgParticlesStage.prototype._ensureDefsIsCreated = function()
-{
-    return this.element.querySelector(&quot;defs&quot;) || this._createDefs();
-}
</del><ins>+    _ensureDefsIsCreated: function()
+    {
+        return this.element.querySelector(&quot;defs&quot;) || this._createDefs();
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgParticlesStage.prototype._createClipStar = function()
-{
-    var attrs = { id: &quot;star-clip&quot;, clipPathUnits: &quot;objectBoundingBox&quot; };
-    var clipPath  = DocumentExtension.createSvgElement(&quot;clipPath&quot;, attrs, {}, this._ensureDefsIsCreated());
</del><ins>+    _createClipStar: function()
+    {
+        var attrs = { id: &quot;star-clip&quot;, clipPathUnits: &quot;objectBoundingBox&quot; };
+        var clipPath  = DocumentExtension.createSvgElement(&quot;clipPath&quot;, attrs, {}, this._ensureDefsIsCreated());
</ins><span class="cx"> 
</span><del>-    attrs = { d: &quot;M.50,0L.38,.38L0,.38L.30,.60L.18,1L.50,.75L.82,1L.70,.60L1,.38L.62,.38z&quot; };
-    DocumentExtension.createSvgElement(&quot;path&quot;, attrs, {}, clipPath);
-    return clipPath;
-}
</del><ins>+        attrs = { d: &quot;M.50,0L.38,.38L0,.38L.30,.60L.18,1L.50,.75L.82,1L.70,.60L1,.38L.62,.38z&quot; };
+        DocumentExtension.createSvgElement(&quot;path&quot;, attrs, {}, clipPath);
+        return clipPath;
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgParticlesStage.prototype.ensureClipStarIsCreated = function()
-{
-    return this.element.querySelector(&quot;#star-clip&quot;) || this._createClipStar();
-}
</del><ins>+    ensureClipStarIsCreated: function()
+    {
+        return this.element.querySelector(&quot;#star-clip&quot;) || this._createClipStar();
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgParticlesStage.prototype.particleWillBeRemoved = function(particle)
-{
-    particle.element.remove();
-}
</del><ins>+    particleWillBeRemoved: function(particle)
+    {
+        particle.element.remove();
+    }
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsbouncingparticlesresourcesbouncingsvgshapesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,104 +1,101 @@
</span><del>-function BouncingSvgShape(stage)
-{
-    BouncingSvgParticle.call(this, stage);
-    this._shape = stage.shape;
-    this._fill = stage.fill;
-    
-    this._createShape(stage);
-    this._applyClipping(stage);
-    this._applyFill(stage);
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-    this._move();    
-}
</del><ins>+BouncingSvgShape = Utilities.createSubclass(BouncingSvgParticle,
+    function(stage)
+    {
+        BouncingSvgParticle.call(this, stage, stage.shape);
+        this._fill = stage.fill;
</ins><span class="cx"> 
</span><del>-BouncingSvgShape.prototype = Object.create(BouncingSvgParticle.prototype);
-BouncingSvgShape.prototype.constructor = BouncingSvgShape;
</del><ins>+        this._createShape(stage);
+        this._applyClipping(stage);
+        this._applyFill(stage);
</ins><span class="cx"> 
</span><del>-BouncingSvgShape.prototype._createShape = function(stage)
-{
-    switch (this._shape) {
-    case &quot;rect&quot;:
-        var attrs = { x: 0, y: 0, width: this._size.x, height: this._size.y };
-        this.element = DocumentExtension.createSvgElement(&quot;rect&quot;, attrs, {}, stage.element);
-        break;
-    
-    case &quot;circle&quot;:
-    default:
-        var attrs = { cx: this._size.x / 2, cy: this._size.y / 2, r: Math.min(this._size.x, this._size.y) / 2 };
-        this.element = DocumentExtension.createSvgElement(&quot;circle&quot;, attrs, {}, stage.element);
-        break;        
-    }
-}
</del><ins>+        this._move();
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingSvgShape.prototype._applyFill = function(stage)
-{
-    switch (this._fill) {
-    case &quot;gradient&quot;:
-        var gradient = stage.createGradient(2);
-        this.element.setAttribute(&quot;fill&quot;, &quot;url(#&quot; + gradient.getAttribute(&quot;id&quot;) + &quot;)&quot;);
-        break;
-    
-    case &quot;solid&quot;:
-    default:
-        this.element.setAttribute(&quot;fill&quot;, stage.randomColor());
-        break;
-    }
-}
</del><ins>+    _createShape: function(stage)
+    {
+        switch (this._shape) {
+        case &quot;rect&quot;:
+            var attrs = { x: 0, y: 0, width: this.size.x, height: this.size.y };
+            this.element = DocumentExtension.createSvgElement(&quot;rect&quot;, attrs, {}, stage.element);
+            break;
</ins><span class="cx"> 
</span><del>-function BouncingSvgShapesStage(element, options)
-{
-    BouncingSvgParticlesStage.call(this, element, options);
-    this.parseShapeParamters(options);
-    this._gradientsCount = 0;
-}
</del><ins>+        case &quot;circle&quot;:
+        default:
+            var attrs = { cx: this.size.x / 2, cy: this.size.y / 2, r: Math.min(this.size.x, this.size.y) / 2 };
+            this.element = DocumentExtension.createSvgElement(&quot;circle&quot;, attrs, {}, stage.element);
+            break;
+        }
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgShapesStage.prototype = Object.create(BouncingSvgParticlesStage.prototype);
-BouncingSvgShapesStage.prototype.constructor = BouncingSvgShapesStage;
-                                                               
-BouncingSvgShapesStage.prototype.createGradient = function(stops)
-{
-    var attrs = { id: &quot;gadient-&quot; + ++this._gradientsCount };
-    var gradient = DocumentExtension.createSvgElement(&quot;linearGradient&quot;, attrs, {}, this._ensureDefsIsCreated());    
-    
-    for (var i = 0; i &lt; stops; ++i) {
-        attrs = { offset: i * 100 / stops + &quot;%&quot;, 'stop-color': this.randomColor() };
-        DocumentExtension.createSvgElement(&quot;stop&quot;, attrs, {}, gradient);
</del><ins>+    _applyFill: function(stage)
+    {
+        switch (this._fill) {
+        case &quot;gradient&quot;:
+            var gradient = stage.createGradient(2);
+            this.element.setAttribute(&quot;fill&quot;, &quot;url(#&quot; + gradient.getAttribute(&quot;id&quot;) + &quot;)&quot;);
+            break;
+
+        case &quot;solid&quot;:
+        default:
+            this.element.setAttribute(&quot;fill&quot;, stage.randomColor());
+            break;
+        }
</ins><span class="cx">     }
</span><ins>+});
</ins><span class="cx"> 
</span><del>-    return gradient;
-}
</del><ins>+BouncingSvgShapesStage = Utilities.createSubclass(BouncingSvgParticlesStage,
+    function()
+    {
+        BouncingSvgParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingSvgShapesStage.prototype.createParticle = function()
-{
-    return new BouncingSvgShape(this);
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingSvgParticlesStage.prototype.initialize.call(this, benchmark);
+        this.parseShapeParameters(benchmark.options);
+        this._gradientsCount = 0;
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgShapesStage.prototype.particleWillBeRemoved = function(particle)
-{
-    BouncingSvgParticlesStage.prototype.particleWillBeRemoved.call(this, particle);
</del><ins>+    createGradient: function(stops)
+    {
+        var attrs = { id: &quot;gradient-&quot; + ++this._gradientsCount };
+        var gradient = DocumentExtension.createSvgElement(&quot;linearGradient&quot;, attrs, {}, this._ensureDefsIsCreated());
</ins><span class="cx"> 
</span><del>-    var fill = particle.element.getAttribute(&quot;fill&quot;);
-    if (fill.indexOf(&quot;url(#&quot;) != 0)
-        return;
-        
-    var gradient = this.element.querySelector(fill.substring(4, fill.length - 1));
-    this._ensureDefsIsCreated().removeChild(gradient);
-}
</del><ins>+        for (var i = 0; i &lt; stops; ++i) {
+            attrs = { offset: i * 100 / stops + &quot;%&quot;, 'stop-color': this.randomColor() };
+            DocumentExtension.createSvgElement(&quot;stop&quot;, attrs, {}, gradient);
+        }
</ins><span class="cx"> 
</span><del>-function BouncingSvgShapesBenchmark(suite, test, options, progressBar)
-{
-    BouncingParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+        return gradient;
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgShapesBenchmark.prototype = Object.create(BouncingParticlesBenchmark.prototype);
-BouncingSvgShapesBenchmark.prototype.constructor = BouncingSvgShapesBenchmark;
</del><ins>+    createParticle: function()
+    {
+        return new BouncingSvgShape(this);
+    },
</ins><span class="cx"> 
</span><del>-BouncingSvgShapesBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingSvgShapesStage(element, this._options);
-}
</del><ins>+    particleWillBeRemoved: function(particle)
+    {
+        BouncingSvgParticlesStage.prototype.particleWillBeRemoved.call(this, particle);
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new BouncingSvgShapesBenchmark(suite, test, options, progressBar);
-}
</del><ins>+        var fill = particle.element.getAttribute(&quot;fill&quot;);
+        if (fill.indexOf(&quot;url(#&quot;) != 0)
+            return;
+
+        var gradient = this.element.querySelector(fill.substring(4, fill.length - 1));
+        this._ensureDefsIsCreated().removeChild(gradient);
+    }
+});
+
+BouncingSvgShapesBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingSvgShapesStage(), options);
+    }
+);
+
+window.benchmarkClass = BouncingSvgShapesBenchmark;
+
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmastercanvasstagehtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/master/canvas-stage.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/master/canvas-stage.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/master/canvas-stage.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,17 +2,16 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;
</del><span class="cx">     &lt;script src=&quot;resources/canvas-stage.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/canvas-tests.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmasterresourcescanvasstagejs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/master/resources/canvas-stage.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/master/resources/canvas-stage.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/master/resources/canvas-stage.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,61 +1,44 @@
</span><del>-function SimpleCanvasStage(element, options, canvasObject)
-{
-    Stage.call(this, element, options);
-    this.options = options;
-    this.context = this.element.getContext(&quot;2d&quot;);
-    this.canvasObject = canvasObject;
-    this._objects = [];
-}
-SimpleCanvasStage.prototype = Object.create(Stage.prototype);
-SimpleCanvasStage.prototype.constructor = SimpleCanvasStage;
-SimpleCanvasStage.prototype.tune = function(count)
-{
-    if (count == 0)
-        return this._objects.length;
</del><ins>+SimpleCanvasStage = Utilities.createSubclass(Stage,
+    function(canvasObject)
+    {
+        Stage.call(this);
+        this._canvasObject = canvasObject;
+        this.objects = [];
+    }, {
</ins><span class="cx"> 
</span><del>-    if (count &gt; 0) {
-        // For path-based tests, use the object length as a maximum coordinate value
-        // to make it easier to see what the test is doing
-        var coordinateMaximum = Math.max(this._objects.length, 200);
-        for (var i = 0; i &lt; count; ++i) {
-            this._objects.push(new this.canvasObject(this, coordinateMaximum));
-        }
-        return this._objects.length;
-    }
</del><ins>+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
+        this.context = this.element.getContext(&quot;2d&quot;);
+    },
</ins><span class="cx"> 
</span><del>-    count = Math.min(-count, this._objects.length);
-    this._objects.splice(0, count);
-    return this._objects.length;
-}
-SimpleCanvasStage.prototype.animate = function()
-{
-    var context = this.context;
-    this._objects.forEach(function(object) {
-        object.draw(context);
-    });
-}
</del><ins>+    tune: function(count)
+    {
+        if (count == 0)
+            return this.objects.length;
</ins><span class="cx"> 
</span><del>-function SimpleCanvasAnimator(benchmark, options)
-{
-    StageAnimator.call(this, benchmark, options);
-    this._context = benchmark._stage.context;
-}
</del><ins>+        if (count &gt; 0) {
+            for (var i = 0; i &lt; count; ++i)
+                this.objects.push(new this._canvasObject(this));
+            return this.objects.length;
+        }
</ins><span class="cx"> 
</span><del>-SimpleCanvasAnimator.prototype = Object.create(StageAnimator.prototype);
-SimpleCanvasAnimator.prototype.constructor = SimpleCanvasAnimator;
-SimpleCanvasAnimator.prototype.animate = function()
-{
-    this._context.clearRect(0, 0, this._benchmark._stage.size.x, this._benchmark._stage.size.y);
-    return StageAnimator.prototype.animate.call(this, this._options);
-}
</del><ins>+        count = Math.min(-count, this.objects.length);
+        this.objects.splice(0, count);
+        return this.objects.length;
+    },
</ins><span class="cx"> 
</span><ins>+    animate: function()
+    {
+        var context = this.context;
+        context.clearRect(0, 0, this.size.x, this.size.y);
+        this.objects.forEach(function(object) {
+            object.draw(context);
+        });
+    },
</ins><span class="cx"> 
</span><del>-function SimpleCanvasBenchmark(suite, test, options, progressBar) {
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
-SimpleCanvasBenchmark.prototype = Object.create(StageBenchmark.prototype);
-SimpleCanvasBenchmark.prototype.constructor = SimpleCanvasBenchmark;
-SimpleCanvasBenchmark.prototype.createAnimator = function() {
-    return new SimpleCanvasAnimator(this, this._options);
-}
-
</del><ins>+    complexity: function()
+    {
+        return this.objects.length;
+    }
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmasterresourcescanvastestsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/master/resources/canvas-tests.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/master/resources/canvas-tests.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/master/resources/canvas-tests.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx">     context.strokeStyle = this._color;
</span><span class="cx">     context.lineWidth = this._lineWidth;
</span><span class="cx"> 
</span><del>-    this._length+=Math.sin(Date.now()/100*this._omega);
</del><ins>+    this._length += Math.sin(Date.now()/100*this._omega);
</ins><span class="cx"> 
</span><span class="cx">     context.beginPath();
</span><span class="cx">     context.moveTo(this._startX, this._startY);
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx">     this._point = new Point(distanceX * (randX + (randY % 2) / 2), distanceY * (randY + .5));
</span><span class="cx"> 
</span><del>-    this._radius = 20 + Math.pow(Math.random(), 5) * (Math.min(distanceX, distanceY) / 1.6);
</del><ins>+    this._radius = 20 + Math.pow(Math.random(), 5) * (Math.min(distanceX, distanceY) / 1.8);
</ins><span class="cx">     this._startAngle = stage.randomAngle();
</span><span class="cx">     this._endAngle = stage.randomAngle();
</span><span class="cx">     this._omega = (Math.random() - 0.5) * 0.3;
</span><span class="lines">@@ -74,6 +74,8 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+// CanvasLinePoint contains no draw() method since it is either moveTo or
+// lineTo depending on its index.
</ins><span class="cx"> function CanvasLinePoint(stage, coordinateMaximum)
</span><span class="cx"> {
</span><span class="cx">     var X_LOOPS = 40;
</span><span class="lines">@@ -83,8 +85,8 @@
</span><span class="cx">     var offset = offsets[Math.floor(Math.random() * offsets.length)];
</span><span class="cx"> 
</span><span class="cx">     this.coordinate = new Point(X_LOOPS/2, Y_LOOPS/2);
</span><del>-    if (stage._objects.length) {
-        var head = stage._objects[stage._objects.length - 1].coordinate;
</del><ins>+    if (stage.objects.length) {
+        var head = stage.objects[stage.objects.length - 1].coordinate;
</ins><span class="cx">         this.coordinate.x = head.x;
</span><span class="cx">         this.coordinate.y = head.y;
</span><span class="cx">     }
</span><span class="lines">@@ -103,119 +105,116 @@
</span><span class="cx">     var xOff = .25 * (this.coordinate.y % 2);
</span><span class="cx">     var randX = (xOff + this.coordinate.x) * stage.size.x / X_LOOPS;
</span><span class="cx">     var randY = this.coordinate.y * stage.size.y / Y_LOOPS;
</span><del>-    var colors = [&quot;#101010&quot;, &quot;#808080&quot;, &quot;#c0c0c0&quot;, &quot;#e01040&quot;];
-    this._color = colors[Math.floor(Math.random() * colors.length)];
</del><ins>+    var colors = [&quot;#101010&quot;, &quot;#808080&quot;, &quot;#c0c0c0&quot;, &quot;#101010&quot;, &quot;#808080&quot;, &quot;#c0c0c0&quot;, &quot;#e01040&quot;];
+    this.color = colors[Math.floor(Math.random() * colors.length)];
</ins><span class="cx"> 
</span><del>-    this._width = Math.pow(Math.random(), 5) * 20 + 1;
-    this._isSplit = Math.random() &gt; 0.9;
-    this._point = new Point(randX, randY);
-
</del><ins>+    this.width = Math.pow(Math.random(), 5) * 20 + 1;
+    this.isSplit = Math.random() &gt; 0.9;
+    this.point = new Point(randX, randY);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-CanvasLinePoint.prototype.draw = function(context, stage)
-{
-    context.lineTo(this._point.x, this._point.y);
-};
-
-
</del><span class="cx"> // === STAGES ===
</span><span class="cx"> 
</span><del>-function SimpleCanvasPathStrokeStage(element, options, canvasObject)
-{
-    SimpleCanvasStage.call(this, element, options, canvasObject);
-    this.context.lineCap = options[&quot;lineCap&quot;] || &quot;butt&quot;;
-    this.context.lineJoin = options[&quot;lineJoin&quot;] || &quot;bevel&quot;;
-}
-SimpleCanvasPathStrokeStage.prototype = Object.create(SimpleCanvasStage.prototype);
-SimpleCanvasPathStrokeStage.prototype.constructor = SimpleCanvasPathStrokeStage;
-SimpleCanvasPathStrokeStage.prototype.animate = function() {
-    var context = this.context;
-    var stage = this;
</del><ins>+CanvasLineSegmentStage = Utilities.createSubclass(SimpleCanvasStage,
+    function()
+    {
+        SimpleCanvasStage.call(this, CanvasLineSegment);
+    }, {
</ins><span class="cx"> 
</span><del>-    context.beginPath();
-    this._objects.forEach(function(object, index) {
-        if (index == 0) {
-            context.lineWidth = object._width;
-            context.strokeStyle = object._color;
-            context.moveTo(object._point.x, object._point.y);
-        } else {
-            if (object._isSplit) {
-                context.stroke();
</del><ins>+    initialize: function(benchmark)
+    {
+        SimpleCanvasStage.prototype.initialize.call(this, benchmark);
+        this.context.lineCap = benchmark.options[&quot;lineCap&quot;] || &quot;butt&quot;;
+        this.circleRadius = this.size.x / 3 / 2 - 20;
+    },
</ins><span class="cx"> 
</span><del>-                context.lineWidth = object._width;
-                context.strokeStyle = object._color;
-                context.beginPath();
-            }
</del><ins>+    animate: function()
+    {
+        var context = this.context;
+        var stage = this;
</ins><span class="cx"> 
</span><del>-            if (Math.random() &gt; 0.999)
-                object._isSplit = !object._isSplit;
</del><ins>+        context.clearRect(0, 0, this.size.x, this.size.y);
+        context.lineWidth = 30;
+        for(var i = 0; i &lt; 3; i++) {
+            context.strokeStyle = [&quot;#e01040&quot;, &quot;#10c030&quot;, &quot;#e05010&quot;][i];
+            context.fillStyle = [&quot;#70051d&quot;, &quot;#016112&quot;, &quot;#702701&quot;][i];
+            context.beginPath();
+                context.arc((0.5 + i) / 3 * stage.size.x, stage.size.y/2, stage.circleRadius, 0, Math.PI*2);
+            context.stroke();
+            context.fill();
+        }
</ins><span class="cx"> 
</span><ins>+        this.objects.forEach(function(object) {
</ins><span class="cx">             object.draw(context);
</span><del>-        }
-    });
-    context.stroke();
-}
</del><ins>+        });
+    }
+});
</ins><span class="cx"> 
</span><del>-function CanvasLineSegmentStage(element, options)
-{
-    SimpleCanvasStage.call(this, element, options, CanvasLineSegment);
-    this.context.lineCap = options[&quot;lineCap&quot;] || &quot;butt&quot;;
-    this.circleRadius = this.size.x / 3 / 2 - 20;
-}
-CanvasLineSegmentStage.prototype = Object.create(SimpleCanvasStage.prototype);
-CanvasLineSegmentStage.prototype.constructor = CanvasLineSegmentStage;
-CanvasLineSegmentStage.prototype.animate = function()
-{
-    var context = this.context;
-    var stage = this;
</del><ins>+CanvasLinePathStage = Utilities.createSubclass(SimpleCanvasStage,
+    function()
+    {
+        SimpleCanvasStage.call(this, CanvasLinePoint);
+    }, {
</ins><span class="cx"> 
</span><del>-    context.lineWidth = 30;
-    for(var i = 0; i &lt; 3; i++) {
-        context.strokeStyle = [&quot;#e01040&quot;, &quot;#10c030&quot;, &quot;#e05010&quot;][i];
-        context.fillStyle = [&quot;#70051d&quot;, &quot;#016112&quot;, &quot;#702701&quot;][i];
</del><ins>+    initialize: function(benchmark)
+    {
+        SimpleCanvasStage.prototype.initialize.call(this, benchmark);
+        this.context.lineJoin = benchmark.options[&quot;lineJoin&quot;] || &quot;bevel&quot;;
+        this.context.lineCap = benchmark.options[&quot;lineCap&quot;] || &quot;butt&quot;;
+    },
+
+    animate: function() {
+        var context = this.context;
+        var stage = this;
+
+        context.clearRect(0, 0, this.size.x, this.size.y);
</ins><span class="cx">         context.beginPath();
</span><del>-            context.arc((0.5 + i) / 3 * stage.size.x, stage.size.y/2, stage.circleRadius, 0, Math.PI*2);
-        context.stroke();
-        context.fill();
-    }
</del><ins>+        this.objects.forEach(function(object, index) {
+            if (index == 0) {
+                context.lineWidth = object.width;
+                context.strokeStyle = object.color;
+                context.moveTo(object.point.x, object.point.y);
+            } else {
+                if (object.isSplit) {
+                    context.stroke();
</ins><span class="cx"> 
</span><del>-    this._objects.forEach(function(object) {
-        object.draw(context);
-    });
-}
</del><ins>+                    context.lineWidth = object.width;
+                    context.strokeStyle = object.color;
+                    context.beginPath();
+                }
</ins><span class="cx"> 
</span><del>-function CanvasLinePathStage(element, options)
-{
-    SimpleCanvasPathStrokeStage.call(this, element, options, CanvasLinePoint);
-    this.context.lineJoin = options[&quot;lineJoin&quot;] || &quot;bevel&quot;;
-    this.context.lineCap = options[&quot;lineCap&quot;] || &quot;butt&quot;;
-}
-CanvasLinePathStage.prototype = Object.create(SimpleCanvasPathStrokeStage.prototype);
-CanvasLinePathStage.prototype.constructor = CanvasLinePathStage;
</del><ins>+                context.lineTo(object.point.x, object.point.y);
</ins><span class="cx"> 
</span><ins>+                if (Math.random() &gt; 0.999)
+                    object.isSplit = !object.isSplit;
+            }
+        });
+        context.stroke();
+    }
+});
+
</ins><span class="cx"> // === BENCHMARK ===
</span><span class="cx"> 
</span><del>-function CanvasPathBenchmark(suite, test, options, progressBar)
-{
-    SimpleCanvasBenchmark.call(this, suite, test, options, progressBar);
-}
-CanvasPathBenchmark.prototype = Object.create(SimpleCanvasBenchmark.prototype);
-CanvasPathBenchmark.prototype.constructor = CanvasPathBenchmark;
-CanvasPathBenchmark.prototype.createStage = function(element)
-{
-    switch (this._options[&quot;pathType&quot;]) {
-    case &quot;line&quot;:
-        return new CanvasLineSegmentStage(element, this._options);
-    case &quot;arcs&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasArc);
-    case &quot;linePath&quot;:
-        return new CanvasLinePathStage(element, this._options);
</del><ins>+CanvasPathBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        var stage;
+        switch (options[&quot;pathType&quot;]) {
+        case &quot;line&quot;:
+            stage = new CanvasLineSegmentStage();
+            break;
+        case &quot;linePath&quot;:
+            stage = new CanvasLinePathStage();
+            break;
+        case &quot;arcs&quot;:
+            stage = new SimpleCanvasStage(CanvasArc);
+            break;
+        }
+
+        Benchmark.call(this, stage, options);
</ins><span class="cx">     }
</span><del>-}
</del><ins>+);
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new CanvasPathBenchmark(suite, test, options, progressBar);
-}
</del><ins>+window.benchmarkClass = CanvasPathBenchmark;
</ins><span class="cx"> 
</span><span class="cx"> })();
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmisccanvaselectronshtmlfromrev194519trunkPerformanceTestsAnimometertestsexamplescanvaselectronshtml"></a>
<div class="copfile"><h4>Copied: trunk/PerformanceTests/Animometer/tests/misc/canvas-electrons.html (from rev 194519, trunk/PerformanceTests/Animometer/tests/examples/canvas-electrons.html) (0 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/misc/canvas-electrons.html                                (rev 0)
+++ trunk/PerformanceTests/Animometer/tests/misc/canvas-electrons.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
+    &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;resources/canvas-electrons.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmisccanvasstarshtmlfromrev194519trunkPerformanceTestsAnimometertestsexamplescanvasstarshtml"></a>
<div class="copfile"><h4>Copied: trunk/PerformanceTests/Animometer/tests/misc/canvas-stars.html (from rev 194519, trunk/PerformanceTests/Animometer/tests/examples/canvas-stars.html) (0 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/misc/canvas-stars.html                                (rev 0)
+++ trunk/PerformanceTests/Animometer/tests/misc/canvas-stars.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
+    &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;resources/canvas-stars.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmisccompositingtransformshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/misc/compositing-transforms.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/misc/compositing-transforms.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/misc/compositing-transforms.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</ins><span class="cx">     &lt;style&gt;
</span><span class="cx">         img {
</span><span class="cx">             position: absolute;
</span><span class="lines">@@ -8,18 +9,16 @@
</span><span class="cx">             height: 80px;
</span><span class="cx">         }
</span><span class="cx">     &lt;/style&gt;
</span><del>-    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</del><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;../bouncing-particles/resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/compositing-transforms.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmiscresourcescanvaselectronsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-electrons.js (0 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-electrons.js                                (rev 0)
+++ trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-electrons.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+(function() {
+
+function CanvasElectron(stage)
+{
+    this._context = stage.context;
+    this._stageSize = stage.size;
+
+    var minSide = Math.min(this._stageSize.width, this._stageSize.height);
+    var radiusX = stage.random(minSide / 8, 7 * minSide / 16);
+    var radiusY = stage.random(minSide / 8, 3 * radiusX / 4);
+    this._orbitRadiuses = new Point(radiusX, radiusY);
+    this._radius = stage.random(5, 15);
+    this._direction = stage.randomInt(0, 2);
+    this._angle = stage.randomInt(0, 360);
+    this._color = stage.randomColor();
+    this._rotater = stage.randomRotater();
+    this._rotater.next(stage.random(0, this._rotater.interval));
+}
+
+CanvasElectron.prototype = {
+    _draw: function()
+    {
+        // Calculate the position of the object on the ellipse.
+        var angle = this._direction ? this._rotater.degree() : 360 - this._rotater.degree();
+        var position = this._stageSize.center.subtract(Point.pointOnEllipse(angle, this._orbitRadiuses));
+
+        this._context.save();
+            this._context.translate(this._stageSize.center.x, this._stageSize.center.y);
+            this._context.rotate(this._angle * Math.PI / 180);
+            this._context.translate(-this._stageSize.center.x, -this._stageSize.center.y);
+
+            // Set the stroke and the fill colors
+            this._context.strokeStyle = &quot;rgba(192, 192, 192, 0.9)&quot;;
+            this._context.fillStyle = this._color;
+
+            // Draw the orbit of the object.
+            this._context.beginPath();
+            this._context.ellipse(this._stageSize.center.x, this._stageSize.center.y, this._orbitRadiuses.x, this._orbitRadiuses.y, 0, 0, 2 * Math.PI);
+            this._context.stroke();
+
+            // Draw the object.
+            this._context.beginPath();
+            this._context.arc(position.x, position.y, this._radius, 0, Math.PI * 2, true);
+            this._context.fill();
+        this._context.restore();
+    },
+
+    animate: function(timeDelta)
+    {
+        this._rotater.next(timeDelta / 100);
+        this._draw();
+    }
+};
+
+CanvasElectronsStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+        this._electrons = [];
+    }, {
+
+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
+        this.context = this.element.getContext(&quot;2d&quot;);
+    },
+
+    tune: function(count)
+    {
+        if (count == 0)
+            return this._electrons.length;
+
+        if (count &gt; 0) {
+            for (var i = 0; i &lt; count; ++i)
+                this._electrons.push(new CanvasElectron(this));
+            return this._electrons.length;
+        }
+
+        count = Math.min(-count, this._electrons.length);
+        this._electrons.splice(-count, count);
+
+        return this._electrons.length;
+    },
+
+    animate: function(timeDelta)
+    {
+        this.context.clearRect(0, 0, this.size.x, this.size.y);
+
+        // Draw a big star in the middle.
+        this.context.fillStyle = &quot;orange&quot;;
+        this.context.beginPath();
+        this.context.arc(this.size.center.x, this.size.center.y, 50, 0, Math.PI * 2, true);
+        this.context.fill();
+
+        this._electrons.forEach(function(electron) {
+            electron.animate(timeDelta);
+        });
+    }
+});
+
+CanvasElectronsBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new CanvasElectronsStage(), options);
+    }
+);
+
+window.benchmarkClass = CanvasElectronsBenchmark;
+
+})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmiscresourcescanvasstarsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-stars.js (0 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-stars.js                                (rev 0)
+++ trunk/PerformanceTests/Animometer/tests/misc/resources/canvas-stars.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -0,0 +1,106 @@
</span><ins>+(function() {
+
+function CanvasStar(stage)
+{
+    this._context = stage.context;
+
+    this._size = stage.randomSquareSize(5, 20);
+    this._center = stage.randomPosition(stage.size.subtract(this._size)).add(this._size.center);
+    this._rotateX = 0;
+    this._rotateDeltaX = stage.random(0.3, 0.7);
+}
+
+CanvasStar.prototype = {
+    _draw: function()
+    {
+        this._context.save();
+        this._context.translate(this._center.x, this._center.y);
+
+        this._context.fillStyle = 'yellow';
+        this._context.strokeStyle = 'white';
+
+        this._context.lineWidth = 1;
+
+        this._context.beginPath();
+        this._context.moveTo(                                     0, -this._size.y /  2);
+        this._context.lineTo(+this._size.x / 20 - this._rotateX / 5, -this._size.y / 10);
+        this._context.lineTo(+this._size.x / 4  - this._rotateX,                      0);
+        this._context.lineTo(+this._size.x / 20 - this._rotateX / 5, +this._size.y / 10);
+        this._context.lineTo(                                     0, +this._size.y /  2);
+        this._context.lineTo(-this._size.x / 20 + this._rotateX / 5, +this._size.y / 10);
+        this._context.lineTo(-this._size.x /  4 + this._rotateX,                      0);
+        this._context.lineTo(-this._size.x / 20 + this._rotateX / 5, -this._size.y / 10);
+        this._context.lineTo(                                     0, -this._size.y /  2);
+
+        this._context.fill();
+        this._context.stroke();
+        this._context.closePath();
+        this._context.restore();
+    },
+
+    animate: function(timeDelta)
+    {
+        this._rotateX += this._rotateDeltaX;
+
+        if (this._rotateX &gt; this._size.x / 4 || this._rotateX &lt; -this._size.x / 4) {
+            this._rotateDeltaX = -this._rotateDeltaX;
+            this._rotateX += this._rotateDeltaX;
+        }
+
+        this._draw();
+    }
+};
+
+CanvasStarsStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+        this._objects = [];
+    }, {
+
+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
+        this.context = this.element.getContext(&quot;2d&quot;);
+    },
+
+    tune: function(count)
+    {
+        if (count == 0)
+            return this._objects.length;
+
+        if (count &gt; 0) {
+            for (var i = 0; i &lt; count; ++i)
+                this._objects.push(new CanvasStar(this));
+            return this._objects.length;
+        }
+
+        count = Math.min(-count, this._objects.length);
+        this._objects.splice(-count, count);
+
+        return this._objects.length;
+    },
+
+    animate: function(timeDelta)
+    {
+        this.context.beginPath();
+        this.context.fillStyle = 'black';
+        this.context.rect(0, 0, this.size.width, this.size.height);
+        this.context.fill();
+
+        this._objects.forEach(function(object) {
+            object.animate(timeDelta);
+        });
+    }
+});
+
+CanvasStarsBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new CanvasStarsStage(), options);
+    }
+);
+
+window.benchmarkClass = CanvasStarsBenchmark;
+
+})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsmiscresourcescompositingtransformsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,67 +1,66 @@
</span><del>-function BouncingCompositedImage(stage)
-{
-    BouncingParticle.call(this, stage);
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-    this.element = document.createElement(&quot;img&quot;);
-    this.element.style.width = this._size.x + &quot;px&quot;;
-    this.element.style.height = this._size.y + &quot;px&quot;;
-    this.element.setAttribute(&quot;src&quot;, stage.imageSrc);
-    
-    if (stage.useFilters)
-        this.element.style.filter = &quot;hue-rotate(&quot; + stage.randomAngle() + &quot;rad)&quot;;
-    
-    stage.element.appendChild(this.element);
-    this._move();
-}
</del><ins>+BouncingCompositedImage = Utilities.createSubclass(BouncingParticle,
+    function(stage)
+    {
+        BouncingParticle.call(this, stage);
</ins><span class="cx"> 
</span><del>-BouncingCompositedImage.prototype = Object.create(BouncingParticle.prototype);
-BouncingCompositedImage.prototype.constructor = BouncingCompositedImage;
</del><ins>+        this.element = document.createElement(&quot;img&quot;);
+        this.element.style.width = this.size.x + &quot;px&quot;;
+        this.element.style.height = this.size.y + &quot;px&quot;;
+        this.element.setAttribute(&quot;src&quot;, stage.imageSrc);
</ins><span class="cx"> 
</span><del>-BouncingCompositedImage.prototype._move = function()
-{
-    this.element.style.transform = &quot;translate3d(&quot; + this._position.x + &quot;px,&quot; + this._position.y + &quot;px, 0) &quot; + this._rotater.rotateZ();
-}
-    
-BouncingCompositedImage.prototype.animate = function(timeDelta)
-{
-    BouncingParticle.prototype.animate.call(this, timeDelta);
-    this._move();
-}
</del><ins>+        if (stage.useFilters)
+            this.element.style.filter = &quot;hue-rotate(&quot; + stage.randomAngle() + &quot;rad)&quot;;
</ins><span class="cx"> 
</span><del>-function CompositingTransformsStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-    this.imageSrc = options[&quot;imageSrc&quot;] || &quot;../resources/yin-yang.svg&quot;;
-    this.useFilters = options[&quot;filters&quot;] == &quot;yes&quot;;
-}
</del><ins>+        stage.element.appendChild(this.element);
+        this._move();
+    }, {
</ins><span class="cx"> 
</span><del>-CompositingTransformsStage.prototype = Object.create(BouncingParticlesStage.prototype);
-CompositingTransformsStage.prototype.constructor = CompositingTransformsStage;
</del><ins>+    _move: function()
+    {
+        this.element.style.transform = &quot;translate3d(&quot; + this.position.x + &quot;px,&quot; + this.position.y + &quot;px, 0) &quot; + this.rotater.rotateZ();
+    },
</ins><span class="cx"> 
</span><del>-CompositingTransformsStage.prototype.createParticle = function()
-{
-    return new BouncingCompositedImage(this);
-}
</del><ins>+    animate: function(timeDelta)
+    {
+        BouncingParticle.prototype.animate.call(this, timeDelta);
+        this._move();
+    }
+});
</ins><span class="cx"> 
</span><del>-CompositingTransformsStage.prototype.particleWillBeRemoved = function(particle)
-{
-    particle.element.remove();
-}
</del><ins>+CompositingTransformsStage = Utilities.createSubclass(BouncingParticlesStage,
+    function()
+    {
+        BouncingParticlesStage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-function CompositedTransformsBenchmark(suite, test, options, progressBar)
-{
-    BouncingParticlesBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        BouncingParticlesStage.prototype.initialize.call(this, benchmark);
</ins><span class="cx"> 
</span><del>-CompositedTransformsBenchmark.prototype = Object.create(BouncingParticlesBenchmark.prototype);
-CompositedTransformsBenchmark.prototype.constructor = CompositedTransformsBenchmark;
</del><ins>+        this.imageSrc = benchmark.options[&quot;imageSrc&quot;] || &quot;../resources/yin-yang.svg&quot;;
+        this.useFilters = benchmark.options[&quot;filters&quot;] == &quot;yes&quot;;
+    },
</ins><span class="cx"> 
</span><del>-CompositedTransformsBenchmark.prototype.createStage = function(element)
-{
-    return new CompositingTransformsStage(element, this._options);
-}
</del><ins>+    createParticle: function()
+    {
+        return new BouncingCompositedImage(this);
+    },
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new CompositedTransformsBenchmark(suite, test, options, progressBar);
-}
</del><ins>+    particleWillBeRemoved: function(particle)
+    {
+        particle.element.remove();
+    }
+});
+
+CompositedTransformsBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new CompositingTransformsStage(), options);
+    }
+);
+
+window.benchmarkClass = CompositedTransformsBenchmark;
+
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsresourcesmainjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/resources/main.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/resources/main.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/resources/main.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+function Rotater(rotateInterval)
+{
+    this._timeDelta = 0;
+    this._rotateInterval = rotateInterval;
+}
+
+Rotater.prototype =
+{
+    get interval()
+    {
+        return this._rotateInterval;
+    },
+
+    next: function(timeDelta)
+    {
+        this._timeDelta = (this._timeDelta + timeDelta) % this._rotateInterval;
+    },
+
+    degree: function()
+    {
+        return (360 * this._timeDelta) / this._rotateInterval;
+    },
+
+    rotateZ: function()
+    {
+        return &quot;rotateZ(&quot; + Math.floor(this.degree()) + &quot;deg)&quot;;
+    },
+
+    rotate: function(center)
+    {
+        return &quot;rotate(&quot; + Math.floor(this.degree()) + &quot;, &quot; + center.x + &quot;,&quot; + center.y + &quot;)&quot;;
+    }
+};
+
</ins><span class="cx"> function BenchmarkState(testInterval)
</span><span class="cx"> {
</span><span class="cx">     this._currentTimeOffset = 0;
</span><span class="lines">@@ -9,11 +43,6 @@
</span><span class="cx">     WARMING: 0,
</span><span class="cx">     SAMPLING: 1,
</span><span class="cx">     FINISHED: 2,
</span><del>-    messages: [ 
-        Strings.text.runningState.warming,
-        Strings.text.runningState.sampling,
-        Strings.text.runningState.finished
-    ]
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> BenchmarkState.prototype =
</span><span class="lines">@@ -22,7 +51,7 @@
</span><span class="cx">     {
</span><span class="cx">         return stage * this._stageInterval;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     _message: function(stage, timeOffset)
</span><span class="cx">     {
</span><span class="cx">         if (stage == BenchmarkState.stages.FINISHED)
</span><span class="lines">@@ -32,17 +61,17 @@
</span><span class="cx">             + Math.floor((timeOffset - this._timeOffset(stage)) / 1000) + &quot;/&quot;
</span><span class="cx">             + Math.floor((this._timeOffset(stage + 1) - this._timeOffset(stage)) / 1000) + &quot;)&quot;;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     update: function(currentTimeOffset)
</span><span class="cx">     {
</span><span class="cx">         this._currentTimeOffset = currentTimeOffset;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     samplingTimeOffset: function()
</span><span class="cx">     {
</span><span class="cx">         return this._timeOffset(BenchmarkState.stages.SAMPLING);
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     currentStage: function()
</span><span class="cx">     {
</span><span class="cx">         for (var stage = BenchmarkState.stages.WARMING; stage &lt; BenchmarkState.stages.FINISHED; ++stage) {
</span><span class="lines">@@ -50,27 +79,110 @@
</span><span class="cx">                 return stage;
</span><span class="cx">         }
</span><span class="cx">         return BenchmarkState.stages.FINISHED;
</span><ins>+    }
+}
+
+
+function Stage() {}
+
+Stage.prototype =
+{
+    initialize: function(benchmark)
+    {
+        this._benchmark = benchmark;
+        this._element = document.getElementById(&quot;stage&quot;);
+        this._element.setAttribute(&quot;width&quot;, document.body.offsetWidth);
+        this._element.setAttribute(&quot;height&quot;, document.body.offsetHeight);
+        this._size = Point.elementClientSize(this._element).subtract(Insets.elementPadding(this._element).size);
</ins><span class="cx">     },
</span><del>-    
-    currentMessage: function()
</del><ins>+
+    get element()
</ins><span class="cx">     {
</span><del>-        return this._message(this.currentStage(), this._currentTimeOffset);
</del><ins>+        return this._element;
</ins><span class="cx">     },
</span><del>-    
-    currentProgress: function()
</del><ins>+
+    get size()
</ins><span class="cx">     {
</span><del>-        return this._currentTimeOffset / this._timeOffset(BenchmarkState.stages.FINISHED);
</del><ins>+        return this._size;
+    },
+
+    complexity: function()
+    {
+        return 0;
+    },
+
+    random: function(min, max)
+    {
+        return (Math.random() * (max - min)) + min;
+    },
+
+    randomBool: function()
+    {
+        return !!Math.round(this.random(0, 1));
+    },
+
+    randomInt: function(min, max)
+    {
+        return Math.round(this.random(min, max));
+    },
+
+    randomPosition: function(maxPosition)
+    {
+        return new Point(this.randomInt(0, maxPosition.x), this.randomInt(0, maxPosition.y));
+    },
+
+    randomSquareSize: function(min, max)
+    {
+        var side = this.random(min, max);
+        return new Point(side, side);
+    },
+
+    randomVelocity: function(maxVelocity)
+    {
+        return this.random(maxVelocity / 8, maxVelocity);
+    },
+
+    randomAngle: function()
+    {
+        return this.random(0, Math.PI * 2);
+    },
+
+    randomColor: function()
+    {
+        var min = 32;
+        var max = 256 - 32;
+        return &quot;#&quot;
+            + this.randomInt(min, max).toString(16)
+            + this.randomInt(min, max).toString(16)
+            + this.randomInt(min, max).toString(16);
+    },
+
+    randomRotater: function()
+    {
+        return new Rotater(this.random(1000, 10000));
+    },
+
+    tune: function()
+    {
+        throw &quot;Not implemented&quot;;
+    },
+
+    animate: function()
+    {
+        throw &quot;Not implemented&quot;;
+    },
+
+    clear: function()
+    {
+        return this.tune(-this.tune(0));
</ins><span class="cx">     }
</span><del>-}
</del><ins>+};
</ins><span class="cx"> 
</span><del>-function Animator(benchmark, options)
</del><ins>+function Animator()
</ins><span class="cx"> {
</span><del>-    this._benchmark = benchmark;
-    this._options = options;
-    
</del><span class="cx">     this._frameCount = 0;
</span><span class="cx">     this._dropFrameCount = 1;
</span><del>-    this._measureFrameCount = 3; 
</del><ins>+    this._measureFrameCount = 3;
</ins><span class="cx">     this._referenceTime = 0;
</span><span class="cx">     this._currentTimeOffset = 0;
</span><span class="cx">     this._estimator = new KalmanEstimator(60);
</span><span class="lines">@@ -78,12 +190,23 @@
</span><span class="cx"> 
</span><span class="cx"> Animator.prototype =
</span><span class="cx"> {
</span><ins>+    initialize: function(benchmark)
+    {
+        this._benchmark = benchmark;
+        this._estimateFrameRate = benchmark.options[&quot;estimated-frame-rate&quot;];
+    },
+
+    get benchmark()
+    {
+        return this._benchmark;
+    },
+
</ins><span class="cx">     timeDelta: function()
</span><span class="cx">     {
</span><span class="cx">         return this._currentTimeOffset - this._startTimeOffset;
</span><span class="cx">     },
</span><del>-    
-    animate: function()
</del><ins>+
+    _shouldRequestAnotherFrame: function()
</ins><span class="cx">     {
</span><span class="cx">         var currentTime = performance.now();
</span><span class="cx">         
</span><span class="lines">@@ -108,34 +231,41 @@
</span><span class="cx">         // Get the average FPS of _measureFrameCount frames over measureTimeDelta.
</span><span class="cx">         var measureTimeDelta = this._currentTimeOffset - this._measureTimeOffset;
</span><span class="cx">         var currentFrameRate = Math.floor(1000 / (measureTimeDelta / this._measureFrameCount));
</span><del>-         
</del><ins>+
</ins><span class="cx">         // Use Kalman filter to get a more non-fluctuating frame rate.
</span><del>-        if (this._options[&quot;estimated-frame-rate&quot;])
</del><ins>+        if (this._estimateFrameRate)
</ins><span class="cx">             currentFrameRate = this._estimator.estimate(currentFrameRate);
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Adjust the test to reach the desired FPS.
</span><span class="cx">         var result = this._benchmark.update(this._currentTimeOffset, this.timeDelta(), currentFrameRate);
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Start the next drop/measure cycle.
</span><span class="cx">         this._frameCount = 0;
</span><del>-        
</del><ins>+
</ins><span class="cx">         // If result == 0, no more requestAnimationFrame() will be invoked.
</span><span class="cx">         return result;
</span><span class="cx">     },
</span><del>-    
-    animateLoop: function(timestamp)
</del><ins>+
+    animateLoop: function()
</ins><span class="cx">     {
</span><del>-        if (this.animate())
</del><ins>+        if (this._shouldRequestAnotherFrame()) {
+            this._benchmark.stage.animate(this.timeDelta());
</ins><span class="cx">             requestAnimationFrame(this.animateLoop.bind(this));
</span><ins>+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function Benchmark(options)
</del><ins>+function Benchmark(stage, options)
</ins><span class="cx"> {
</span><span class="cx">     this._options = options;
</span><del>-    this._recordInterval = 200;    
</del><ins>+
+    this._stage = stage;
+    this._stage.initialize(this);
+    this._animator = new Animator();
+    this._animator.initialize(this);
+
+    this._recordInterval = 200;
</ins><span class="cx">     this._isSampling = false;
</span><del>-
</del><span class="cx">     this._controller = new PIDController(this._options[&quot;frame-rate&quot;]);
</span><span class="cx">     this._sampler = new Sampler(2);
</span><span class="cx">     this._state = new BenchmarkState(this._options[&quot;test-interval&quot;] * 1000);
</span><span class="lines">@@ -143,20 +273,35 @@
</span><span class="cx"> 
</span><span class="cx"> Benchmark.prototype =
</span><span class="cx"> {
</span><ins>+    get options()
+    {
+        return this._options;
+    },
+
+    get stage()
+    {
+        return this._stage;
+    },
+
+    get animator()
+    {
+        return this._animator;
+    },
+
</ins><span class="cx">     // Called from the load event listener or from this.run().
</span><span class="cx">     start: function()
</span><span class="cx">     {
</span><span class="cx">         this._animator.animateLoop();
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     // Called from the animator to adjust the complexity of the test.
</span><span class="cx">     update: function(currentTimeOffset, timeDelta, currentFrameRate)
</span><span class="cx">     {
</span><span class="cx">         this._state.update(currentTimeOffset);
</span><del>-        
</del><ins>+
</ins><span class="cx">         var stage = this._state.currentStage();
</span><span class="cx">         if (stage == BenchmarkState.stages.FINISHED) {
</span><del>-            this.clear();
</del><ins>+            this._stage.clear();
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -168,8 +313,8 @@
</span><span class="cx">         var tuneValue = 0;
</span><span class="cx">         if (this._options[&quot;adjustment&quot;] == &quot;fixed&quot;) {
</span><span class="cx">             if (this._options[&quot;complexity&quot;]) {
</span><del>-                // this.tune(0) returns the current complexity of the test.
-                tuneValue = this._options[&quot;complexity&quot;] - this.tune(0);
</del><ins>+                // this._stage.tune(0) returns the current complexity of the test.
+                tuneValue = this._options[&quot;complexity&quot;] - this._stage.tune(0);
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         else if (!(this._isSampling &amp;&amp; this._options[&quot;adjustment&quot;] == &quot;fixed-after-warmup&quot;)) {
</span><span class="lines">@@ -179,15 +324,15 @@
</span><span class="cx">             tuneValue = tuneValue &gt; 0 ? Math.floor(tuneValue) : Math.ceil(tuneValue);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        var currentComplexity = this.tune(tuneValue);
</del><ins>+        var currentComplexity = this._stage.tune(tuneValue);
</ins><span class="cx">         this.record(currentTimeOffset, currentComplexity, currentFrameRate);
</span><span class="cx">         return true;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     record: function(currentTimeOffset, currentComplexity, currentFrameRate)
</span><span class="cx">     {
</span><span class="cx">         this._sampler.sample(currentTimeOffset, [currentComplexity, currentFrameRate]);
</span><del>-        
</del><ins>+
</ins><span class="cx">         if (typeof this._recordTimeOffset == &quot;undefined&quot;)
</span><span class="cx">             this._recordTimeOffset = currentTimeOffset;
</span><span class="cx"> 
</span><span class="lines">@@ -195,10 +340,9 @@
</span><span class="cx">         if (stage != BenchmarkState.stages.FINISHED &amp;&amp; currentTimeOffset &lt; this._recordTimeOffset + this._recordInterval)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        this.showResults(this._state.currentProgress(), this._state.currentMessage());
</del><span class="cx">         this._recordTimeOffset = currentTimeOffset;
</span><span class="cx">     },
</span><del>-    
</del><ins>+
</ins><span class="cx">     run: function()
</span><span class="cx">     {
</span><span class="cx">         this.start();
</span><span class="lines">@@ -210,29 +354,8 @@
</span><span class="cx">                 return promise.resolve(self._sampler);
</span><span class="cx">             setTimeout(resolveWhenFinished.bind(self), 50);
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         resolveWhenFinished();
</span><span class="cx">         return promise;
</span><span class="cx">     }
</span><del>-}
-
-window.benchmarkClient = {};
-
-// This event listener runs the test if it is loaded outside the benchmark runner.
-window.addEventListener(&quot;load&quot;, function()
-{
-    if (window.self !== window.top)
-        return;
-    window.benchmark = window.benchmarkClient.create(null, null, 30000, 50, null, null);
-    window.benchmark.start();
-});
-
-// This function is called from the suite controller run-callback when running the benchmark runner.
-window.runBenchmark = function(suite, test, options, progressBar)
-{
-    var benchmarkOptions = { complexity: test.complexity };
-    benchmarkOptions = Utilities.mergeObjects(benchmarkOptions, options);
-    benchmarkOptions = Utilities.mergeObjects(benchmarkOptions, Utilities.parseParameters());
-    window.benchmark = window.benchmarkClient.create(suite, test, benchmarkOptions, progressBar);
-    return window.benchmark.run();
-}
</del><ins>+};
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestsresourcesstagejs"></a>
<div class="delfile"><h4>Deleted: trunk/PerformanceTests/Animometer/tests/resources/stage.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/resources/stage.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/resources/stage.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,175 +0,0 @@
</span><del>-function Rotater(rotateInterval)
-{
-    this._timeDelta = 0;
-    this._rotateInterval = rotateInterval;
-}
-
-Rotater.prototype =
-{
-    get interval()
-    {
-        return this._rotateInterval;
-    },
-    
-    next: function(timeDelta)
-    {
-        this._timeDelta = (this._timeDelta + timeDelta) % this._rotateInterval;
-    },
-    
-    degree: function()
-    {
-        return (360 * this._timeDelta) / this._rotateInterval;
-    },
-    
-    rotateZ: function()
-    {
-        return &quot;rotateZ(&quot; + Math.floor(this.degree()) + &quot;deg)&quot;;
-    },
-    
-    rotate: function(center)
-    {
-        return &quot;rotate(&quot; + Math.floor(this.degree()) + &quot;, &quot; + center.x + &quot;,&quot; + center.y + &quot;)&quot;;
-    }
-}
-
-function Stage(element, options)
-{
-    this.element = element;
-    this._size = Point.elementClientSize(element).subtract(Insets.elementPadding(element).size);
-}
-
-Stage.prototype =
-{
-    get size()
-    {
-        return this._size
-    },
-    
-    random: function(min, max)
-    {
-        return (Math.random() * (max - min)) + min;
-    },
-    
-    randomBool: function()
-    {
-        return !!Math.round(this.random(0, 1));
-    },
-
-    randomInt: function(min, max)
-    {
-        return Math.round(this.random(min, max));
-    },
-    
-    randomPosition: function(maxPosition)
-    {
-        return new Point(this.randomInt(0, maxPosition.x), this.randomInt(0, maxPosition.y));
-    },
-    
-    randomSquareSize: function(min, max)
-    {
-        var side = this.random(min, max);
-        return new Point(side, side);
-    },
-    
-    randomVelocity: function(maxVelocity)
-    {
-        return this.random(maxVelocity / 8, maxVelocity);
-    },
-    
-    randomAngle: function()
-    {
-        return this.random(0, Math.PI * 2);
-    },
-    
-    randomColor: function()
-    {
-        var min = 32;
-        var max = 256 - 32;
-        return &quot;#&quot;
-            + this.randomInt(min, max).toString(16)
-            + this.randomInt(min, max).toString(16)
-            + this.randomInt(min, max).toString(16);
-    },
-    
-    randomRotater: function()
-    {
-        return new Rotater(this.random(1000, 10000));
-    },
-
-    tune: function()
-    {
-        throw &quot;Not implemented&quot;;
-    },
-    
-    animate: function()
-    {
-        throw &quot;Not implemented&quot;;
-    },
-    
-    clear: function()
-    {
-        return this.tune(-this.tune(0));
-    }
-}
-
-function StageAnimator(benchmark, options)
-{
-    Animator.call(this, benchmark, options);
-};
-
-StageAnimator.prototype = Object.create(Animator.prototype);
-StageAnimator.prototype.constructor = StageAnimator;
-
-StageAnimator.prototype.animate = function()
-{
-    if (!Animator.prototype.animate.call(this))
-        return false;
-    this._benchmark._stage.animate(this.timeDelta());
-    return true;
-}
-
-function StageBenchmark(suite, test, options, progressBar)
-{
-    Benchmark.call(this, options);
-    
-    var element = document.getElementById(&quot;stage&quot;);
-    element.setAttribute(&quot;width&quot;, document.body.offsetWidth);
-    element.setAttribute(&quot;height&quot;, document.body.offsetHeight);
-    
-    this._stage = this.createStage(element);
-    this._animator = this.createAnimator();
-    this._suite = suite;
-    this._test = test;
-    this._progressBar = progressBar;
-}
-
-StageBenchmark.prototype = Object.create(Benchmark.prototype);
-StageBenchmark.prototype.constructor = StageBenchmark;
-
-StageBenchmark.prototype.createStage = function(element)
-{
-    return new Stage(element, this._options);
-}
-
-StageBenchmark.prototype.createAnimator = function()
-{
-    return new StageAnimator(this, this._options);
-}
-
-StageBenchmark.prototype.tune = function(count)
-{
-    return this._stage.tune(count);
-}
-
-StageBenchmark.prototype.clear = function()
-{
-    return this._stage.clear();
-}
-
-StageBenchmark.prototype.showResults = function(progress, message)
-{
-    if (!this._progressBar || !this._test)
-        return;
-
-    this._progressBar.setPos(progress);
-}
</del></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestssimpleresourcessimplecanvaspathsjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><ins>+(function() {
+
</ins><span class="cx"> // === PAINT OBJECTS ===
</span><span class="cx"> 
</span><span class="cx"> function CanvasLineSegment(stage) {
</span><span class="lines">@@ -172,124 +174,162 @@
</span><span class="cx"> 
</span><span class="cx"> // === STAGES ===
</span><span class="cx"> 
</span><del>-function SimpleCanvasPathStrokeStage(element, options, canvasObject) {
-    SimpleCanvasStage.call(this, element, options, canvasObject);
-}
-SimpleCanvasPathStrokeStage.prototype = Object.create(SimpleCanvasStage.prototype);
-SimpleCanvasPathStrokeStage.prototype.constructor = SimpleCanvasPathStrokeStage;
-SimpleCanvasPathStrokeStage.prototype.animate = function() {
-    var context = this.context;
-    context.lineWidth = this.randomInt(1, 20);
-    context.strokeStyle = this.randomColor();
-    context.beginPath();
-    context.moveTo(0,0);
-    this._objects.forEach(function(object) {
-        object.draw(context);
-    });
-    context.stroke();
-}
</del><ins>+SimpleCanvasPathStrokeStage = Utilities.createSubclass(SimpleCanvasStage,
+    function(canvasObject) {
+        SimpleCanvasStage.call(this, canvasObject);
+    }, {
</ins><span class="cx"> 
</span><del>-function SimpleCanvasPathFillStage(element, options, canvasObject) {
-    SimpleCanvasStage.call(this, element, options, canvasObject);
-}
-SimpleCanvasPathFillStage.prototype = Object.create(SimpleCanvasStage.prototype);
-SimpleCanvasPathFillStage.prototype.constructor = SimpleCanvasPathFillStage;
-SimpleCanvasPathFillStage.prototype.animate = function() {
-    var context = this.context;
-    context.fillStyle = this.randomColor();
-    context.beginPath();
-    context.moveTo(0,0);
-    this._objects.forEach(function(object) {
-        object.draw(context);
-    });
-    context.fill();
-}
</del><ins>+    animate: function()
+    {
+        var context = this.context;
+        context.clearRect(0, 0, this.size.x, this.size.y);
+        context.lineWidth = this.randomInt(1, 20);
+        context.strokeStyle = this.randomColor();
+        context.beginPath();
+        context.moveTo(0,0);
+        this.objects.forEach(function(object) {
+            object.draw(context);
+        });
+        context.stroke();
+    }
+});
</ins><span class="cx"> 
</span><del>-function CanvasLineSegmentStage(element, options)
-{
-    SimpleCanvasStage.call(this, element, options, CanvasLineSegment);
-    this.context.lineCap = options[&quot;lineCap&quot;] || &quot;butt&quot;;
-}
-CanvasLineSegmentStage.prototype = Object.create(SimpleCanvasStage.prototype);
-CanvasLineSegmentStage.prototype.constructor = CanvasLineSegmentStage;
</del><ins>+SimpleCanvasPathFillStage = Utilities.createSubclass(SimpleCanvasStage,
+    function(canvasObject) {
+        SimpleCanvasStage.call(this, canvasObject);
+    }, {
</ins><span class="cx"> 
</span><del>-function CanvasLinePathStage(element, options)
-{
-    SimpleCanvasPathStrokeStage.call(this, element, options, CanvasLinePoint);
-    this.context.lineJoin = options[&quot;lineJoin&quot;] || &quot;bevel&quot;;
-}
-CanvasLinePathStage.prototype = Object.create(SimpleCanvasPathStrokeStage.prototype);
-CanvasLinePathStage.prototype.constructor = CanvasLinePathStage;
</del><ins>+    animate: function()
+    {
+        var context = this.context;
+        context.clearRect(0, 0, this.size.x, this.size.y);
+        context.fillStyle = this.randomColor();
+        context.beginPath();
+        context.moveTo(0,0);
+        this.objects.forEach(function(object) {
+            object.draw(context);
+        });
+        context.fill();
+    }
+});
</ins><span class="cx"> 
</span><del>-function CanvasLineDashStage(element, options)
-{
-    SimpleCanvasStage.call(this, element, options, CanvasLinePoint);
-    this.context.setLineDash([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
-    this.context.lineWidth = 1;
-    this.context.strokeStyle = &quot;#000&quot;;
-    this._step = 0;
-}
-CanvasLineDashStage.prototype = Object.create(SimpleCanvasStage.prototype);
-CanvasLineDashStage.prototype.constructor = CanvasLineDashStage;
-CanvasLineDashStage.prototype.animate = function() {
-    var context = this.context;
-    context.lineDashOffset = this._step++;
-    context.beginPath();
-    context.moveTo(0,0);
-    this._objects.forEach(function(object) {
-        object.draw(context);
-    });
-    context.stroke();
-};
</del><ins>+CanvasLineSegmentStage = Utilities.createSubclass(SimpleCanvasStage,
+    function()
+    {
+        SimpleCanvasStage.call(this, CanvasLineSegment);
+    }, {
</ins><span class="cx"> 
</span><del>-// === BENCHMARK ===
</del><ins>+    initialize: function(benchmark)
+    {
+        SimpleCanvasStage.prototype.initialize.call(this, benchmark);
+        this.context.lineCap = benchmark.options[&quot;lineCap&quot;] || &quot;butt&quot;;
+    }
+});
</ins><span class="cx"> 
</span><del>-function CanvasPathBenchmark(suite, test, options, progressBar) {
-    SimpleCanvasBenchmark.call(this, suite, test, options, progressBar);
-}
-CanvasPathBenchmark.prototype = Object.create(SimpleCanvasBenchmark.prototype);
-CanvasPathBenchmark.prototype.constructor = CanvasPathBenchmark;
-CanvasPathBenchmark.prototype.createStage = function(element)
-{
-    switch (this._options[&quot;pathType&quot;]) {
-    case &quot;line&quot;:
-        return new CanvasLineSegmentStage(element, this._options);
-    case &quot;linePath&quot;: {
-        if (&quot;lineJoin&quot; in this._options)
-            return new CanvasLinePathStage(element, this._options);
-        if (&quot;lineDash&quot; in this._options)
-            return new CanvasLineDashStage(element, this._options);
-        break;
</del><ins>+CanvasLinePathStage = Utilities.createSubclass(SimpleCanvasPathStrokeStage,
+    function()
+    {
+        SimpleCanvasPathStrokeStage.call(this, CanvasLinePoint);
+    }, {
+
+    initialize: function(benchmark)
+    {
+        SimpleCanvasPathStrokeStage.prototype.initialize.call(this, benchmark);
+        this.context.lineJoin = benchmark.options[&quot;lineJoin&quot;] || &quot;bevel&quot;;
</ins><span class="cx">     }
</span><del>-    case &quot;quadratic&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasQuadraticSegment);
-    case &quot;quadraticPath&quot;:
-        return new SimpleCanvasPathStrokeStage(element, this._options, CanvasQuadraticPoint);
-    case &quot;bezier&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasBezierSegment);
-    case &quot;bezierPath&quot;:
-        return new SimpleCanvasPathStrokeStage(element, this._options, CanvasBezierPoint);
-    case &quot;arcTo&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasArcToSegment);
-    case &quot;arc&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasArcSegment);
-    case &quot;rect&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasRect);
-    case &quot;lineFill&quot;:
-        return new SimpleCanvasPathFillStage(element, this._options, CanvasLinePoint);
-    case &quot;quadraticFill&quot;:
-        return new SimpleCanvasPathFillStage(element, this._options, CanvasQuadraticPoint);
-    case &quot;bezierFill&quot;:
-        return new SimpleCanvasPathFillStage(element, this._options, CanvasBezierPoint);
-    case &quot;arcToFill&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasArcToSegmentFill);
-    case &quot;arcFill&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasArcSegmentFill);
-    case &quot;rectFill&quot;:
-        return new SimpleCanvasStage(element, this._options, CanvasRectFill);
</del><ins>+});
+
+CanvasLineDashStage = Utilities.createSubclass(SimpleCanvasStage,
+    function()
+    {
+        SimpleCanvasStage.call(this, CanvasLinePoint);
+        this._step = 0;
+    }, {
+
+    initialize: function(benchmark)
+    {
+        SimpleCanvasStage.prototype.initialize.call(this, benchmark);
+        this.context.setLineDash([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+        this.context.lineWidth = 1;
+        this.context.strokeStyle = &quot;#000&quot;;
+    },
+
+    animate: function()
+    {
+        var context = this.context;
+        context.clearRect(0, 0, this.size.x, this.size.y);
+        context.lineDashOffset = this._step++;
+        context.beginPath();
+        context.moveTo(0,0);
+        this.objects.forEach(function(object) {
+            object.draw(context);
+        });
+        context.stroke();
</ins><span class="cx">     }
</span><del>-}
</del><ins>+});
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar) {
-    return new CanvasPathBenchmark(suite, test, options, progressBar);
-}
</del><ins>+// === BENCHMARK ===
+
+CanvasPathBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        var stage;
+        switch (options[&quot;pathType&quot;]) {
+        case &quot;line&quot;:
+            stage = new CanvasLineSegmentStage();
+            break;
+        case &quot;linePath&quot;: {
+            if (&quot;lineJoin&quot; in options)
+                stage = new CanvasLinePathStage();
+            if (&quot;lineDash&quot; in options)
+                stage = new CanvasLineDashStage();
+            break;
+        }
+        case &quot;quadratic&quot;:
+            stage = new SimpleCanvasStage(CanvasQuadraticSegment);
+            break;
+        case &quot;quadraticPath&quot;:
+            stage = new SimpleCanvasPathStrokeStage(CanvasQuadraticPoint);
+            break;
+        case &quot;bezier&quot;:
+            stage = new SimpleCanvasStage(CanvasBezierSegment);
+            break;
+        case &quot;bezierPath&quot;:
+            stage = new SimpleCanvasPathStrokeStage(CanvasBezierPoint);
+            break;
+        case &quot;arcTo&quot;:
+            stage = new SimpleCanvasStage(CanvasArcToSegment);
+            break;
+        case &quot;arc&quot;:
+            stage = new SimpleCanvasStage(CanvasArcSegment);
+            break;
+        case &quot;rect&quot;:
+            stage = new SimpleCanvasStage(CanvasRect);
+            break;
+        case &quot;lineFill&quot;:
+            stage = new SimpleCanvasPathFillStage(CanvasLinePoint);
+            break;
+        case &quot;quadraticFill&quot;:
+            stage = new SimpleCanvasPathFillStage(CanvasQuadraticPoint);
+            break;
+        case &quot;bezierFill&quot;:
+            stage = new SimpleCanvasPathFillStage(CanvasBezierPoint);
+            break;
+        case &quot;arcToFill&quot;:
+            stage = new SimpleCanvasStage(CanvasArcToSegmentFill);
+            break;
+        case &quot;arcFill&quot;:
+            stage = new SimpleCanvasStage(CanvasArcSegmentFill);
+            break;
+        case &quot;rectFill&quot;:
+            stage = new SimpleCanvasStage(CanvasRectFill);
+            break;
+        }
+
+        Benchmark.call(this, stage, options);
+    }
+);
+
+window.benchmarkClass = CanvasPathBenchmark;
+
+})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestssimpleresourcessimplecanvasjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,62 +1,20 @@
</span><ins>+Utilities.extendObject(SimpleCanvasStage.prototype, {
+    tune: function(count)
+    {
+        if (count == 0)
+            return this.objects.length;
</ins><span class="cx"> 
</span><del>-function SimpleCanvasStage(element, options, canvasObject)
-{
-    Stage.call(this, element, options);
-    this.context = this.element.getContext(&quot;2d&quot;);
-    this.canvasObject = canvasObject;
-    this._objects = [];
-}
-SimpleCanvasStage.prototype = Object.create(Stage.prototype);
-SimpleCanvasStage.prototype.constructor = SimpleCanvasStage;
-SimpleCanvasStage.prototype.tune = function(count)
-{
-    if (count == 0)
-        return this._objects.length;
-
-    if (count &gt; 0) {
-        // For path-based tests, use the object length as a maximum coordinate value
-        // to make it easier to see what the test is doing
-        var coordinateMaximum = Math.max(this._objects.length, 200);
-        for (var i = 0; i &lt; count; ++i) {
-            this._objects.push(new this.canvasObject(this, coordinateMaximum));
</del><ins>+        if (count &gt; 0) {
+            // For path-based tests, use the object length as a maximum coordinate value
+            // to make it easier to see what the test is doing
+            var coordinateMaximum = Math.max(this.objects.length, 200);
+            for (var i = 0; i &lt; count; ++i)
+                this.objects.push(new this._canvasObject(this, coordinateMaximum));
+            return this.objects.length;
</ins><span class="cx">         }
</span><del>-        return this._objects.length;
-    }
</del><span class="cx"> 
</span><del>-    count = Math.min(-count, this._objects.length);
-    this._objects.splice(-count, count);
-
-    return this._objects.length;
-}
-SimpleCanvasStage.prototype.animate = function()
-{
-    var context = this.context;
-    this._objects.forEach(function(object) {
-        object.draw(context);
-    });
-}
-
-function SimpleCanvasAnimator(benchmark, options)
-{
-    StageAnimator.call(this, benchmark, options);
-    this._context = benchmark._stage.context;
-}
-
-SimpleCanvasAnimator.prototype = Object.create(StageAnimator.prototype);
-SimpleCanvasAnimator.prototype.constructor = SimpleCanvasAnimator;
-SimpleCanvasAnimator.prototype.animate = function()
-{
-    this._context.clearRect(0, 0, this._benchmark._stage.size.x, this._benchmark._stage.size.y);
-    return StageAnimator.prototype.animate.call(this, this._options);
-}
-
-
-function SimpleCanvasBenchmark(suite, test, options, progressBar) {
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
-SimpleCanvasBenchmark.prototype = Object.create(StageBenchmark.prototype);
-SimpleCanvasBenchmark.prototype.constructor = SimpleCanvasBenchmark;
-SimpleCanvasBenchmark.prototype.createAnimator = function() {
-    return new SimpleCanvasAnimator(this, this._options);
-}
-
</del><ins>+        count = Math.min(-count, this.objects.length);
+        this.objects.splice(-count, count);
+        return this.objects.length;
+    }
+});
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometertestssimplesimplecanvaspathshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/simple/simple-canvas-paths.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/simple/simple-canvas-paths.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/simple/simple-canvas-paths.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,17 +2,17 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;script src=&quot;../master/resources/canvas-stage.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;resources/simple-canvas.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;resources/simple-canvas-paths.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststemplateresourcestemplatecanvasjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/template/resources/template-canvas.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/template/resources/template-canvas.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/template/resources/template-canvas.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><ins>+(function() {
+
</ins><span class="cx"> function TemplateCanvasObject(stage)
</span><span class="cx"> {
</span><span class="cx">     // For the canvas stage, most likely you will need to create your
</span><span class="lines">@@ -2,101 +4,75 @@
</span><span class="cx">     // animated object since it's only draw time thing.
</span><del>-    
</del><ins>+
</ins><span class="cx">     // Fill in your object data.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-TemplateCanvasObject.prototype._draw = function()
-{
-    // Draw your object.
-}
</del><ins>+TemplateCanvasObject.prototype = {
+    _draw: function()
+    {
+        // Draw your object.
+    },
</ins><span class="cx"> 
</span><del>-TemplateCanvasObject.prototype.animate = function(timeDelta)
-{
-    // Redraw the animated object. The last time this animated
-    // item was drawn before 'timeDelta'.
-    
-    // Move your object.
-    
-    // Redraw your object.
-    this._draw();
-}
</del><ins>+    animate: function(timeDelta)
+    {
+        // Redraw the animated object. The last time this animated
+        // item was drawn before 'timeDelta'.
</ins><span class="cx"> 
</span><del>-function TemplateCanvasStage(element, options)
-{
-    Stage.call(this, element, options);
-    this.context = this.element.getContext(&quot;2d&quot;);
</del><ins>+        // Move your object.
</ins><span class="cx"> 
</span><del>-    // Define a collection for your objects.
-}
</del><ins>+        // Redraw your object.
+        this._draw();
+    }
+};
</ins><span class="cx"> 
</span><del>-TemplateCanvasStage.prototype = Object.create(Stage.prototype);
-TemplateCanvasStage.prototype.constructor = TemplateCanvasStage;
</del><ins>+TemplateCanvasStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-TemplateCanvasStage.prototype.tune = function(count)
-{
-    // If count is -ve, -count elements need to be removed form the
-    // stage. If count is +ve, +count elements need to be added to
-    // the stage.
-    
-    // Change objects in the stage.
-    
-    // Return the number of all the elements in the stage.
-    // This number is recorded in the sampled data.
-    
-    // Return the count of the objects in the stage.
-    return 0;
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
+        this.context = this.element.getContext(&quot;2d&quot;);
</ins><span class="cx"> 
</span><del>-TemplateCanvasStage.prototype.animate = function(timeDelta)
-{
-    // Animate the elements such that all of them are redrawn. Most
-    // likely you will need to call TemplateCanvasObject.animate()
-    // for all your animated objects here.
</del><ins>+        // Define a collection for your objects.
+    },
</ins><span class="cx"> 
</span><del>-    // Loop through all your objects and ask them to animate.
-}
</del><ins>+    tune: function(count)
+    {
+        // If count is -ve, -count elements need to be removed form the
+        // stage. If count is +ve, +count elements need to be added to
+        // the stage.
</ins><span class="cx"> 
</span><del>-function TemplateCanvasAnimator(benchmark, options)
-{
-    Animator.call(this, benchmark, options);
-    this._context = benchmark._stage.context;
-}
</del><ins>+        // Change objects in the stage.
</ins><span class="cx"> 
</span><del>-TemplateCanvasAnimator.prototype = Object.create(StageAnimator.prototype);
-TemplateCanvasAnimator.prototype.constructor = TemplateCanvasAnimator;
</del><ins>+        // Return the number of all the elements in the stage.
+        // This number is recorded in the sampled data.
</ins><span class="cx"> 
</span><del>-TemplateCanvasAnimator.prototype.animate = function()
-{
-    // Most likely you will need to clear the canvas with every redraw.
-    this._context.clearRect(0, 0, this._benchmark._stage.size.x, this._benchmark._stage.size.y);
</del><ins>+        // Return the count of the objects in the stage.
+        return 0;
+    },
</ins><span class="cx"> 
</span><del>-    // Draw scene stuff here if needed.
</del><ins>+    animate: function(timeDelta)
+    {
+        // Animate the elements such that all of them are redrawn. Most
+        // likely you will need to call TemplateCanvasObject.animate()
+        // for all your animated objects here.
</ins><span class="cx"> 
</span><del>-    return StageAnimator.prototype.animate.call(this);
-}
</del><ins>+        // Most likely you will need to clear the canvas with every redraw.
+        this.context.clearRect(0, 0, this.size.x, this.size.y);
</ins><span class="cx"> 
</span><del>-function TemplateCanvasBenchmark(suite, test, options, progressBar)
-{
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+        // Loop through all your objects and ask them to animate.
+    }
+});
</ins><span class="cx"> 
</span><del>-TemplateCanvasBenchmark.prototype = Object.create(StageBenchmark.prototype);
-TemplateCanvasBenchmark.prototype.constructor = TemplateCanvasBenchmark;
</del><ins>+TemplateCanvasBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new TemplateCanvasStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-TemplateCanvasBenchmark.prototype.createStage = function(element)
-{
-    // Attach the stage to the benchmark.
-    return new TemplateCanvasStage(element, this._options);
-}
</del><ins>+window.benchmarkClass = TemplateCanvasBenchmark;
</ins><span class="cx"> 
</span><del>-TemplateCanvasBenchmark.prototype.createAnimator = function()
-{
-    // Attach the animator to the benchmark.
-    return new TemplateCanvasAnimator(this, this._options);
-}
-
-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    // This function is called from the test harness which starts the
-    // test by creating your benchmark object.
-    return new TemplateCanvasBenchmark(suite, test, options, progressBar);
-}
</del><ins>+})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststemplateresourcestemplatecssjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/template/resources/template-css.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/template/resources/template-css.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/template/resources/template-css.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,55 +1,52 @@
</span><del>-function TemplateCssStage(element, options)
-{
-    Stage.call(this, element, options);
-}
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-TemplateCssStage.prototype = Object.create(Stage.prototype);
-TemplateCssStage.prototype.constructor = TemplateCssStage;
</del><ins>+TemplateCssStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-TemplateCssStage.prototype.tune = function(count)
-{
-    // If count is -ve, -count elements need to be removed form the
-    // stage. If count is +ve, +count elements need to be added to
-    // the stage.
-    
-    // Change objects in the stage.
-    
-    // Return the number of all the elements in the stage.
-    // This number is recorded in the sampled data.
-    
-    // Return the count of the objects in the stage.
-    return 0;
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
</ins><span class="cx"> 
</span><del>-TemplateCssStage.prototype.animate = function(timeDelta)
-{
-    // Animate the elements such that all of them are redrawn. You 
-    // may need to define your object so it keeps its animation data.
-    // This object should encapsulate a corrosponding HTMLElement.
-    // You may also define a method called animate() in this object
-    // and just call this function here for all the elements.
-    
-    // Loop through all your objects and ask them to animate.
-}
</del><ins>+        // Do initialization here.
+    },
</ins><span class="cx"> 
</span><del>-function TemplateCssBenchmark(suite, test, options, progressBar)
-{
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    tune: function(count)
+    {
+        // If count is -ve, -count elements need to be removed form the
+        // stage. If count is +ve, +count elements need to be added to
+        // the stage.
</ins><span class="cx"> 
</span><del>-TemplateCssBenchmark.prototype = Object.create(StageBenchmark.prototype);
-TemplateCssBenchmark.prototype.constructor = TemplateCssBenchmark;
</del><ins>+        // Change objects in the stage.
</ins><span class="cx"> 
</span><del>-TemplateCssBenchmark.prototype.createStage = function(element)
-{
-    // You need to override this method such that your stage is hooked
-    // up to the benchmark.
-    return new TemplateCssStage(element, this._options);
-}
</del><ins>+        // Return the number of all the elements in the stage.
+        // This number is recorded in the sampled data.
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    // This function is called from the test harness which starts the
-    // test by creating your benchmark object.
-    return new TemplateCssBenchmark(suite, test, options, progressBar);
-}
</del><ins>+        // Return the count of the objects in the stage.
+        return 0;
+    },
+
+    animate: function(timeDelta)
+    {
+        // Animate the elements such that all of them are redrawn. You
+        // may need to define your object so it keeps its animation data.
+        // This object should encapsulate a corrosponding HTMLElement.
+        // You may also define a method called animate() in this object
+        // and just call this function here for all the elements.
+
+        // Loop through all your objects and ask them to animate.
+    }
+});
+
+TemplateCssBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new TemplateCssStage(), options);
+    }
+);
+
+window.benchmarkClass = TemplateCssBenchmark;
+
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststemplateresourcestemplatesvgjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/template/resources/template-svg.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/template/resources/template-svg.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/template/resources/template-svg.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,55 +1,52 @@
</span><del>-function TemplateSvgStage(element, options)
-{
-    Stage.call(this, element, options);
-}
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-TemplateSvgStage.prototype = Object.create(Stage.prototype);
-TemplateSvgStage.prototype.constructor = TemplateSvgStage;
</del><ins>+TemplateSvgStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-TemplateSvgStage.prototype.tune = function(count)
-{
-    // If count is -ve, -count elements need to be removed form the
-    // stage. If count is +ve, +count elements need to be added to
-    // the stage.
-    
-    // TODO: Change objects in the stage.
-    
-    // Return the number of all the elements in the stage.
-    // This number is recorded in the sampled data.
-    
-    // TODO: Return the count of the objects in the stage.
-    return 0;
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
</ins><span class="cx"> 
</span><del>-TemplateSvgStage.prototype.animate = function(timeDelta)
-{
-    // Animate the elements such that all of them are redrawn. You 
-    // may need to define your object so it keeps its animation data.
-    // This object should encapsulate a corrosponding SVGElement.
-    // You may also define a method called animate() in this object
-    // and just call this function here for all the elements.
-    
-    // TODO: Loop through all your objects and ask them to animate.
-}
</del><ins>+        // Do initialization here.
+    },
</ins><span class="cx"> 
</span><del>-function TemplateSvgBenchmark(suite, test, options, progressBar)
-{
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+    tune: function(count)
+    {
+        // If count is -ve, -count elements need to be removed form the
+        // stage. If count is +ve, +count elements need to be added to
+        // the stage.
</ins><span class="cx"> 
</span><del>-TemplateSvgBenchmark.prototype = Object.create(StageBenchmark.prototype);
-TemplateSvgBenchmark.prototype.constructor = TemplateSvgBenchmark;
</del><ins>+        // TODO: Change objects in the stage.
</ins><span class="cx"> 
</span><del>-TemplateSvgBenchmark.prototype.createStage = function(element)
-{
-    // You need to override this method such that your stage is hooked
-    // up to the benchmark.
-    return new TemplateSvgStage(element, this._options);
-}
</del><ins>+        // Return the number of all the elements in the stage.
+        // This number is recorded in the sampled data.
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    // This function is called from the test harness which starts the
-    // test by creating your benchmark object.
-    return new TemplateSvgBenchmark(suite, test, options, progressBar);
-}
</del><ins>+        // TODO: Return the count of the objects in the stage.
+        return 0;
+    },
+
+    animate: function(timeDelta)
+    {
+        // Animate the elements such that all of them are redrawn. You
+        // may need to define your object so it keeps its animation data.
+        // This object should encapsulate a corrosponding SVGElement.
+        // You may also define a method called animate() in this object
+        // and just call this function here for all the elements.
+
+        // TODO: Loop through all your objects and ask them to animate.
+    }
+});
+
+TemplateSvgBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new TemplateSvgStage(), options);
+    }
+);
+
+window.benchmarkClass = TemplateSvgBenchmark;
+
+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststemplatetemplatecanvashtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/template/template-canvas.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/template/template-canvas.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/template/template-canvas.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,16 +2,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;
</del><span class="cx">     &lt;script src=&quot;resources/template-canvas.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;canvas id=&quot;stage&quot;&gt;&lt;/canvas&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststemplatetemplatecsshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/template/template-css.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/template/template-css.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/template/template-css.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,16 +2,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;
</del><span class="cx">     &lt;script src=&quot;resources/template-css.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststemplatetemplatesvghtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/template/template-svg.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/template/template-svg.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/template/template-svg.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -2,16 +2,15 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><ins>+&lt;/head&gt;
+&lt;body&gt;
+    &lt;svg id=&quot;stage&quot;&gt;&lt;/svg&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;
</del><span class="cx">     &lt;script src=&quot;resources/template-svg.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;svg id=&quot;stage&quot;&gt;&lt;/svg&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststextlayeringtexthtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/text/layering-text.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/text/layering-text.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/text/layering-text.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</ins><span class="cx">     &lt;style&gt;
</span><span class="cx">         .text-layer {
</span><span class="cx">             position: absolute;
</span><span class="lines">@@ -17,18 +18,16 @@
</span><span class="cx">                 font-size: 0.96em;
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-    &lt;/style&gt;  
-    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</del><ins>+    &lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
</span><del>-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
</del><span class="cx">     &lt;script src=&quot;resources/layering-text.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;/head&gt;
-&lt;body&gt;
-    &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststextresourceslayeringtextjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/text/resources/layering-text.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/text/resources/layering-text.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/text/resources/layering-text.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,255 +1,261 @@
</span><del>-function LayeringTextStage(element, options)
-{
-    Stage.call(this, element, options);
-    this._textElementParent = this.element;
-    this._textElements = [];
-    this._textItemIndex = 0;
-    this._colorIndex = 0;
-    this._animateCounts = 0;
-}
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-LayeringTextStage.textItems = [
-    &quot;&lt;div class='text-layer'&gt;&quot;,
-        &quot;&lt;h2&gt;Types of benchmarks&lt;/h2&gt;&quot;,
-        &quot;&lt;ol&gt;&quot;,
-            &quot;&lt;li&gt;Real program&quot;,
-                &quot;&lt;ul&gt;&quot;,
-                    &quot;&lt;li&gt;word processing software&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;tool software of CAD&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;user's application software (i.e.: MIS)&lt;/li&gt;&quot;,
-                &quot;&lt;/ul&gt;&quot;,
-            &quot;&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Kernel&quot;,
-                &quot;&lt;ul&gt;&quot;,
-                    &quot;&lt;li&gt;contains key codes&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;normally abstracted from actual program&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;popular kernel: Livermore loop&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;linpack benchmark (contains basic linear algebra subroutine written in FORTRAN language)&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;results are represented in MFLOPS&lt;/li&gt;&quot;,
-                &quot;&lt;/ul&gt;&quot;,
-            &quot;&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Synthetic Benchmark&quot;,
-                &quot;&lt;ul&gt;&quot;,
-                    &quot;&lt;li&gt;Procedure for programming synthetic benchmark:&quot;,
-                        &quot;&lt;ul&gt;&quot;,
-                            &quot;&lt;li&gt;take statistics of all types of operations from many application programs&lt;/li&gt;&quot;,
-                            &quot;&lt;li&gt;get proportion of each operation&lt;/li&gt;&quot;,
-                            &quot;&lt;li&gt;write program based on the proportion above&lt;/li&gt;&quot;,
-                        &quot;&lt;/ul&gt;&quot;,
-                    &quot;&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;Types of Synthetic Benchmark are:&quot;,
-                        &quot;&lt;ul&gt;&quot;,
-                            &quot;&lt;li&gt;Whetstone&lt;/li&gt;&quot;,
-                            &quot;&lt;li&gt;Dhrystone&lt;/li&gt;&quot;,
-                        &quot;&lt;/ul&gt;&quot;,
-                    &quot;&lt;/li&gt;&quot;,
-                    &quot;&lt;li&gt;These were the first general purpose industry standard computer benchmarks. They do not necessarily obtain high scores on modern pipelined computers.&lt;/li&gt;&quot;,
-                &quot;&lt;/ul&gt;&quot;,
-            &quot;&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;I/O benchmarks&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Database benchmarks: to measure the throughput and response times of database management systems (DBMS')&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Parallel benchmarks: used on machines with multiple cores, processors or systems consisting of multiple machines&lt;/li&gt;&quot;,
-        &quot;&lt;/ol&gt;&quot;,
-        &quot;&lt;h2&gt;Common benchmarks&lt;/h2&gt;&quot;,
-        &quot;&lt;ul&gt;&quot;,
-            &quot;&lt;li&gt;Business Applications Performance Corporation (BAPCo)&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Embedded Microprocessor Benchmark Consortium (EEMBC)&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Standard Performance Evaluation Corporation (SPEC), in particular their SPECint and SPECfp&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Transaction Processing Performance Council (TPC)&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Coremark: Embedded computing benchmark&lt;/li&gt;&quot;,
-        &quot;&lt;/ul&gt;&quot;,
-        &quot;&lt;h3&gt;Open source benchmarks&lt;/h3&gt;&quot;,
-        &quot;&lt;ul&gt;&quot;,
-            &quot;&lt;li&gt;AIM Multiuser Benchmark: composed of a list of tests that could be mixed to create a 'load mix' that would simulate a specific computer function on any UNIX-type OS.&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;Bonnie++: filesystem and hard drive benchmark&lt;/li&gt;&quot;,
-            &quot;&lt;li&gt;BRL-CAD: cross-platform architecture-agnostic benchmark suite based on multithreaded ray tracing performance; baselined against a VAX-11/780; and used since 1984 for evaluating relative CPU performance, compiler differences, optimization levels, coherency, architecture differences, and operating system differences.&lt;/li&gt;&quot;,
-        &quot;&lt;/ul&gt;&quot;,
-    &quot;&lt;/div&gt;&quot;
-];
</del><ins>+LayeringTextStage = Utilities.createSubclass(Stage,
+    function()
+    {
+        Stage.call(this);
+    }, {
</ins><span class="cx"> 
</span><del>-LayeringTextStage.parseTextItem = function(textItem)
-{
-    var parseResult = {};
-    parseResult.tagStart = textItem.match(/&lt;(.*?)&gt;/g)[0];
-    var spaceIndex = parseResult.tagStart.indexOf(&quot; &quot;);
-    parseResult.nodeName = parseResult.tagStart.substring(1, spaceIndex != -1 ? spaceIndex : parseResult.tagStart.length - 1);
-    parseResult.args = spaceIndex != -1 ? Utilities.parseArguments(parseResult.tagStart.substring(spaceIndex + 1, parseResult.tagStart.length - 1)) : {};
-    var tagEnd = &quot;&lt;/&quot; + parseResult.nodeName + &quot;&gt;&quot;;                
-    parseResult.tagEnd = textItem.endsWith(tagEnd) ? tagEnd : &quot;&quot;;
-    return parseResult;
-}
</del><ins>+    initialize: function(benchmark)
+    {
+        Stage.prototype.initialize.call(this, benchmark);
+        this._textElementParent = this.element;
+        this._textElements = [];
+        this._textItemIndex = 0;
+        this._colorIndex = 0;
+        this._animateCounts = 0;
+    },
</ins><span class="cx"> 
</span><del>-LayeringTextStage.isOpeningTextItem = function(textItem)
-{
-    return !LayeringTextStage.parseTextItem(textItem).tagEnd.length;
-}
</del><ins>+    _nextTextItem: function(textItemFlags)
+    {
+        var textItem = LayeringTextStage.textItems[this._textItemIndex];
+        Utilities.extendObject(textItemFlags, LayeringTextStage.textItemsFlags[this._textItemIndex]);
+        this._textItemIndex = (this._textItemIndex + 1) % LayeringTextStage.textItems.length;
+        return textItem;
+    },
</ins><span class="cx"> 
</span><del>-LayeringTextStage.isClosingTextItem = function(textItem)
-{
-    return textItem.indexOf(&quot;/&quot;) == +1;
-}
</del><ins>+    _previousTextItem: function(textItemFlags)
+    {
+        this._textItemIndex = (this._textItemIndex + LayeringTextStage.textItems.length - 1) % LayeringTextStage.textItems.length;
+        Utilities.extendObject(textItemFlags, LayeringTextStage.textItemsFlags[this._textItemIndex]);
+        return LayeringTextStage.textItems[this._textItemIndex];
+    },
</ins><span class="cx"> 
</span><del>-LayeringTextStage.textItemsFlags = LayeringTextStage.textItems.map(function(textItem)
-{
-   var textItemFlags = {};
-   textItemFlags.isOpening = LayeringTextStage.isOpeningTextItem(textItem);
-   textItemFlags.isClosing = LayeringTextStage.isClosingTextItem(textItem);   
-   return textItemFlags;
-});
</del><ins>+    _pushTextElement: function()
+    {
+        var textItemFlags = {};
+        var textItem = this._nextTextItem(textItemFlags);
+        for ( ; textItemFlags.isClosing; textItem = this._nextTextItem(textItemFlags))
+            this._textElementParent = this._textElementParent.parentNode;
</ins><span class="cx"> 
</span><del>-LayeringTextStage.isColorableTextItem = function(textItemFlags)
-{
-    return !(textItemFlags.isOpening || textItemFlags.isClosing);
-}
</del><ins>+        var parseResult = LayeringTextStage.parseTextItem(textItem);
+        textItem = textItem.substring(parseResult.tagStart.length, textItem.length - parseResult.tagEnd.length);
</ins><span class="cx"> 
</span><del>-LayeringTextStage.isInsertableTextItem = function(textItemFlags)
-{
-    return !textItemFlags.isClosing;
-}
</del><ins>+        var textElement = document.createElement(parseResult.nodeName);
</ins><span class="cx"> 
</span><del>-LayeringTextStage.colorableTextItems = LayeringTextStage.textItemsFlags.filter(function(textItemFlags)
-{
-    return LayeringTextStage.isColorableTextItem(textItemFlags);
-}).length;
</del><ins>+        for (var attrname in parseResult.args)
+            textElement.setAttribute(attrname, parseResult.args[attrname]);
</ins><span class="cx"> 
</span><del>-LayeringTextStage.insertableTextItems = LayeringTextStage.textItemsFlags.filter(function(textItemFlags)
-{
-    return LayeringTextStage.isInsertableTextItem(textItemFlags);
-}).length;
</del><ins>+        this._textElementParent.appendChild(textElement);
</ins><span class="cx"> 
</span><del>-LayeringTextStage.colorIndexToTextElementIndex = function(colorIndex)
-{
-    var textElementIndex = 0;
-    var index = 0;
-    
-    for (var textItemIndex = 0; textItemIndex &lt; LayeringTextStage.textItemsFlags.length; ++textItemIndex) {
-        if (LayeringTextStage.isColorableTextItem(LayeringTextStage.textItemsFlags[textItemIndex])) {
-            if (++index &gt; colorIndex)
-                break;
-        }
-        if (LayeringTextStage.isInsertableTextItem(LayeringTextStage.textItemsFlags[textItemIndex]))
-            ++textElementIndex;
-    }
-    
-    return textElementIndex;
-}
</del><ins>+        if (!parseResult.tagEnd.length)
+            this._textElementParent = textElement;
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype = Object.create(Stage.prototype);
-LayeringTextStage.prototype.constructor = LayeringTextStage;
</del><ins>+        textElement.innerHTML = textItem;
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype._nextTextItem = function(textItemFlags)
-{
-    var textItem = LayeringTextStage.textItems[this._textItemIndex];
-    Utilities.extendObject(textItemFlags, LayeringTextStage.textItemsFlags[this._textItemIndex]);
-    this._textItemIndex = (this._textItemIndex + 1) % LayeringTextStage.textItems.length;
-    return textItem;
-}
</del><ins>+        this._textElements.push(textElement);
+        return this._textElements.length;
+    },
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype._previousTextItem = function(textItemFlags)
-{
-    this._textItemIndex = (this._textItemIndex + LayeringTextStage.textItems.length - 1) % LayeringTextStage.textItems.length;
-    Utilities.extendObject(textItemFlags, LayeringTextStage.textItemsFlags[this._textItemIndex]);    
-    return LayeringTextStage.textItems[this._textItemIndex];
-}
</del><ins>+    _popTextElement: function()
+    {
+        var textItemFlags = {};
+        var textItem = this._previousTextItem(textItemFlags);
+        for ( ; textItemFlags.isClosing; textItem = this._previousTextItem(textItemFlags))
+            this._textElementParent = this._textElementParent.lastChild;
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype._pushTextElement = function()
-{
-    var textItemFlags = {};
-    var textItem = this._nextTextItem(textItemFlags);
-    for ( ; textItemFlags.isClosing; textItem = this._nextTextItem(textItemFlags))
-        this._textElementParent = this._textElementParent.parentNode;
</del><ins>+        if (textItemFlags.isOpening)
+            this._textElementParent = this._textElementParent.parentNode;
</ins><span class="cx"> 
</span><del>-    var parseResult = LayeringTextStage.parseTextItem(textItem);
-    textItem = textItem.substring(parseResult.tagStart.length, textItem.length - parseResult.tagEnd.length);
</del><ins>+        this._textElements[this._textElements.length - 1].remove();
</ins><span class="cx"> 
</span><del>-    var textElement = document.createElement(parseResult.nodeName);
</del><ins>+        this._textElements.pop();
+        return this._textElements.length;
+    },
</ins><span class="cx"> 
</span><del>-    for (var attrname in parseResult.args)
-        textElement.setAttribute(attrname, parseResult.args[attrname]);
</del><ins>+    _colorTextItem: function(color)
+    {
+        var textElementIndex = LayeringTextStage.colorIndexToTextElementIndex(this._colorIndex);
+        for ( ; textElementIndex &lt; this._textElements.length; textElementIndex += LayeringTextStage.insertableTextItems)
+            this._textElements[textElementIndex].style.backgroundColor = color;
+    },
</ins><span class="cx"> 
</span><del>-    this._textElementParent.appendChild(textElement);
-    
-    if (!parseResult.tagEnd.length)
-        this._textElementParent = textElement;
</del><ins>+    animate: function(timeDelta)
+    {
+        this._colorTextItem(&quot;transparent&quot;);
+        this._colorIndex = (this._colorIndex + 1) % LayeringTextStage.colorableTextItems;
+        this._colorTextItem(&quot;YellowGreen&quot;);
</ins><span class="cx"> 
</span><del>-    textElement.innerHTML = textItem;
-    
-    this._textElements.push(textElement);
-    return this._textElements.length;
-}
</del><ins>+        var blackTextElements = Math.min(this._textElements.length, LayeringTextStage.insertableTextItems);
+        var i = 0;
+        for ( ; i &lt; this._textElements.length - blackTextElements; ++i)
+            this._textElements[i].style.color = (this._animateCounts &amp; 1) ? &quot;LightYellow&quot; : &quot;white&quot;;
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype._popTextElement = function()
-{
-    var textItemFlags = {};    
-    var textItem = this._previousTextItem(textItemFlags);
-    for ( ; textItemFlags.isClosing; textItem = this._previousTextItem(textItemFlags))
-        this._textElementParent = this._textElementParent.lastChild;
</del><ins>+        for ( ; i &lt; this._textElements.length; ++i)
+            this._textElements[i].style.color = &quot;black&quot;;
</ins><span class="cx"> 
</span><del>-    if (textItemFlags.isOpening)
-        this._textElementParent = this._textElementParent.parentNode;
</del><ins>+        ++this._animateCounts;
+    },
</ins><span class="cx"> 
</span><del>-    this._textElements[this._textElements.length - 1].remove();
</del><ins>+    tune: function(count)
+    {
+        if (count == 0)
+            return this._textElements.length;
</ins><span class="cx"> 
</span><del>-    this._textElements.pop();
-    return this._textElements.length;
-}
</del><ins>+        if (count &gt; 0) {
+            for (var i = 0; i &lt; count; ++i)
+                this._pushTextElement();
+            return this._textElements.length;
+        }
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype._colorTextItem = function(color)
-{
-    var textElementIndex = LayeringTextStage.colorIndexToTextElementIndex(this._colorIndex);
-    for ( ; textElementIndex &lt; this._textElements.length; textElementIndex += LayeringTextStage.insertableTextItems)
-        this._textElements[textElementIndex].style.backgroundColor = color;
-}
</del><ins>+        count = Math.min(-count, this._textElements.length);
+        for (var i = 0; i &lt; count; ++i)
+            this._popTextElement();
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype.animate = function(timeDelta)
-{
-    this._colorTextItem(&quot;transparent&quot;);
-    this._colorIndex = (this._colorIndex + 1) % LayeringTextStage.colorableTextItems;
-    this._colorTextItem(&quot;YellowGreen&quot;);
-    
-    var blackTextElements = Math.min(this._textElements.length, LayeringTextStage.insertableTextItems);
-    var i = 0;
-    for ( ; i &lt; this._textElements.length - blackTextElements; ++i)
-        this._textElements[i].style.color = (this._animateCounts &amp; 1) ? &quot;LightYellow&quot; : &quot;white&quot;;
</del><ins>+        return this._textElements.length;
+    }
+});
</ins><span class="cx"> 
</span><del>-    for ( ; i &lt; this._textElements.length; ++i)
-        this._textElements[i].style.color = &quot;black&quot;;
-        
-    ++this._animateCounts;
-}
</del><ins>+Utilities.extendObject(LayeringTextStage, {
+    textItems: [
+        &quot;&lt;div class='text-layer'&gt;&quot;,
+            &quot;&lt;h2&gt;Types of benchmarks&lt;/h2&gt;&quot;,
+            &quot;&lt;ol&gt;&quot;,
+                &quot;&lt;li&gt;Real program&quot;,
+                    &quot;&lt;ul&gt;&quot;,
+                        &quot;&lt;li&gt;word processing software&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;tool software of CAD&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;user's application software (i.e.: MIS)&lt;/li&gt;&quot;,
+                    &quot;&lt;/ul&gt;&quot;,
+                &quot;&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Kernel&quot;,
+                    &quot;&lt;ul&gt;&quot;,
+                        &quot;&lt;li&gt;contains key codes&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;normally abstracted from actual program&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;popular kernel: Livermore loop&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;linpack benchmark (contains basic linear algebra subroutine written in FORTRAN language)&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;results are represented in MFLOPS&lt;/li&gt;&quot;,
+                    &quot;&lt;/ul&gt;&quot;,
+                &quot;&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Synthetic Benchmark&quot;,
+                    &quot;&lt;ul&gt;&quot;,
+                        &quot;&lt;li&gt;Procedure for programming synthetic benchmark:&quot;,
+                            &quot;&lt;ul&gt;&quot;,
+                                &quot;&lt;li&gt;take statistics of all types of operations from many application programs&lt;/li&gt;&quot;,
+                                &quot;&lt;li&gt;get proportion of each operation&lt;/li&gt;&quot;,
+                                &quot;&lt;li&gt;write program based on the proportion above&lt;/li&gt;&quot;,
+                            &quot;&lt;/ul&gt;&quot;,
+                        &quot;&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;Types of Synthetic Benchmark are:&quot;,
+                            &quot;&lt;ul&gt;&quot;,
+                                &quot;&lt;li&gt;Whetstone&lt;/li&gt;&quot;,
+                                &quot;&lt;li&gt;Dhrystone&lt;/li&gt;&quot;,
+                            &quot;&lt;/ul&gt;&quot;,
+                        &quot;&lt;/li&gt;&quot;,
+                        &quot;&lt;li&gt;These were the first general purpose industry standard computer benchmarks. They do not necessarily obtain high scores on modern pipelined computers.&lt;/li&gt;&quot;,
+                    &quot;&lt;/ul&gt;&quot;,
+                &quot;&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;I/O benchmarks&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Database benchmarks: to measure the throughput and response times of database management systems (DBMS')&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Parallel benchmarks: used on machines with multiple cores, processors or systems consisting of multiple machines&lt;/li&gt;&quot;,
+            &quot;&lt;/ol&gt;&quot;,
+            &quot;&lt;h2&gt;Common benchmarks&lt;/h2&gt;&quot;,
+            &quot;&lt;ul&gt;&quot;,
+                &quot;&lt;li&gt;Business Applications Performance Corporation (BAPCo)&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Embedded Microprocessor Benchmark Consortium (EEMBC)&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Standard Performance Evaluation Corporation (SPEC), in particular their SPECint and SPECfp&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Transaction Processing Performance Council (TPC)&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Coremark: Embedded computing benchmark&lt;/li&gt;&quot;,
+            &quot;&lt;/ul&gt;&quot;,
+            &quot;&lt;h3&gt;Open source benchmarks&lt;/h3&gt;&quot;,
+            &quot;&lt;ul&gt;&quot;,
+                &quot;&lt;li&gt;AIM Multiuser Benchmark: composed of a list of tests that could be mixed to create a 'load mix' that would simulate a specific computer function on any UNIX-type OS.&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;Bonnie++: filesystem and hard drive benchmark&lt;/li&gt;&quot;,
+                &quot;&lt;li&gt;BRL-CAD: cross-platform architecture-agnostic benchmark suite based on multithreaded ray tracing performance; baselined against a VAX-11/780; and used since 1984 for evaluating relative CPU performance, compiler differences, optimization levels, coherency, architecture differences, and operating system differences.&lt;/li&gt;&quot;,
+            &quot;&lt;/ul&gt;&quot;,
+        &quot;&lt;/div&gt;&quot;
+    ],
</ins><span class="cx"> 
</span><del>-LayeringTextStage.prototype.tune = function(count)
-{
-    if (count == 0)
-        return this._textElements.length;
</del><ins>+    parseTextItem: function(textItem)
+    {
+        var parseResult = {};
+        parseResult.tagStart = textItem.match(/&lt;(.*?)&gt;/g)[0];
+        var spaceIndex = parseResult.tagStart.indexOf(&quot; &quot;);
+        parseResult.nodeName = parseResult.tagStart.substring(1, spaceIndex != -1 ? spaceIndex : parseResult.tagStart.length - 1);
+        parseResult.args = spaceIndex != -1 ? Utilities.parseArguments(parseResult.tagStart.substring(spaceIndex + 1, parseResult.tagStart.length - 1)) : {};
+        var tagEnd = &quot;&lt;/&quot; + parseResult.nodeName + &quot;&gt;&quot;;
+        parseResult.tagEnd = textItem.endsWith(tagEnd) ? tagEnd : &quot;&quot;;
+        return parseResult;
+    },
</ins><span class="cx"> 
</span><del>-    if (count &gt; 0) {
-        for (var i = 0; i &lt; count; ++i)
-            this._pushTextElement();
-        return this._textElements.length;
</del><ins>+    isOpeningTextItem: function(textItem)
+    {
+        return !LayeringTextStage.parseTextItem(textItem).tagEnd.length;
+    },
+
+    isClosingTextItem: function(textItem)
+    {
+        return textItem.indexOf(&quot;/&quot;) == +1;
+    },
+
+    isColorableTextItem: function(textItemFlags)
+    {
+        return !(textItemFlags.isOpening || textItemFlags.isClosing);
+    },
+
+    isInsertableTextItem: function(textItemFlags)
+    {
+        return !textItemFlags.isClosing;
+    },
+
+    colorIndexToTextElementIndex: function(colorIndex)
+    {
+        var textElementIndex = 0;
+        var index = 0;
+
+        for (var textItemIndex = 0; textItemIndex &lt; LayeringTextStage.textItemsFlags.length; ++textItemIndex) {
+            if (LayeringTextStage.isColorableTextItem(LayeringTextStage.textItemsFlags[textItemIndex])) {
+                if (++index &gt; colorIndex)
+                    break;
+            }
+            if (LayeringTextStage.isInsertableTextItem(LayeringTextStage.textItemsFlags[textItemIndex]))
+                ++textElementIndex;
+        }
+
+        return textElementIndex;
</ins><span class="cx">     }
</span><del>-        
-    count = Math.min(-count, this._textElements.length);
-    for (var i = 0; i &lt; count; ++i)
-        this._popTextElement();
</del><ins>+});
</ins><span class="cx"> 
</span><del>-    return this._textElements.length;
-}
</del><ins>+Utilities.extendObject(LayeringTextStage, {
+    textItemsFlags: LayeringTextStage.textItems.map(function(textItem)
+    {
+       var textItemFlags = {};
+       textItemFlags.isOpening = LayeringTextStage.isOpeningTextItem(textItem);
+       textItemFlags.isClosing = LayeringTextStage.isClosingTextItem(textItem);
+       return textItemFlags;
+    })
+});
</ins><span class="cx"> 
</span><del>-function LayeringTextBenchmark(suite, test, options, progressBar)
-{
-    StageBenchmark.call(this, suite, test, options, progressBar);
-}
</del><ins>+Utilities.extendObject(LayeringTextStage, {
+    colorableTextItems: LayeringTextStage.textItemsFlags.filter(function(textItemFlags)
+    {
+        return LayeringTextStage.isColorableTextItem(textItemFlags);
+    }).length,
</ins><span class="cx"> 
</span><del>-LayeringTextBenchmark.prototype = Object.create(StageBenchmark.prototype);
-LayeringTextBenchmark.prototype.constructor = LayeringTextBenchmark;
</del><ins>+    insertableTextItems: LayeringTextStage.textItemsFlags.filter(function(textItemFlags)
+    {
+        return LayeringTextStage.isInsertableTextItem(textItemFlags);
+    }).length
+});
</ins><span class="cx"> 
</span><del>-LayeringTextBenchmark.prototype.createStage = function(element)
-{
-    return new LayeringTextStage(element, this._options);
-}
</del><ins>+LayeringTextBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new LayeringTextStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, progressBar)
-{
-    return new LayeringTextBenchmark(suite, test, options, progressBar);
-}
</del><ins>+window.benchmarkClass = LayeringTextBenchmark;
+
+})();
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststextresourcestextboxesjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/text/resources/text-boxes.js (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/text/resources/text-boxes.js        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/text/resources/text-boxes.js        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,65 +1,58 @@
</span><del>-function BouncingTextBox(stage, sampleText)
-{
-    BouncingParticle.call(this, stage);
</del><ins>+(function() {
</ins><span class="cx"> 
</span><del>-    this.element = document.createElement(&quot;div&quot;);
-    this.element.classList.add('particle');
-    this.element.style.width = this._size.x + &quot;px&quot;;
-    this.element.style.height = this._size.y + &quot;px&quot;;
-    this.element.textContent = sampleText;
-    
-    stage.element.appendChild(this.element);
-    this._move();
-}
</del><ins>+BouncingTextBox = Utilities.createSubclass(BouncingParticle,
+    function(stage, sampleText)
+    {
+        BouncingParticle.call(this, stage);
</ins><span class="cx"> 
</span><del>-BouncingTextBox.prototype = Object.create(BouncingParticle.prototype);
-BouncingTextBox.prototype.constructor = BouncingTextBox;
</del><ins>+        this.element = document.createElement(&quot;div&quot;);
+        this.element.classList.add('particle');
+        this.element.style.width = this.size.x + &quot;px&quot;;
+        this.element.style.height = this.size.y + &quot;px&quot;;
+        this.element.textContent = sampleText;
</ins><span class="cx"> 
</span><del>-BouncingTextBox.prototype._move = function()
-{
-    this.element.style.left = this._position.x + &quot;px&quot;;
-    this.element.style.top = this._position.y + &quot;px&quot;;
-}
-    
-BouncingTextBox.prototype.animate = function(timeDelta)
-{
-    BouncingParticle.prototype.animate.call(this, timeDelta);
-    this._move();
-}
</del><ins>+        stage.element.appendChild(this.element);
+        this._move();
+    }, {
</ins><span class="cx"> 
</span><del>-function BouncingTextBoxStage(element, options)
-{
-    BouncingParticlesStage.call(this, element, options);
-    this._sampleText = document.getElementById('sample-text').textContent;
-}
</del><ins>+    _move: function()
+    {
+        this.element.style.left = this.position.x + &quot;px&quot;;
+        this.element.style.top = this.position.y + &quot;px&quot;;
+    },
</ins><span class="cx"> 
</span><del>-BouncingTextBoxStage.prototype = Object.create(BouncingParticlesStage.prototype);
-BouncingTextBoxStage.prototype.constructor = BouncingTextBoxStage;
</del><ins>+    animate: function(timeDelta)
+    {
+        BouncingParticle.prototype.animate.call(this, timeDelta);
+        this._move();
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingTextBoxStage.prototype.createParticle = function()
-{
-    return new BouncingTextBox(this, this._sampleText);
-}
</del><ins>+BouncingTextBoxStage = Utilities.createSubclass(BouncingParticlesStage,
+    function()
+    {
+        BouncingParticlesStage.call(this);
+        this._sampleText = document.getElementById('sample-text').textContent;
+    }, {
</ins><span class="cx"> 
</span><del>-BouncingTextBoxStage.prototype.particleWillBeRemoved = function(particle)
-{
-    particle.element.remove();
-}
</del><ins>+    createParticle: function()
+    {
+        return new BouncingTextBox(this, this._sampleText);
+    },
</ins><span class="cx"> 
</span><del>-function BouncingTextBoxsBenchmark(suite, test, options, recordTable, progressBar)
-{
-    BouncingParticlesBenchmark.call(this, suite, test, options, recordTable, progressBar);
-}
</del><ins>+    particleWillBeRemoved: function(particle)
+    {
+        particle.element.remove();
+    }
+});
</ins><span class="cx"> 
</span><del>-BouncingTextBoxsBenchmark.prototype = Object.create(BouncingParticlesBenchmark.prototype);
-BouncingTextBoxsBenchmark.prototype.constructor = BouncingTextBoxsBenchmark;
</del><ins>+BouncingTextBoxBenchmark = Utilities.createSubclass(Benchmark,
+    function(options)
+    {
+        Benchmark.call(this, new BouncingTextBoxStage(), options);
+    }
+);
</ins><span class="cx"> 
</span><del>-BouncingTextBoxsBenchmark.prototype.createStage = function(element)
-{
-    return new BouncingTextBoxStage(element, this._options);
-}
</del><ins>+window.benchmarkClass = BouncingTextBoxBenchmark;
</ins><span class="cx"> 
</span><del>-window.benchmarkClient.create = function(suite, test, options, recordTable, progressBar)
-{
-    return new BouncingTextBoxsBenchmark(suite, test, options, recordTable, progressBar);
-}
</del><ins>+})();
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometerteststexttextboxeshtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/tests/text/text-boxes.html (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/tests/text/text-boxes.html        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/Animometer/tests/text/text-boxes.html        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">                 font-size: 0.96em;
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         .particle {
</span><span class="cx">             position: absolute;
</span><span class="cx">             width: 280px;
</span><span class="lines">@@ -26,22 +26,12 @@
</span><span class="cx">             font-family: sans-serif;
</span><span class="cx">             padding: 3px;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         #sample-text {
</span><span class="cx">             display: none;
</span><span class="cx">         }
</span><del>-    &lt;/style&gt;  
</del><ins>+    &lt;/style&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../resources/stage.css&quot;&gt;
</span><del>-    &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;../resources/utilities.js&quot;&gt;&lt;/script&gt;    
-    &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
-    &lt;script src=&quot;../resources/stage.js&quot;&gt;&lt;/script&gt;  
-    &lt;script src=&quot;../bouncing-particles/resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
-    &lt;script charset=&quot;utf-8&quot; src=&quot;resources/text-boxes.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx">     &lt;div id=&quot;sample-text&quot; class=&quot;particle&quot;&gt;I can eat glass and it doesn't hurt me.
</span><span class="lines">@@ -57,8 +47,16 @@
</span><span class="cx">         私はガラスを食べられます。それは私を傷つけません。
</span><span class="cx">         나는 유리를 먹을 수 있어요. 그래도 아프지 않아요
</span><span class="cx">         Я можу їсти скло, і воно мені не зашкодить.
</span><del>-        ನನಗೆ ಹಾನಿ ಆಗದೆ, ನಾನು ಗಜನ್ನು ತಿನಬಹುದು 
</del><ins>+        ನನಗೆ ಹಾನಿ ಆಗದೆ, ನಾನು ಗಜನ್ನು ತಿನಬಹುದು
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx">     &lt;div id=&quot;stage&quot;&gt;&lt;/div&gt;
</span><ins>+    &lt;script src=&quot;../../resources/algorithm.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/strings.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/sampler.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../../resources/extensions.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/math.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../resources/main.js&quot;&gt;&lt;/script&gt;
+    &lt;script src=&quot;../bouncing-particles/resources/bouncing-particles.js&quot;&gt;&lt;/script&gt;
+    &lt;script charset=&quot;utf-8&quot; src=&quot;resources/text-boxes.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (194519 => 194520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2016-01-03 20:37:23 UTC (rev 194519)
+++ trunk/PerformanceTests/ChangeLog        2016-01-03 23:02:56 UTC (rev 194520)
</span><span class="lines">@@ -1,3 +1,268 @@
</span><ins>+2015-12-27  Jon Lee  &lt;jonlee@apple.com&gt;
+
+        Simplify the test harness
+        https://bugs.webkit.org/show_bug.cgi?id=152562
+
+        Reviewed by Simon Fraser.
+
+        All of the benchmarks use the default Animator(). Don't require new tests
+        to pass a new instance, and instead just make one in the Benchmark constructor.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
+        * Animometer/tests/master/resources/canvas-tests.js:
+        * Animometer/tests/misc/resources/canvas-electrons.js:
+        * Animometer/tests/misc/resources/canvas-stars.js:
+        * Animometer/tests/misc/resources/compositing-transforms.js:
+        * Animometer/tests/resources/main.js:
+        * Animometer/tests/simple/resources/simple-canvas-paths.js:
+        * Animometer/tests/template/resources/template-canvas.js:
+        * Animometer/tests/template/resources/template-css.js:
+        * Animometer/tests/template/resources/template-svg.js:
+        * Animometer/tests/text/resources/layering-text.js:
+        * Animometer/tests/text/resources/text-boxes.js:
+
+        Refactor the template.
+
+        * Animometer/tests/template/resources/template-canvas.js:
+        * Animometer/tests/template/resources/template-css.js:
+        * Animometer/tests/template/resources/template-svg.js:
+        * Animometer/tests/template/template-canvas.html:
+        * Animometer/tests/template/template-css.html:
+        * Animometer/tests/template/template-svg.html:
+
+        Refactor the SVG suite.
+
+        * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Move scripts to the end.
+        * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
+
+        * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Remove extraneous includes
+        to stage.js.
+        * Animometer/tests/text/text-boxes.html: Ditto.
+
+        BouncingCanvasParticlesBenchmark is not necessary. Use Benchmark directly when subclassing.
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Remove
+        BouncingCanvasParticlesBenchmark.
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Use Benchmark.
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Ditto.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js: Require the shape
+        in the constructor instead of having subclasses set the private variable.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js: Refactor.
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
+
+        Refactor the HTML suite.
+
+        Move scripts to the end.
+        * Animometer/tests/bouncing-particles/bouncing-css-images.html:
+        * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
+        * Animometer/tests/text/layering-text.html:
+        * Animometer/tests/text/text-boxes.html:
+
+        Refactor to use the new variables.
+        * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
+        * Animometer/tests/text/resources/layering-text.js:
+        * Animometer/tests/text/resources/text-boxes.js:
+
+        Refactor the bouncing canvas tests.
+
+        * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Move scripts to the end.
+        * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Move scripts to the end.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-particles.js: Promote a few
+        properties to &quot;public&quot; since they are used by subclasses.
+        (BouncingParticlesStage): Fix the constructor, which was missing &quot;this&quot;. Make particles
+        &quot;public&quot; for subclasses.
+        (BouncingParticlesStage.initialize): Fix the max velocity, which was accidentally changed.
+        * Animometer/tests/misc/resources/compositing-transforms.js: Refactor.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
+        BouncingCanvasParticlesAnimator is no longer needed.
+        (BouncingCanvasParticle): Change constructor to take a shape as a parameter instead of
+        having subclasses set the variable.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Refactor.
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Refactor.
+
+        Move example/ files into misc/.
+
+        * Animometer/tests/misc/canvas-electrons.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-electrons.html.
+        * Animometer/tests/misc/canvas-stars.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-stars.html.
+        * Animometer/tests/misc/resources/canvas-electrons.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-electrons.js.
+        * Animometer/tests/misc/resources/canvas-stars.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-stars.js.
+
+        * Animometer/resources/debug-runner/tests.js: Update test URLs.
+
+        Refactor miscellaneous suite.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
+        Remove BouncingParticlesAnimator and BouncingParticleBenchmark, which are
+        not needed.
+        (tune): Remove console assert.
+        * Animometer/tests/resources/main.js: Add Rotater back in from stage.js.
+
+        * Animometer/tests/examples/resources/canvas-electrons.js: Remove CanvasElectronsAnimator.
+        * Animometer/tests/examples/resources/canvas-stars.js: Remove CanvasStarsAnimator.
+        * Animometer/tests/misc/resources/compositing-transforms.js:
+        * Animometer/tests/examples/canvas-electrons.html: Move scripts to the end.
+        * Animometer/tests/examples/canvas-stars.html: Ditto.
+        * Animometer/tests/misc/compositing-transforms.html: Ditto.
+
+        Refactor the simple suite.
+
+        * Animometer/tests/master/resources/canvas-stage.js:
+        (tune): Remove coordinateMaximum since it is not needed in any
+        of the master tests.
+        * Animometer/tests/simple/resources/simple-canvas.js:
+        SimpleCanvasAnimator and SimpleCanvasBenchmark are no longer
+        needed.
+        (tune): Manage the objects differently, but instead of duplicating
+        all of SimpleCanvasStage here, just replace tune(). Include
+        coordinateMaximum, and remove items from the end of the list
+        instead of the beginning.
+        (StageBenchmark.call.createAnimator): Deleted.
+        (StageBenchmark.call): Deleted.
+        * Animometer/tests/simple/resources/simple-canvas-paths.js:
+        * Animometer/tests/simple/simple-canvas-paths.html: Move
+        scripts to the end.
+
+        Get rid of stage.js, StageAnimator, and StageBenchmark. Don't have the progress bar update during the test.
+
+        * Animometer/resources/debug-runner/animometer.js:
+        (initialize): Move the setting of testsCount to the debug runner.
+        (didRunTest): Nicer name.
+        * Animometer/resources/debug-runner/benchmark-runner.js:
+        (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Don't pass in the progress bar to benchmarks.
+        * Animometer/resources/extensions.js:
+        (ProgressBar): Refactor. Make variables &quot;private&quot;. Resetting the progress when instantiating.
+        (ProgressBar.prototype.incrementRange): This is called every time a benchmark completes.
+        * Animometer/resources/runner/animometer.js:
+        (window.benchmarkRunnerClient.initialize): Remove unneeded setting of testsCount.
+        * Animometer/resources/strings.js: These are no longer needed.
+        * Animometer/tests/master/canvas-stage.html: Remove script inclusion. Other tests will follow.
+        * Animometer/tests/master/resources/canvas-tests.js: Use Benchmark instead of StageBenchmark.
+        * Animometer/tests/resources/main.js: Messages are no longer needed
+        (Animator.prototype._shouldRequestAnotherFrame): Rename from animate(), since this method returns a boolean
+        indicating whether another frame should be requested. Collapse the logic from StageAnimator into animateLoop.
+        (BenchmarkState.prototype.currentStage): Deleted.
+        (BenchmarkState.prototype.currentMessage): Deleted.
+        (BenchmarkState.prototype.currentProgress): Deleted.
+        (Animator.prototype.animate): Deleted.
+        (Animator.prototype.animateLoop): The stage is animated only when we have another frame to draw.
+        (Benchmark.prototype.record): No need to update the progress bar.
+        * Animometer/tests/resources/stage.js: Removed. Rotater will appear in a later patch, in main.js.
+
+        * Animometer/resources/debug-runner/benchmark-runner.js:
+        (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Each test is run as a benchmark.
+        Remove the call to runBenchmark by merging the options here, and calling benchmark.run()
+        directly.
+
+        Make the class relationships more easily understandable. The benchmark owns the stage,
+        animator, and options. Make the stage and animator no longer have their own references to
+        the options. Make Stage a first-class citizen by promoting it to main.js. Later patches
+        will try to get rid of stage.js altogether.
+        * Animometer/tests/resources/main.js:
+        (Stage): Moved from stage.js.
+        (Animator): Don't pass in benchmark and options in its constructor. It will get initialized
+        by benchmark-related parameters in initialize().
+        (Animator.prototype.initialize): Add a back-reference to benchmark and cache an option.
+        (Animator.prototype.get benchmark):
+        (Animator.prototype.animate): Refactor to use the cached option, to remove its dependency on
+        the options dictionary.
+        (Benchmark): Require all benchmarks to have a stage and animator. The instance will initialize
+        them.
+        (Benchmark.prototype.get options):
+        (Benchmark.prototype.get stage): BenchmarkStates.stages will need to be renamed to avoid confusion.
+        (Benchmark.prototype.get animator):
+        (Benchmark.prototype.start):
+        (Benchmark.prototype.update): Ask the stage directly to tune or clear instead of adding another
+        level of indirection.
+        (window.runBenchmark): Deleted. Remove the need for a benchmarkClient. Also remove the standalone
+        path, since tests can be individually selected, and remove the need for runBenchmark since that is
+        handled in BenchmarkRunner._runBenchmarkAndRecordResults.
+        * Animometer/tests/resources/stage.js:
+        (Stage): Deleted. Moved to main.js.
+        (StageBenchmark): What's left is updating the progress bar; to be removed.
+        (StageAnimator): What's left can be folded in Animator.
+
+        Refactor master suite.
+        * Animometer/tests/master/resources/canvas-stage.js: This now only has SimpleCanvasStage.
+        (animate): Push the clearRect() into each stage.
+        (complexity):
+        (StageBenchmark.call.createAnimator): Deleted.
+        (StageBenchmark.call): Deleted.
+        * Animometer/tests/master/resources/canvas-tests.js: SimpleCanvasPathStrokeStage is no longer needed.
+        (CanvasLineSegment.prototype.draw):
+        (CanvasArc):
+        (CanvasLinePoint): Remove the draw call because depending on its index it either needs to be moveTo
+        or lineTo, and it is otherwise a very small draw operation that doesn't need the overhead of the
+        function call. Do all of the drawing through the stage.
+
+        Refactor the subclass pattern. Introduce Utilities.createSubclass().
+
+        * Animometer/resources/debug-runner/benchmark-runner.js:
+        * Animometer/resources/extensions.js:
+        (window.Utilities.createSubclass): Takes the super class, a function representing
+        the class's constructor, and additional methods to attach to the new class's
+        prototype object.
+        * Animometer/tests/text/text-boxes.html: Remove unneeded reference to utilities.js.
+
+        Refactor tests.
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
+        * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
+        * Animometer/tests/examples/resources/canvas-electrons.js:
+        * Animometer/tests/examples/resources/canvas-stars.js:
+        * Animometer/tests/master/resources/canvas-stage.js:
+        * Animometer/tests/master/resources/canvas-tests.js:
+        * Animometer/tests/misc/resources/compositing-transforms.js:
+        * Animometer/tests/resources/stage.js:
+        * Animometer/tests/simple/resources/simple-canvas-paths.js:
+        * Animometer/tests/simple/resources/simple-canvas.js:
+        * Animometer/tests/template/resources/template-canvas.js:
+        * Animometer/tests/template/resources/template-css.js:
+        * Animometer/tests/template/resources/template-svg.js:
+        * Animometer/tests/text/resources/layering-text.js: Reorder some of the methods
+        and properties since they rely on each other.
+        * Animometer/tests/text/resources/text-boxes.js:
+
+        * Animometer/resources/debug-runner/animometer.js: Arrange calls
+        in the order they are evoked.
+        * Animometer/resources/debug-runner/benchmark-runner.js:
+        (BenchmarkRunnerState.prototype.next): Get rid of return value since
+        no caller to next() uses it.
+        (BenchmarkRunnerState.prototype.prepareCurrentTest): Refactor the
+        promise to resolve simply when onload() is called instead of
+        looking for #stage.
+        (BenchmarkRunner.prototype._runTestAndRecordResults): Suite.run
+        simply calls runBenchmark(). Call it directly rather than through
+        the Suite.
+        (BenchmarkRunner.prototype.step): Remove unused parameter in
+        resolve callback.
+        (BenchmarkRunner.prototype.runMultipleIterations): Use this instead
+        of self since it is outside of the closure which needed the self
+        variable.
+        (resolveIfReady): Deleted.
+        (BenchmarkRunner.prototype.waitForElement): Deleted.
+        * Animometer/resources/runner/tests.js: prepare() and run() are
+        no longer needed.
+        (Suite.prototype.prepare): Deleted.
+        (Suite.prototype.run): Deleted.
+        * Animometer/tests/master/canvas-stage.html: Move all scripts to
+        the end of the page.
+
</ins><span class="cx"> 2015-12-23  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add an Animometer developer test which animates text-rich boxes
</span></span></pre>
</div>
</div>

</body>
</html>