private void clearCanvas(Canvas canvas) {
    canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.SRC);
  }
Snaps a screenshot of the view (which should already be measured and layouted) using testName
as the name.
core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotImpl.java