58 Commits

Author SHA1 Message Date
Tadeu Zagallo
3b24f52a20 [ReactNative] Add completionBlock to -[RCTBridge enqueueJSCall:args:]
Summary:
@public

Allow to pass an optional completion block to the bridge JS calls.

The block will be called from the JS thread, after the javascript has finished
running and the returned calls have been processed/dispatched to the native modules.

Test Plan: Added `testCallbackIsCalledOnTheRightTime` to `RKBatchedBridgeTests`
2015-05-28 08:53:53 -08:00
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
Tadeu Zagallo
ea470408e2 [ReactNative] Allow JSON fragments on RCTJSONStringify 2015-05-06 05:44:40 -08:00
Nick Lockwood
88a83084e4 Fixed UIExplorer in Catalyst shell 2015-05-06 00:08:08 -08:00
Tadeu Zagallo
483077d4da [ReactNative] Don't log invalid utf8 strings 2015-04-29 12:24:52 -08:00
Alex Akers
826b56a41b [React Native] Update RCTView border implementation 2015-04-27 04:10:43 -08:00
Nick Lockwood
bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Tadeu Zagallo
20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00