mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Format some code and remove unnecessary logging
This commit is contained in:
parent
0bbb4ff2d5
commit
712262b82a
@ -41,7 +41,6 @@
|
||||
frame.setPixels(buffer);
|
||||
return frame;
|
||||
} else {
|
||||
console.error(pixels);
|
||||
throw 'Bad arguments in pskl.model.Frame.fromPixelGrid';
|
||||
}
|
||||
};
|
||||
@ -95,7 +94,6 @@
|
||||
ns.Frame.prototype.clear = function () {
|
||||
this.pixels = ns.Frame.createEmptyPixelGrid_(this.getWidth(), this.getHeight());
|
||||
this.version++;
|
||||
// this.setPixels(pixels);
|
||||
};
|
||||
|
||||
/**
|
||||
@ -103,9 +101,6 @@
|
||||
* @private
|
||||
*/
|
||||
ns.Frame.prototype.clonePixels_ = function (pixels) {
|
||||
//npixels = new Uint32Array(pixels.length);
|
||||
//npixels.set(pixels);
|
||||
|
||||
return new Uint32Array(pixels);
|
||||
};
|
||||
|
||||
|
@ -35,16 +35,20 @@
|
||||
var callbackFirstLvlCacheOnly = this.onProcessorComplete_.bind(this, deferred, cache, key1/*, key1*/);
|
||||
this.frameProcessor(frame, callbackFirstLvlCacheOnly);
|
||||
} else {
|
||||
// TODO: Remove?
|
||||
/*var framePixels = new Float64Array(frame.pixels.buffer).toString();
|
||||
// TODO: Remove? or offload to worker
|
||||
/*
|
||||
var framePixels = new Float64Array(frame.pixels.buffer).toString();
|
||||
var key2 = pskl.utils.hashCode(framePixels);
|
||||
if (cache[key2]) {
|
||||
processedFrame = this.outputCloner(cache[key2], frame);
|
||||
cache[key1] = processedFrame;
|
||||
} else {*/
|
||||
} else {
|
||||
*/
|
||||
var callback = this.onProcessorComplete_.bind(this, deferred, cache, key1/*, key1*/);
|
||||
this.frameProcessor(frame, callback);/*
|
||||
}*/
|
||||
this.frameProcessor(frame, callback);
|
||||
/*
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
if (processedFrame) {
|
||||
|
@ -80,10 +80,13 @@
|
||||
this.cacheHitLvl2_++;
|
||||
processedFrame = this.outputCloner(cache[frameAsString], frame);
|
||||
} else {
|
||||
*/processedFrame = this.frameProcessor(frame);/*
|
||||
*/
|
||||
processedFrame = this.frameProcessor(frame);
|
||||
/*
|
||||
cache[frameAsString] = processedFrame;
|
||||
}
|
||||
cache[cacheKey] = processedFrame;*/
|
||||
cache[cacheKey] = processedFrame;
|
||||
*/
|
||||
}
|
||||
|
||||
return processedFrame;
|
||||
|
Loading…
Reference in New Issue
Block a user