Don't create an instance of FontStylingSpan until any of the properties changed

Summary: Minor optimization/cleanup: instead of creating an instance of FontStylingSpan for every RCTVirtualText, start with a global immutable instance of use copy-on-write when any of the properties change.

Reviewed By: ahmedre

Differential Revision: D2817156
This commit is contained in:
Denis Koroskin
2016-01-11 20:03:24 -08:00
committed by Ahmed El-Helw
parent c43d8409c0
commit f98a288c2a
3 changed files with 23 additions and 13 deletions

View File

@@ -50,6 +50,7 @@ import com.facebook.react.uimanager.ViewProps;
public RCTText() {
setMeasureFunction(this);
getSpan().setFontSize(getDefaultFontSize());
}
@Override