react-native/React/Base
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
..
RCTAssert.h Added RCT_DEBUG 2015-04-21 05:24:10 -08:00
RCTAssert.m Cleanup 2015-04-11 14:19:49 -08:00
RCTBridge.h [Loader] Post a notification when the JS fails to load 2015-05-07 04:26:24 -08:00
RCTBridge.m [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTBridgeModule.h [ReactNative] Allow bridge modules to run on the JavaScript thread 2015-04-25 19:29:00 -08:00
RCTCache.h Updates from Thu 26 Mar 2015-03-26 06:32:01 -07:00
RCTCache.m Updates from Thu 26 Mar 2015-03-26 06:32:01 -07:00
RCTConvert.h Added accessibility traits support to View class 2015-05-18 07:30:29 -08:00
RCTConvert.m Added accessibility traits support to View class 2015-05-18 07:30:29 -08:00
RCTDefines.h Added RCT_DEBUG 2015-04-21 05:24:10 -08:00
RCTDevMenu.h [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTDevMenu.m [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTEventDispatcher.h [react-native] Fix capitalization of "REact" 2015-04-27 13:52:57 -08:00
RCTEventDispatcher.m [react-native] Fix capitalization of "REact" 2015-04-27 13:52:57 -08:00
RCTFPSGraph.h [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTFPSGraph.m [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTFrameUpdate.h [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -08:00
RCTInvalidating.h [React Kit] Remove embarrassing TODOs 2015-03-26 10:33:05 -08:00
RCTJSMethodRegistrar.h Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
RCTJavaScriptExecutor.h [ReactNative] Fix bridge event dedupe 2015-04-28 07:58:35 -08:00
RCTJavaScriptLoader.h [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
RCTJavaScriptLoader.m [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
RCTKeyCommands.h Updates from Thu 26 Mar 2015-03-26 06:32:01 -07:00
RCTKeyCommands.m Upgraded dev menu 2015-05-01 06:36:49 -08:00
RCTLog.h Removed debug code from release builds 2015-04-21 09:47:21 -08:00
RCTLog.m Removed debug code from release builds 2015-04-21 09:47:21 -08:00
RCTPerfStats.h [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTPerfStats.m [ReactNative] Add fps monitor 2015-05-20 18:26:36 -08:00
RCTProfile.h Added RCT_DEBUG 2015-04-21 05:24:10 -08:00
RCTProfile.m [ReactNative] Move VSync bound events to JS thread 2015-04-22 07:01:48 -08:00
RCTRedBox.h Improved debug and fixed macros 2015-04-30 09:59:16 -08:00
RCTRedBox.m Fixed dev menu loop 2015-05-07 03:55:43 -08:00
RCTRootView.h [ReactNative] Create private underlying bridge to prevent retain cycles 2015-05-04 10:36:20 -08:00
RCTRootView.m [ReactNative] Fix RootContentView release when the top-level bridge is held 2015-05-13 13:24:36 -07:00
RCTSparseArray.h Updates from Thu 26 Mar 2015-03-26 06:32:01 -07:00
RCTSparseArray.m Updates from Thu 26 Mar 2015-03-26 06:32:01 -07:00
RCTTouchHandler.h [ReactNative] Send batched calls from objc to js every frame + add bridge profiling 2015-04-17 04:01:02 -08:00
RCTTouchHandler.m [react-native] Fix spelling of "cancelled" 2015-05-13 13:24:36 -07:00
RCTUtils.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
RCTUtils.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