private void draw(Canvas canvas, Matrix matrix, CompositionLayer compositionLayer, int alpha) {
    if (useSoftwareRendering) {
      canvas.save();
      canvas.concat(matrix);
      renderAndDrawAsBitmap(canvas, compositionLayer);
      canvas.restore();
    } else {
      compositionLayer.draw(canvas, matrix, alpha, null);
    }
  }
To be used by lottie-compose only.
lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java