code: @Override
    public void buildDrawingCache(boolean autoScale) {
      super.buildDrawingCache(autoScale);
      if (getLayerType() == LAYER_TYPE_SOFTWARE && getDrawingCache(autoScale) == null) {
        setRenderMode(HARDWARE);
      }
    }
docs: If rendering via software, Android will fail to generate a bitmap if the view is too large. Rather than displaying
  nothing, fallback on hardware acceleration which may incur a performance hit.
  
  @see #setRenderMode(RenderMode)
  @see com.airbnb.lottie.LottieDrawable#draw(android.graphics.Canvas)