docs: private boolean drawBitmapAndCache(
        int frameNumber,
        @Nullable CloseableReference<Bitmap> bitmapReference,
        Canvas canvas,
        @FrameType int frameType) {
      if (!CloseableReference.isValid(bitmapReference)) {
        return false;
      }
      if (mBounds == null) {
        canvas.drawBitmap(bitmapReference.get(), 0f, 0f, mPaint);
      } else {
        canvas.drawBitmap(bitmapReference.get(), null, mBounds, mPaint);
      }
  
      // Notify the cache that a frame has been rendered.
      // We should not cache fallback frames since they do not represent the actual frame.
      if (frameType != FRAME_TYPE_FALLBACK) {
        mBitmapFrameCache.onFrameRendered(
            frameNumber,
            bitmapReference,
            frameType);
      }
  
      if (mFrameListener != null) {
        mFrameListener.onFrameDrawn(this, frameNumber, frameType);
      }
      return true;
    }