From a097d0b897589b729fe8d385764859cbfe44155e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Szab=C3=B3?= Date: Fri, 26 Aug 2016 01:35:48 +0200 Subject: [PATCH] Fix frame processor caching --- src/js/model/frame/AsyncCachedFrameProcessor.js | 2 +- src/js/model/frame/CachedFrameProcessor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/model/frame/AsyncCachedFrameProcessor.js b/src/js/model/frame/AsyncCachedFrameProcessor.js index d23f280e..61a7a524 100644 --- a/src/js/model/frame/AsyncCachedFrameProcessor.js +++ b/src/js/model/frame/AsyncCachedFrameProcessor.js @@ -41,11 +41,11 @@ var key2 = pskl.utils.hashCode(framePixels); if (cache[key2]) { processedFrame = this.outputCloner(cache[key2], frame); - cache[key1] = processedFrame; } else { */ var callback = this.onProcessorComplete_.bind(this, deferred, cache, key1/*, key1*/); this.frameProcessor(frame, callback); + cache[key1] = processedFrame; /* } */ diff --git a/src/js/model/frame/CachedFrameProcessor.js b/src/js/model/frame/CachedFrameProcessor.js index ca9a0087..44de9b74 100644 --- a/src/js/model/frame/CachedFrameProcessor.js +++ b/src/js/model/frame/CachedFrameProcessor.js @@ -82,10 +82,10 @@ } else { */ processedFrame = this.frameProcessor(frame); + cache[cacheKey] = processedFrame; /* cache[frameAsString] = processedFrame; } - cache[cacheKey] = processedFrame; */ }