in core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotImpl.java [218:241]
private void drawTile(View measuredView, int i, int j, RecordBuilderImpl recordBuilder)
throws IOException {
int width = measuredView.getWidth();
int height = measuredView.getHeight();
int left = i * mTileSize;
int top = j * mTileSize;
int right = Math.min(left + mTileSize, width);
int bottom = Math.min(top + mTileSize, height);
lazyInitBitmap();
if (mEnableBitmapReconfigure) {
mBitmap.reconfigure(right - left, bottom - top, Bitmap.Config.ARGB_8888);
mCanvas = new Canvas(mBitmap);
}
clearCanvas(mCanvas);
drawClippedView(measuredView, left, top, mCanvas);
String tempName = mAlbum.writeBitmap(recordBuilder.getName(), i, j, mBitmap);
if (tempName == null) {
throw new NullPointerException();
}
recordBuilder.getTiling().setAt(left / mTileSize, top / mTileSize, tempName);
}