Chromium Code Reviews| Index: ui/file_manager/gallery/js/gallery_item.js |
| diff --git a/ui/file_manager/gallery/js/gallery_item.js b/ui/file_manager/gallery/js/gallery_item.js |
| index 18c9c95043050a6a1e5a065cb6ac44b8a3cb17f7..7f146ada36937acf8534e304108fb33ece53139a 100644 |
| --- a/ui/file_manager/gallery/js/gallery_item.js |
| +++ b/ui/file_manager/gallery/js/gallery_item.js |
| @@ -27,10 +27,34 @@ Gallery.Item = function(entry, metadata, metadataCache, original) { |
| /** |
| * @type {MetadataCache} |
| + * @private |
| */ |
| this.metadataCache_ = metadataCache; |
| /** |
| + * The content cache is used for prefetching the next image when going through |
| + * the images sequentially. The real life photos can be large (18Mpix = 72Mb |
| + * pixel array) so we want only the minimum amount of caching. |
| + * @type {Canvas} |
| + */ |
| + this.screenImage = null; |
| + |
| + /** |
| + * We reuse previously generated screen-scale images so that going back to a |
| + * recently loaded image looks instant even if the image is not in the content |
| + * cache any more. Screen-scale images are small (~1Mpix) so we can afford to |
| + * cache more of them. |
| + * @type {Canvas} |
| + */ |
| + this.contentImage = null; |
| + |
| + /** |
| + * Last accessed date to be used for selecting items whose cache are evicted. |
| + * @type {Date} |
| + */ |
| + this.lastAccessed = Date.now(); |
|
mtomasz
2014/07/28 05:13:01
This seems never updated? Is it OK?
hirono
2014/07/28 06:50:32
The property is updated in the evictCache function
|
| + |
| + /** |
| * @type {boolean} |
| * @private |
| */ |