Remove isTextNode optimization
Summary: Scrolling through feed and logging when this optimization is hit leads to... 0 logs. If anything this just adds to confusion. It was initially added due to instinct and not data, which was a mistake. I am happy to add some similar optimization in the future if we have data that it is useful in real world situations, currently it just leads to bugs and confusion though. Reviewed By: astreet Differential Revision: D4146785 fbshipit-source-id: e20d780fbd5759b8f38b809e8cadf29cedee82a8
This commit is contained in:
committed by
Facebook Github Bot
parent
b50090a04e
commit
1baa239389
@@ -58,7 +58,6 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
private @Nullable CSSNodeDEPRECATED mParent;
|
||||
private @Nullable MeasureFunction mMeasureFunction = null;
|
||||
private LayoutState mLayoutState = LayoutState.DIRTY;
|
||||
private boolean mIsTextNode = false;
|
||||
private Object mData;
|
||||
|
||||
@Override
|
||||
@@ -124,16 +123,6 @@ public class CSSNodeDEPRECATED implements CSSNodeAPI<CSSNodeDEPRECATED> {
|
||||
return mMeasureFunction != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIsTextNode(boolean isTextNode) {
|
||||
mIsTextNode = isTextNode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTextNode() {
|
||||
return mIsTextNode;
|
||||
}
|
||||
|
||||
long measure(float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode) {
|
||||
if (!isMeasureDefined()) {
|
||||
throw new RuntimeException("Measure function isn't defined!");
|
||||
|
Reference in New Issue
Block a user