Bug 1374333 - Use TalosContentProfiler to fix profiling in tcanvasmark tests. r=rwood

MozReview-Commit-ID: AWGSqVeOaB6

--HG--
extra : rebase_source : 254a6524929c0d70670c7cee37bdcfeaea30f382
This commit is contained in:
Mike Conley 2017-07-11 18:05:24 -04:00
Родитель e78b623730
Коммит 8862255d44
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>CanvasMark 2013 - HTML5 Canvas 2D Rendering and JavaScript Benchmark</title>
<script src="../../scripts/Profiler.js"></script>
<script src="chrome://talos-powers-content/content/TalosContentProfiler.js"></script>
<script src="scripts/mathlib-min.js"></script>
<script src="scripts/k3d-min.js"></script>
<script src="scripts/canvasmark_v6.js"></script>

Просмотреть файл

@ -376,7 +376,6 @@ window.requestAnimFrame = (function()
_onInitScene: function _onInitScene()
{
this.sceneGlitchCount = this.testScore = this.testState = 0;
Profiler.resume(this.interval && this.interval.label);
this.sceneStartTime = Date.now();
this.sceneCompletedTime = null;
},
@ -415,7 +414,6 @@ window.requestAnimFrame = (function()
var name = this.interval.label.replace(/Test [0-9] - /g, "");
name = name.replace(/, /g, "- ");
GameHandler.benchmarkLabels.push(name);
Profiler.pause(this.interval.label);
if (typeof console !== "undefined")
{
console.log(score + " [" + this.interval.label + "]");
@ -6135,7 +6133,9 @@ if (typeof Benchmark == "undefined" || !Benchmark)
// the benchmark info scene is displayed first and responsible for allowing the
// benchmark to start once images required by the game engines have been loaded
loader.onLoadCallback(function() {
infoScene.ready();
TalosContentProfiler.resume("begin", true).then(() => {
infoScene.ready();
});
});
};