react-native/Libraries/Image
Nick Lockwood fe4b4c2d83 Optimised blending for translucent images with opaque background color + fixed cropping for images in cover/contain mode.
Summary:
@public

Our background color propagation mechanism is designed to make rendering of translucent content more efficient by pre-blending against an opaque background. Currently this only works for text however, because images are not composited into their background even if the background color is opaque.

This diff precomposites network images with their background color when the background is opaque, allowing them to take advantage of this performance optimization.

I've also added some logic to correctly crop the downloaded image when the resizeMode is "cover" or "contain" - previously it was only correct for "stretch".

Before:{F22437859}
After:{F22437862}

Test Plan: Run the UIExplorer "<ListView> - Paging" example with "color blended layers" enabled and observe that the images appear in green now, instead of red as they did before.
2015-05-22 07:19:06 -08:00
..
RCTImage.xcodeproj [ReactNative] Fix analyze errors on oss 2015-04-24 08:28:35 -08:00
__tests__ [ReactNative] Resolve assets on Android 2015-05-13 13:24:36 -07:00
AssetRegistry.js [ReactNative] Register assets with AssetRegistry 2015-05-07 17:27:42 -08:00
Image.ios.js Fix typo in image documentation 2015-05-18 13:01:20 -08:00
ImageResizeMode.js [react_native] JS files from D2009265: Fix resizeMode for images 2015-04-21 12:04:32 -08:00
ImageSource.js [ReactNative][MAdMan] Add type for image source, flowify AdsManagerObjectiveTypes 2015-04-06 10:32:42 -08:00
ImageStylePropTypes.js [ReactNative] Pull transform properties out into TransformPropTypes 2015-05-06 14:24:10 -08:00
RCTCameraRollManager.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTCameraRollManager.m [React Native] RCT_EXPORT lvl.2 2015-04-08 08:34:10 -08:00
RCTGIFImage.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTGIFImage.m [ReactNative] Fix analyze errors on oss 2015-04-24 08:28:35 -08:00
RCTImageDownloader.h Optimised blending for translucent images with opaque background color + fixed cropping for images in cover/contain mode. 2015-05-22 07:19:06 -08:00
RCTImageDownloader.m Optimised blending for translucent images with opaque background color + fixed cropping for images in cover/contain mode. 2015-05-22 07:19:06 -08:00
RCTImageLoader.h Fixed thread safety for RCTImageLoader 2015-05-13 13:24:36 -07:00
RCTImageLoader.m Optimised blending for translucent images with opaque background color + fixed cropping for images in cover/contain mode. 2015-05-22 07:19:06 -08:00
RCTNetworkImageView.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTNetworkImageView.m Optimised blending for translucent images with opaque background color + fixed cropping for images in cover/contain mode. 2015-05-22 07:19:06 -08:00
RCTNetworkImageViewManager.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTNetworkImageViewManager.m [ReactNative] verifyPropTypes against native exports 2015-04-16 18:15:36 -08:00
RCTStaticImage.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTStaticImage.m [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTStaticImageManager.h [ReactNative] Expanded license on obj-c files 2015-03-23 13:18:29 -08:00
RCTStaticImageManager.m Added support for local image to RCTImageLoader 2015-05-13 13:24:35 -07:00
resolveAssetSource.js [ReactNative] Resolve assets on Android 2015-05-13 13:24:36 -07:00