1 SimpleCanvasStage = Utilities.createSubclass(Stage,
5 this._canvasObject = canvasObject;
10 initialize: function(benchmark, options)
12 Stage.prototype.initialize.call(this, benchmark, options);
13 this.context = this.element.getContext("2d");
22 this.offsetIndex = Math.min(this.offsetIndex - count, this.objects.length);
26 var newIndex = this.offsetIndex - count;
30 for (var i = 0; i < newIndex; ++i)
31 this.objects.push(new this._canvasObject(this));
33 this.offsetIndex = newIndex;
38 var context = this.context;
39 context.clearRect(0, 0, this.size.x, this.size.y);
40 for (var i = this.offsetIndex, length = this.objects.length; i < length; ++i)
41 this.objects[i].draw(context);
44 complexity: function()
46 return this.objects.length - this.offsetIndex;