mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 09:30:10 +08:00
Dont create a spacing object for returning margin, padding, border, and position
Summary: The current implementation was made out of simplicity and to keep the same API as before. Now that the java version of csslayout is deprecated it is time to change the API to make the calls more efficient for the JNI version. This diff with reduce allocations as well as reduce the number of JNI calls done. Differential Revision: D4050773
This commit is contained in:
committed by
Ahmed El-Helw
parent
e909fc01c0
commit
c10bbe5599
@@ -9,8 +9,6 @@
|
||||
|
||||
package com.facebook.react.flat;
|
||||
|
||||
import com.facebook.csslayout.Spacing;
|
||||
|
||||
interface AndroidView {
|
||||
|
||||
/**
|
||||
@@ -31,7 +29,7 @@ interface AndroidView {
|
||||
void resetPaddingChanged();
|
||||
|
||||
/**
|
||||
* Get this node's padding, as defined by style + default padding.
|
||||
* Get the padding for a certain spacingType defined in com.facebook.csslayout.Spacing
|
||||
*/
|
||||
Spacing getPadding();
|
||||
float getPadding(int spacingType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user