void createNewPaintIfNeeded()

in library/src/main/java/com/facebook/fbui/textlayoutbuilder/TextLayoutBuilder.java [124:135]


    void createNewPaintIfNeeded() {
      // Once after build() is called, it is not safe to set properties
      // on the paint as we cache the text layouts.
      // Hence we create a new paint object,
      // if we ever change one of the paint's properties.
      if (mForceNewPaint) {
        TextPaint newPaint = new TextPaint(paint);
        newPaint.set(paint);
        paint = newPaint;
        mForceNewPaint = false;
      }
    }