Removed cached serializer in Frame.js

This commit is contained in:
juliandescottes 2014-04-19 20:04:43 +02:00
parent d45ea00ca5
commit b8ef570077

View File

@ -60,7 +60,6 @@
*/ */
ns.Frame.prototype.setPixels = function (pixels) { ns.Frame.prototype.setPixels = function (pixels) {
this.pixels = this.clonePixels_(pixels); this.pixels = this.clonePixels_(pixels);
this.s = null;
this.version++; this.version++;
}; };
@ -82,8 +81,6 @@
}; };
ns.Frame.prototype.getHash = function () { ns.Frame.prototype.getHash = function () {
if (!this.s) this.s = JSON.stringify(this.pixels);
return this.s;
return [this.id, this.version].join('-'); return [this.id, this.version].join('-');
}; };
@ -91,7 +88,6 @@
if (this.containsPixel(col, row)) { if (this.containsPixel(col, row)) {
var p = this.pixels[col][row]; var p = this.pixels[col][row];
if (p !== color) { if (p !== color) {
this.s = null;
this.pixels[col][row] = color; this.pixels[col][row] = color;
this.version++; this.version++;
} }