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

Unified Diff: samples/o3djs/performance.js

Issue 155191: Change our selenium tests to call ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/beachdemo/beachdemo.js ('k') | tests/selenium/selenium_utilities.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3djs/performance.js
===================================================================
--- samples/o3djs/performance.js (revision 20010)
+++ samples/o3djs/performance.js (working copy)
@@ -56,7 +56,7 @@
targetFPSMin, targetFPSMax, increaseQuality, decreaseQuality, opt_options) {
return new o3djs.performance.PerformanceMonitor(targetFPSMin, targetFPSMax,
increaseQuality, decreaseQuality, opt_options);
-}
+};
/**
* A class that monitors performance [in terms of FPS] and helps to adjust the
@@ -77,20 +77,20 @@
/**
* A function to increase quality/lower FPS.
- * @type {function(): void}
+ * @type {function(): void}
*/
this.increaseQuality = increaseQuality;
/**
* A function to decrease quality/raise FPS.
- * @type {function(): void}
+ * @type {function(): void}
*/
this.decreaseQuality = decreaseQuality;
/**
* The mean time taken per frame so far, in seconds. This is only valid once
* we've collected at least minSamples samples.
- * @type {number}
+ * @type {number}
*/
this.meanFrameTime = 0;
@@ -99,14 +99,14 @@
* or equal to this.damping. After that point, we no longer update
* this.sampleCount, so it will clip at this.damping.
*
- * @type {number}
+ * @type {number}
*/
this.sampleCount = 0;
/**
* The minimum number of samples to collect before trying to adjust quality.
*
- * @type {number}
+ * @type {number}
*/
this.minSamples = opt_options.opt_minSamples || 60;
@@ -117,7 +117,7 @@
* between 60 and 600 are probably reasonable values, depending on your needs,
* but the number must be no less than minSamples.
*
- * @type {number}
+ * @type {number}
*/
this.damping = opt_options.opt_damping || 120;
@@ -125,7 +125,7 @@
* The minimum number of samples to take in between adjustments, to cut down
* on overshoot. It defaults to 2 * minSamples.
*
- * @type {number}
+ * @type {number}
*/
this.delayCycles = opt_options.opt_delayCycles || 2 * this.minSamples;
@@ -137,7 +137,7 @@
if (this.damping < this.minSamples) {
throw Error('Damping must be at least minSamples.');
}
-}
+};
/**
* Options for the PerformanceMonitor.
@@ -171,8 +171,8 @@
var test = true;
if (this.sampleCount < this.damping) {
if (this.sampleCount >= this.minSamples) {
- this.scaleInput_ = 1 / (this.sampleCount + 1);
- this.scaleMean_ = this.sampleCount * this.scaleInput_;
+ this.scaleInput_ = 1 / (this.sampleCount + 1);
+ this.scaleMean_ = this.sampleCount * this.scaleInput_;
} else {
test = false;
}
@@ -191,5 +191,6 @@
this.delayCyclesLeft_ = this.delayCycles;
}
}
-}
+};
+
« no previous file with comments | « samples/beachdemo/beachdemo.js ('k') | tests/selenium/selenium_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698