mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 09:27:53 +08:00
Summary: ImageView will now interrogate fresco cache for images that can be shown before the one with the best fitting size is downloaded. Cache interrogation does not take into account that the images from cache are smaller or bigger than the best fit. Most of the cases, the smaller one will be displayed. It is also possible that a bigger image is available for being displayed, but ideally we'd still want the best fit to be shown, so as to not decode and resize images that are too big. I've added a ImageSource class to simplify things. This makes it easier to lazy-parse the Uri's when necessary, and cache data related to that uri and wether the image is local. This also gets rid of the Map, which makes parsing the source a bit more elegant. Reviewed By: foghina Differential Revision: D3392751 fbshipit-source-id: f6b803fb7ae2aa1c787aa51f66297a14903e4040