Reset width/height before deallocation for Safari allocation bug. (flutter/engine#16469)

This commit is contained in:
Ferhat
2020-02-06 12:30:27 -08:00
committed by GitHub
parent 95393f6543
commit 0b3f68c172

View File

@@ -225,6 +225,9 @@ class _CanvasPool extends _SaveStackTracking {
void endOfPaint() {
if (_reusablePool != null) {
for (html.CanvasElement e in _reusablePool) {
if (browserEngine == BrowserEngine.webkit) {
e.width = e.height = 0;
}
e.remove();
}
_reusablePool = null;