private void disposeToBackground(Canvas canvas, AnimatedDrawableFrameInfo frameInfo) {
    canvas.drawRect(
        frameInfo.xOffset,
        frameInfo.yOffset,
        frameInfo.xOffset + frameInfo.width,
        frameInfo.yOffset + frameInfo.height,
        mTransparentFillPaint);
  }
Given a frame number, prepares the canvas to render based on the nearest cached frame at or
before the frame. On return the canvas will be prepared as if the nearest cached frame had been
rendered and disposed. The returned index is the next frame that needs to be composited onto
the canvas.

@param previousFrameNumber the frame number that is ones less than the one we're rendering
@param canvas the canvas to prepare
@return the index of the the next frame to process
animated-base/src/main/java/com/facebook/imagepipeline/animated/impl/AnimatedImageCompositor.java