Fix frame processor caching

This commit is contained in:
Dávid Szabó 2016-08-26 01:35:48 +02:00 committed by Julian Descottes
parent a1ab693fb5
commit a097d0b897
2 changed files with 2 additions and 2 deletions

View File

@ -41,11 +41,11 @@
var key2 = pskl.utils.hashCode(framePixels); var key2 = pskl.utils.hashCode(framePixels);
if (cache[key2]) { if (cache[key2]) {
processedFrame = this.outputCloner(cache[key2], frame); processedFrame = this.outputCloner(cache[key2], frame);
cache[key1] = processedFrame;
} else { } else {
*/ */
var callback = this.onProcessorComplete_.bind(this, deferred, cache, key1/*, key1*/); var callback = this.onProcessorComplete_.bind(this, deferred, cache, key1/*, key1*/);
this.frameProcessor(frame, callback); this.frameProcessor(frame, callback);
cache[key1] = processedFrame;
/* /*
} }
*/ */

View File

@ -82,10 +82,10 @@
} else { } else {
*/ */
processedFrame = this.frameProcessor(frame); processedFrame = this.frameProcessor(frame);
cache[cacheKey] = processedFrame;
/* /*
cache[frameAsString] = processedFrame; cache[frameAsString] = processedFrame;
} }
cache[cacheKey] = processedFrame;
*/ */
} }