mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
clean out the last used bitmap
Reviewed By: achen1 Differential Revision: D4828134 fbshipit-source-id: bf54f7c9f61016cc0735338f99de7b0378c1234b
This commit is contained in:
committed by
Facebook Github Bot
parent
40eb353487
commit
f8e583b2d0
+8
@@ -47,6 +47,14 @@ public class ScreenshotingFrameLayout extends FrameLayout {
|
||||
canvas.drawBitmap(mBitmap, 0, 0, null);
|
||||
}
|
||||
|
||||
public void clean() {
|
||||
if (mBitmap != null) {
|
||||
mBitmap.recycle();
|
||||
mBitmap = null;
|
||||
}
|
||||
mCanvas.setBitmap(null);
|
||||
}
|
||||
|
||||
private static Bitmap createNewBitmap(Canvas canvas) {
|
||||
return Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user