Skip to content

Commit

Permalink
Litho UIImplementation
Browse files Browse the repository at this point in the history
Reviewed By: marco-cova

Differential Revision: D5880274

fbshipit-source-id: e6741579d3de6090dea8d26cd07241d57adba84d
  • Loading branch information
ayc1 authored and facebook-github-bot committed Oct 4, 2017
1 parent d07279c commit 7677af1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@

import android.util.SparseArray;
import android.util.SparseBooleanArray;

import com.facebook.react.common.SingleThreadAsserter;

/**
* Simple container class to keep track of {@link ReactShadowNode}s associated with a particular
* UIManagerModule instance.
*/
/*package*/ class ShadowNodeRegistry {
public class ShadowNodeRegistry {

private final SparseArray<ReactShadowNode> mTagsToCSSNodes;
private final SparseBooleanArray mRootTags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
*/
public class UIImplementation {

This comment has been minimized.

Copy link
@chirag04

chirag04 Oct 4, 2017

Contributor

seems like this commit is only cosmetic. will Litho based UIImplementation be open sourced?


protected final EventDispatcher mEventDispatcher;
protected final ReactApplicationContext mReactContext;
protected final ShadowNodeRegistry mShadowNodeRegistry = new ShadowNodeRegistry();
private final Set<Integer> mMeasuredRootNodes = new HashSet<>();
private final ShadowNodeRegistry mShadowNodeRegistry = new ShadowNodeRegistry();
private final ViewManagerRegistry mViewManagers;
private final UIViewOperationQueue mOperationsQueue;
private final NativeViewHierarchyOptimizer mNativeViewHierarchyOptimizer;
private final int[] mMeasureBuffer = new int[4];
private final ReactApplicationContext mReactContext;
protected final EventDispatcher mEventDispatcher;

private long mLastCalculateLayoutTime = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,10 @@ public BoxedIntPropSetter(ReactPropGroup prop, Method setter, int index) {
*/
/*package*/ static Map<String, PropSetter> getNativePropSettersForShadowNodeClass(
Class<? extends ReactShadowNode> cls) {
if (cls == ReactShadowNodeImpl.class) {
return EMPTY_PROPS_MAP;
for (Class iface : cls.getInterfaces()) {
if (iface == ReactShadowNode.class) {
return EMPTY_PROPS_MAP;
}
}
Map<String, PropSetter> props = CLASS_PROPS_CACHE.get(cls);
if (props != null) {
Expand Down

0 comments on commit 7677af1

Please sign in to comment.