Refactor tune() to not return the complexity of the scene.
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Feb 2016 03:30:38 +0000 (03:30 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Feb 2016 03:30:38 +0000 (03:30 +0000)
We have stage.complexity() now, so returning the complexity through tune
is unnecessary.

* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
* Animometer/tests/master/resources/canvas-stage.js:
* Animometer/tests/master/resources/particles.js:
* Animometer/tests/misc/resources/canvas-electrons.js:
* Animometer/tests/misc/resources/canvas-stars.js:
* Animometer/tests/resources/main.js:
* Animometer/tests/simple/resources/simple-canvas.js:
* Animometer/tests/simple/resources/tiled-canvas-image.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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js
PerformanceTests/Animometer/tests/master/resources/canvas-stage.js
PerformanceTests/Animometer/tests/master/resources/particles.js
PerformanceTests/Animometer/tests/misc/resources/canvas-electrons.js
PerformanceTests/Animometer/tests/misc/resources/canvas-stars.js
PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js
PerformanceTests/Animometer/tests/simple/resources/tiled-canvas-image.js
PerformanceTests/Animometer/tests/template/resources/template-canvas.js
PerformanceTests/Animometer/tests/template/resources/template-css.js
PerformanceTests/Animometer/tests/template/resources/template-svg.js
PerformanceTests/Animometer/tests/text/resources/layering-text.js
PerformanceTests/ChangeLog

index 683dc2a688a66247391fc0b19f09d796d413bf4f..b923d43fd1314c64085270af33399e4533e222aa 100644 (file)
@@ -96,12 +96,12 @@ BouncingParticlesStage = Utilities.createSubclass(Stage,
     tune: function(count)
     {
         if (count == 0)
-            return this.particles.length;
+            return;
 
         if (count > 0) {
             for (var i = 0; i < count; ++i)
                 this.particles.push(this.createParticle());
-            return this.particles.length;
+            return;
         }
 
         count = Math.min(-count, this.particles.length);
@@ -112,7 +112,6 @@ BouncingParticlesStage = Utilities.createSubclass(Stage,
         }
 
         this.particles.splice(-count, count);
-        return this.particles.length;
     },
 
     complexity: function()
index e394f9228b9032b821b9c7b5cabf914f419ef1fd..ae647dbd2054194ed7f3879614bdd3c22f260ec9 100644 (file)
@@ -15,17 +15,16 @@ SimpleCanvasStage = Utilities.createSubclass(Stage,
     tune: function(count)
     {
         if (count == 0)
-            return this.objects.length;
+            return;
 
         if (count > 0) {
             for (var i = 0; i < count; ++i)
                 this.objects.push(new this._canvasObject(this));
-            return this.objects.length;
+            return;
         }
 
         count = Math.min(-count, this.objects.length);
         this.objects.splice(0, count);
-        return this.objects.length;
     },
 
     animate: function()
index 807d03c71b169578aa681c6653c922fda4264546..69673c1e2cf79f67ea4178430f445365546a57e1 100644 (file)
@@ -107,12 +107,12 @@ ParticlesStage = Utilities.createSubclass(Stage,
     tune: function(count)
     {
         if (count == 0)
-            return this.particles.length;
+            return;
 
         if (count > 0) {
             for (var i = 0; i < count; ++i)
                 this.particles.push(this.createParticle());
-            return this.particles.length;
+            return;
         }
 
         count = Math.min(-count, this.particles.length);
@@ -123,7 +123,6 @@ ParticlesStage = Utilities.createSubclass(Stage,
         }
 
         this.particles.splice(0, count);
-        return this.particles.length;
     },
 
     complexity: function()
index 27865b6433483bd6a86320b8dc5b68b6e651c273..6dc6e21fd1cb375b988926a5fa8cd0e83a16540f 100644 (file)
@@ -70,18 +70,16 @@ CanvasElectronsStage = Utilities.createSubclass(Stage,
     tune: function(count)
     {
         if (count == 0)
-            return this._electrons.length;
+            return;
 
         if (count > 0) {
             for (var i = 0; i < count; ++i)
                 this._electrons.push(new CanvasElectron(this));
-            return this._electrons.length;
+            return;
         }
 
         count = Math.min(-count, this._electrons.length);
         this._electrons.splice(-count, count);
-
-        return this._electrons.length;
     },
 
     animate: function(timeDelta)
index dc8c0ca0820ae88928981a813a2840dc9866fa79..27c9cc9b17e9d28a695e47f93b4a973052e26506 100644 (file)
@@ -67,18 +67,16 @@ CanvasStarsStage = Utilities.createSubclass(Stage,
     tune: function(count)
     {
         if (count == 0)
-            return this._objects.length;
+            return;
 
         if (count > 0) {
             for (var i = 0; i < count; ++i)
                 this._objects.push(new CanvasStar(this));
-            return this._objects.length;
+            return;
         }
 
         count = Math.min(-count, this._objects.length);
         this._objects.splice(-count, count);
-
-        return this._objects.length;
     },
 
     animate: function(timeDelta)
index 33cf6f05ea15fb7255c7fe0c72046114d38ff621..28342a8c0f77b08ad66267bb335e61ab570805ef 100644 (file)
@@ -2,7 +2,7 @@ Utilities.extendObject(SimpleCanvasStage.prototype, {
     tune: function(count)
     {
         if (count == 0)
-            return this.objects.length;
+            return;
 
         if (count > 0) {
             // For some tests, it may be easier to see how well the test is going
@@ -10,11 +10,10 @@ Utilities.extendObject(SimpleCanvasStage.prototype, {
             var coordinateMaximumFactor = Math.min(this.objects.length, Math.min(this.size.x, this.size.y)) / Math.min(this.size.x, this.size.y);
             for (var i = 0; i < count; ++i)
                 this.objects.push(new this._canvasObject(this, coordinateMaximumFactor));
-            return this.objects.length;
+            return;
         }
 
         count = Math.min(-count, this.objects.length);
         this.objects.splice(-count, count);
-        return this.objects.length;
     }
 });
index 4c7b4214fcc12d9f25453f53636cd9b8669f782e..806b3c4d3909603157a364c64ddfaca4718bf2f8 100644 (file)
@@ -66,8 +66,6 @@ TiledCanvasImageStage = Utilities.createSubclass(Stage,
 
         this._ctiles = Math.max(this._ctiles, 0);
         this._ctiles = Math.min(this._ctiles, this._tiles.length);
-
-        return this._ctiles;
     },
 
     _drawBackground: function()
index 61a8af6ae7748e05de500d23eaca72f2061cc591..b74984c010c9d0b69b9885835b1b2bc19c9765ad 100644 (file)
@@ -47,12 +47,6 @@ TemplateCanvasStage = Utilities.createSubclass(Stage,
         // 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;
     },
 
     animate: function(timeDelta)
index 430f415f30f503497df69bdd28d28525c37d5687..cdaa814af010f0d7d810cefb91e163a14f4c56fe 100644 (file)
@@ -20,12 +20,6 @@ TemplateCssStage = Utilities.createSubclass(Stage,
         // 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;
     },
 
     animate: function(timeDelta)
index 23762c360c881dde8e2974ddd1644a728e961682..8fee9c34784a346e4eac7e4b0b79b6107c913cbf 100644 (file)
@@ -20,12 +20,6 @@ TemplateSvgStage = Utilities.createSubclass(Stage,
         // 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;
     },
 
     animate: function(timeDelta)
index 7f0f1c03548053f573e4310647d94c17d97fabe1..0da93cbaba302a012c670e2c7774ce103fc59342 100644 (file)
@@ -100,19 +100,17 @@ LayeringTextStage = Utilities.createSubclass(Stage,
     tune: function(count)
     {
         if (count == 0)
-            return this._textElements.length;
+            return;
 
         if (count > 0) {
             for (var i = 0; i < count; ++i)
                 this._pushTextElement();
-            return this._textElements.length;
+            return;
         }
 
         count = Math.min(-count, this._textElements.length);
         for (var i = 0; i < count; ++i)
             this._popTextElement();
-
-        return this._textElements.length;
     },
 
     complexity: function()
index 29c8e19f7cdd4cf5ba5e506a9ffa213f7bee7994..35b88c46e5f48a28a8cf52d200574b753b06d9ff 100644 (file)
@@ -1,3 +1,23 @@
+2016-02-07  Jon Lee  <jonlee@apple.com>
+
+        Refactor tune() to not return the complexity of the scene.
+
+        We have stage.complexity() now, so returning the complexity through tune
+        is unnecessary.
+
+        * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
+        * Animometer/tests/master/resources/canvas-stage.js:
+        * Animometer/tests/master/resources/particles.js:
+        * Animometer/tests/misc/resources/canvas-electrons.js:
+        * Animometer/tests/misc/resources/canvas-stars.js:
+        * Animometer/tests/resources/main.js:
+        * Animometer/tests/simple/resources/simple-canvas.js:
+        * Animometer/tests/simple/resources/tiled-canvas-image.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:
+
 2016-02-07  Jon Lee  <jonlee@apple.com>
 
         Make the fixed controller a step controller instead. Halfway through the test